mirror of
https://github.com/bettercap/bettercap
synced 2025-07-11 15:46:59 -07:00
new: parsing BLE flags and company identifiers from advertisements
This commit is contained in:
parent
7f68d0d82c
commit
f72dac0c95
253 changed files with 37143 additions and 487 deletions
29
vendor/github.com/chzyer/readline/debug.go
generated
vendored
Normal file
29
vendor/github.com/chzyer/readline/debug.go
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
package readline
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func sleep(n int) {
|
||||
Debug(n)
|
||||
time.Sleep(2000 * time.Millisecond)
|
||||
}
|
||||
|
||||
// print a linked list to Debug()
|
||||
func debugList(l *list.List) {
|
||||
idx := 0
|
||||
for e := l.Front(); e != nil; e = e.Next() {
|
||||
Debug(idx, fmt.Sprintf("%+v", e.Value))
|
||||
idx++
|
||||
}
|
||||
}
|
||||
|
||||
// append log info to another file
|
||||
func Debug(o ...interface{}) {
|
||||
f, _ := os.OpenFile("debug.tmp", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
||||
fmt.Fprintln(f, o...)
|
||||
f.Close()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue