mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
balls
This commit is contained in:
parent
02c8a095d3
commit
9363649bce
2 changed files with 10 additions and 0 deletions
|
@ -183,7 +183,9 @@ func (p ProtoPairList) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||||
|
|
||||||
func (d *Discovery) Show() error {
|
func (d *Discovery) Show() error {
|
||||||
d.Session.Targets.Lock()
|
d.Session.Targets.Lock()
|
||||||
|
d.Session.Queue.Lock()
|
||||||
defer d.Session.Targets.Unlock()
|
defer d.Session.Targets.Unlock()
|
||||||
|
defer d.Session.Queue.Unlock()
|
||||||
|
|
||||||
iface := d.Session.Interface
|
iface := d.Session.Interface
|
||||||
gw := d.Session.Gateway
|
gw := d.Session.Gateway
|
||||||
|
|
|
@ -151,6 +151,14 @@ func (q *Queue) Send(raw []byte) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (q *Queue) Lock() {
|
||||||
|
q.lock.Lock()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (q *Queue) Unlock() {
|
||||||
|
q.lock.Unlock()
|
||||||
|
}
|
||||||
|
|
||||||
func (q *Queue) Stop() {
|
func (q *Queue) Stop() {
|
||||||
q.lock.Lock()
|
q.lock.Lock()
|
||||||
defer q.lock.Unlock()
|
defer q.lock.Unlock()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue