feat: build wahrwelt A/D toolkit
This commit is contained in:
1 parent
303438d206
commit
653924d8c6
564 files changed
+36310
-49998
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/samber/lo"
|
||||
|
||||
"github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
|
||||
)
|
||||
|
||||
func isBinary(data []byte) bool {
|
||||
return len(data) >= 4 && bytes.Equal(data[:4], []byte("\x7fELF"))
|
||||
}
|
||||
|
||||
func getExploitFromState(state *exploits.ServerState, exploitID string) *exploits.ExploitState {
|
||||
exp, ok := lo.Find(state.Exploits, func(s *exploits.ExploitState) bool {
|
||||
return s.ExploitId == exploitID
|
||||
})
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return exp
|
||||
}
|
||||
Reference in new issue
Block a user