| 1 | package hidscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/ |
| 2 | |
| 3 | import ( |
| 4 | "timescip-go gomod github.com/golang/go/src go1.16 time/" |
| 5 | ) |
| 6 | |
| 7 | type Framescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame# struct { |
| 8 | Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame#Data. []byte |
| 9 | Delayscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame#Delay. timescip-go gomod github.com/golang/go/src go1.16 time/.Durationscip-go gomod github.com/golang/go/src go1.16 time/Duration# |
| 10 | } |
| 11 | |
| 12 | func NewFramescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/NewFrame().(buf []byte, delay int) Framescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame# { |
| 13 | return Framescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame#{ |
| 14 | Datascip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame#Data.: buf, |
| 15 | Delayscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame#Delay.: timescip-go gomod github.com/golang/go/src go1.16 time/.Millisecondscip-go gomod github.com/golang/go/src go1.16 time/Millisecond. * timescip-go gomod github.com/golang/go/src go1.16 time/.Durationscip-go gomod github.com/golang/go/src go1.16 time/Duration#(delay), |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | type Commandscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command# struct { |
| 20 | Modescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Mode. byte |
| 21 | HIDscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#HID. byte |
| 22 | Sleepscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Sleep. int |
| 23 | Framesscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Frames. []Framescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame# |
| 24 | } |
| 25 | |
| 26 | func (cmd *Commandscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#) AddFramescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#AddFrame().(buf []byte, delay int) { |
| 27 | if cmd.Framesscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Frames. == nil { |
| 28 | cmd.Framesscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Frames. = make([]Framescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Frame#, 0) |
| 29 | } |
| 30 | cmd.Framesscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Frames. = append(cmd.Framesscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Frames., NewFramescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/NewFrame().(buf, delay)) |
| 31 | } |
| 32 | |
| 33 | func (cmd Commandscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#) IsHIDscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#IsHID().() bool { |
| 34 | return cmd.HIDscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#HID. != 0 || cmd.Modescip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Mode. != 0 |
| 35 | } |
| 36 | |
| 37 | func (cmd Commandscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#) IsSleepscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#IsSleep().() bool { |
| 38 | return cmd.Sleepscip-go gomod github.com/bettercap/bettercap . `github.com/bettercap/bettercap/modules/hid`/Command#Sleep. > 0 |
| 39 | } |