-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
123 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
config/CreateEs.sh nmap | ||
config/CreateEs.sh naabu | ||
config/CreateEs.sh httpx | ||
config/CreateEs.sh nuclei | ||
config/CreateEs.sh vscan | ||
config/CreateEs.sh hydra | ||
~/MyWork/scan4all/config/CreateEs.sh nmap | ||
~/MyWork/scan4all/config/CreateEs.sh naabu | ||
~/MyWork/scan4all/config/CreateEs.sh httpx | ||
~/MyWork/scan4all/config/CreateEs.sh nuclei | ||
~/MyWork/scan4all/config/CreateEs.sh vscan | ||
~/MyWork/scan4all/config/CreateEs.sh hydra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
root | ||
admin | ||
admin | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,45 @@ | ||
package main | ||
package snmp | ||
|
||
func main() { | ||
$END$ | ||
import ( | ||
"github.com/gosnmp/gosnmp" | ||
) | ||
|
||
type IpAddr struct { | ||
Ip string | ||
Port int | ||
Protocol string | ||
} | ||
type Service struct { | ||
Ip string | ||
Port int | ||
Protocol string | ||
Username string | ||
Password string | ||
} | ||
type ScanResult struct { | ||
Service *Service | ||
Result bool | ||
} | ||
|
||
// default port: 161/162, | ||
// more see: https://nmap.org/book/scan-methods-udp-scan.html | ||
func ScanSNMP(s *Service) (err error, result *ScanResult) { | ||
result.Service = s | ||
result.Service.Username = s.Username // default public | ||
result.Service.Password = s.Password // default public | ||
gosnmp.Default.Target = s.Ip | ||
gosnmp.Default.Port = uint16(s.Port) | ||
gosnmp.Default.Community = result.Service.Password | ||
gosnmp.Default.Timeout = 10 | ||
|
||
err = gosnmp.Default.Connect() | ||
if err == nil { | ||
oids := []string{"1.3.6.1.2.1.1.4.0", "1.3.6.1.2.1.1.7.0"} | ||
_, err := gosnmp.Default.Get(oids) | ||
if err == nil { | ||
result.Result = true | ||
} | ||
} | ||
|
||
return err, result | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.