mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 14:06:44 +08:00
日志方式修改,采用 github.com/sirupsen/logrus 日志类库
This commit is contained in:
parent
13a3cacd93
commit
8bf089f054
@ -3,7 +3,6 @@ package Plugins
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
@ -12,6 +11,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/shadow1ng/fscan/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var icmp ICMP
|
var icmp ICMP
|
||||||
@ -91,7 +92,7 @@ func isping(ip string) bool {
|
|||||||
conn.SetReadDeadline(time.Time{})
|
conn.SetReadDeadline(time.Time{})
|
||||||
|
|
||||||
if string(recvBuf[0:num]) != "" {
|
if string(recvBuf[0:num]) != "" {
|
||||||
fmt.Printf("(ICMP) Target '%s' is alive\n", ip)
|
common.LogPrint("(ICMP) Target '", ip, "' is alive")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@ -175,7 +176,7 @@ func PingCMDcheck(hostslist []string, bsenv string) {
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
if ExecCommandPing(host, bsenv) {
|
if ExecCommandPing(host, bsenv) {
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
fmt.Printf("(Ping) Target '%s' is alive\n", host)
|
common.LogPrint("(Ping) Target '", host, "' is alive")
|
||||||
AliveHosts = append(AliveHosts, host)
|
AliveHosts = append(AliveHosts, host)
|
||||||
mutex.Unlock()
|
mutex.Unlock()
|
||||||
}
|
}
|
||||||
@ -200,8 +201,8 @@ func ICMPRun(hostslist []string, IcmpThreads int, Ping bool) []string {
|
|||||||
PingCMDcheck(hostslist, "/bin/bash")
|
PingCMDcheck(hostslist, "/bin/bash")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("The current user permissions unable to send icmp packets")
|
common.LogPrint("The current user permissions unable to send icmp packets")
|
||||||
fmt.Println("start ping")
|
common.LogPrint("start ping")
|
||||||
PingCMDcheck(hostslist, "/bin/bash")
|
PingCMDcheck(hostslist, "/bin/bash")
|
||||||
}
|
}
|
||||||
} else if SysInfo.OS == "darwin" {
|
} else if SysInfo.OS == "darwin" {
|
||||||
@ -212,8 +213,8 @@ func ICMPRun(hostslist []string, IcmpThreads int, Ping bool) []string {
|
|||||||
PingCMDcheck(hostslist, "/bin/bash")
|
PingCMDcheck(hostslist, "/bin/bash")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("The current user permissions unable to send icmp packets")
|
common.LogPrint("The current user permissions unable to send icmp packets")
|
||||||
fmt.Println("start ping")
|
common.LogPrint("start ping")
|
||||||
PingCMDcheck(hostslist, "/bin/bash")
|
PingCMDcheck(hostslist, "/bin/bash")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,11 @@ func IsContain(items []string, item string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Scan(info common.HostInfo) {
|
func Scan(info common.HostInfo) {
|
||||||
fmt.Println("scan start")
|
common.LogPrint("scan task ", info, " start ")
|
||||||
Hosts, _ := common.ParseIP(info.Host, info.HostFile)
|
Hosts, _ := common.ParseIP(info.Host, info.HostFile)
|
||||||
if info.Isping == false {
|
if info.Isping == false {
|
||||||
Hosts = ICMPRun(Hosts, info.IcmpThreads, info.Ping)
|
Hosts = ICMPRun(Hosts, info.IcmpThreads, info.Ping)
|
||||||
fmt.Println("icmp alive hosts len is:", len(Hosts))
|
common.LogPrint("icmp alive hosts len is:", len(Hosts))
|
||||||
}
|
}
|
||||||
_, AlivePorts := TCPportScan(Hosts, info.Ports, "icmp", 3) //return AliveHosts,AlivePorts
|
_, AlivePorts := TCPportScan(Hosts, info.Ports, "icmp", 3) //return AliveHosts,AlivePorts
|
||||||
var severports []string //severports := []string{"21","22","135"."445","1433","3306","5432","6379","9200","11211","27017"...}
|
var severports []string //severports := []string{"21","22","135"."445","1433","3306","5432","6379","9200","11211","27017"...}
|
||||||
|
@ -9,29 +9,27 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Parse(Info *HostInfo){
|
func Parse(Info *HostInfo) {
|
||||||
ParseUser(Info)
|
ParseUser(Info)
|
||||||
ParsePass(Info)
|
ParsePass(Info)
|
||||||
ParseInput(Info)
|
ParseInput(Info)
|
||||||
ParseScantype(Info)
|
ParseScantype(Info)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ParseUser(Info *HostInfo) {
|
||||||
|
if Info.Username != "" {
|
||||||
func ParseUser(Info *HostInfo){
|
|
||||||
if Info.Username!=""{
|
|
||||||
uesrs := strings.Split(Info.Username, ",")
|
uesrs := strings.Split(Info.Username, ",")
|
||||||
for _,uesr := range uesrs{
|
for _, uesr := range uesrs {
|
||||||
if uesr !=""{
|
if uesr != "" {
|
||||||
Info.Usernames = append(Info.Usernames,uesr)
|
Info.Usernames = append(Info.Usernames, uesr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for name := range Userdict{
|
for name := range Userdict {
|
||||||
Userdict[name] = Info.Usernames
|
Userdict[name] = Info.Usernames
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if Info.Userfile!=""{
|
if Info.Userfile != "" {
|
||||||
uesrs,err := Readfile(Info.Userfile)
|
uesrs, err := Readfile(Info.Userfile)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
for _, uesr := range uesrs {
|
for _, uesr := range uesrs {
|
||||||
if uesr != "" {
|
if uesr != "" {
|
||||||
@ -46,22 +44,22 @@ func ParseUser(Info *HostInfo){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParsePass(Info *HostInfo){
|
func ParsePass(Info *HostInfo) {
|
||||||
if Info.Password!=""{
|
if Info.Password != "" {
|
||||||
passs := strings.Split(Info.Password, ",")
|
passs := strings.Split(Info.Password, ",")
|
||||||
for _,pass := range passs{
|
for _, pass := range passs {
|
||||||
if pass !=""{
|
if pass != "" {
|
||||||
Info.Passwords = append(Info.Passwords,pass)
|
Info.Passwords = append(Info.Passwords, pass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Passwords = Info.Passwords
|
Passwords = Info.Passwords
|
||||||
}
|
}
|
||||||
if Info.Passfile!=""{
|
if Info.Passfile != "" {
|
||||||
passs,err := Readfile(Info.Passfile)
|
passs, err := Readfile(Info.Passfile)
|
||||||
if err == nil{
|
if err == nil {
|
||||||
for _,pass := range passs{
|
for _, pass := range passs {
|
||||||
if pass !=""{
|
if pass != "" {
|
||||||
Info.Passwords = append(Info.Passwords,pass)
|
Info.Passwords = append(Info.Passwords, pass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Passwords = Info.Passwords
|
Passwords = Info.Passwords
|
||||||
@ -70,10 +68,10 @@ func ParsePass(Info *HostInfo){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func Readfile(filename string)([]string,error){
|
func Readfile(filename string) ([]string, error) {
|
||||||
file, err := os.Open(filename)
|
file, err := os.Open(filename)
|
||||||
if err!=nil{
|
if err != nil {
|
||||||
fmt.Println("Open %s error, %v", filename,err)
|
fmt.Println("Open %s error, %v", filename, err)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
@ -83,52 +81,49 @@ func Readfile(filename string)([]string,error){
|
|||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
text := strings.TrimSpace(scanner.Text())
|
text := strings.TrimSpace(scanner.Text())
|
||||||
if text != "" {
|
if text != "" {
|
||||||
content=append(content,scanner.Text())
|
content = append(content, scanner.Text())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return content,nil
|
return content, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ParseInput(Info *HostInfo) {
|
||||||
|
if Info.Host == "" && Info.HostFile == "" {
|
||||||
func ParseInput(Info *HostInfo){
|
|
||||||
if Info.Host=="" && Info.HostFile ==""{
|
|
||||||
fmt.Println("Host is none")
|
fmt.Println("Host is none")
|
||||||
flag.Usage()
|
flag.Usage()
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
if Info.Outputfile != ""{
|
if Info.Outputfile != "" {
|
||||||
Outputfile = Info.Outputfile
|
Outputfile = Info.Outputfile
|
||||||
}
|
}
|
||||||
if Info.IsSave == true{
|
if Info.IsSave == true {
|
||||||
IsSave = false
|
IsSave = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParseScantype(Info *HostInfo){
|
func ParseScantype(Info *HostInfo) {
|
||||||
_,ok:=PORTList[Info.Scantype]
|
_, ok := PORTList[Info.Scantype]
|
||||||
if !ok{
|
if !ok {
|
||||||
fmt.Println("The specified scan type does not exist")
|
fmt.Println("The specified scan type does not exist")
|
||||||
fmt.Println("-m")
|
fmt.Println("-m")
|
||||||
for name,_:=range PORTList{
|
for name, _ := range PORTList {
|
||||||
fmt.Println(" ["+name+"]")
|
fmt.Println(" [" + name + "]")
|
||||||
}
|
}
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
if Info.Scantype != "all" && Info.Ports != DefaultPorts{
|
if Info.Scantype != "all" && Info.Ports != DefaultPorts {
|
||||||
ScanPort := ParsePort(Info.Ports)[0]
|
ScanPort := ParsePort(Info.Ports)[0]
|
||||||
Info.Ports = strconv.Itoa(ScanPort)
|
Info.Ports = strconv.Itoa(ScanPort)
|
||||||
fmt.Println("if -m and -p only scan the first port:",Info.Ports)
|
fmt.Println("if -m and -p only scan the first port:", Info.Ports)
|
||||||
for name,_:=range PORTList{
|
for name, _ := range PORTList {
|
||||||
PORTList[name] = ScanPort
|
PORTList[name] = ScanPort
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func CheckErr(text string, err error) {
|
||||||
func CheckErr(text string,err error){
|
if err != nil {
|
||||||
if err!=nil{
|
fmt.Println(text, err.Error())
|
||||||
fmt.Println(text,err.Error())
|
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,33 +1,45 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LogSuccess(result string){
|
func init() {
|
||||||
|
log.SetFormatter(&log.TextFormatter{
|
||||||
|
DisableColors: false,
|
||||||
|
FullTimestamp: true})
|
||||||
|
}
|
||||||
|
|
||||||
|
func LogPrint(args ...interface{}) {
|
||||||
|
log.Println(args...)
|
||||||
|
}
|
||||||
|
|
||||||
|
func LogSuccess(result string) {
|
||||||
mutex := &sync.Mutex{}
|
mutex := &sync.Mutex{}
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
fmt.Println(result)
|
log.Println(result)
|
||||||
if IsSave {
|
if IsSave {
|
||||||
WriteFile(result,Outputfile)
|
WriteFile(result, Outputfile)
|
||||||
}
|
}
|
||||||
mutex.Unlock()
|
mutex.Unlock()
|
||||||
}
|
}
|
||||||
func WriteFile(result string,filename string) {
|
func WriteFile(result string, filename string) {
|
||||||
var text = []byte(result+"\n")
|
var text = []byte(result + "\n")
|
||||||
fl, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0777)
|
fl, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
log.Println("open file error : ", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer fl.Close()
|
defer fl.Close()
|
||||||
_, err = fl.Write(text)
|
_, err = fl.Write(text)
|
||||||
if err!= nil{
|
if err != nil {
|
||||||
fmt.Println(err)
|
log.Println("write file error ", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//err := ioutil.WriteFile(filename, text, 0666)
|
//err := ioutil.WriteFile(filename, text, 0666)
|
||||||
//if err!= nil{
|
//if err!= nil{
|
||||||
// fmt.Println(err)
|
// fmt.Println(err)
|
||||||
|
1
go.mod
1
go.mod
@ -7,6 +7,7 @@ require (
|
|||||||
github.com/go-sql-driver/mysql v1.5.0
|
github.com/go-sql-driver/mysql v1.5.0
|
||||||
github.com/jlaffaye/ftp v0.0.0-20201112195030-9aae4d151126
|
github.com/jlaffaye/ftp v0.0.0-20201112195030-9aae4d151126
|
||||||
github.com/lib/pq v1.8.0
|
github.com/lib/pq v1.8.0
|
||||||
|
github.com/sirupsen/logrus v1.7.0
|
||||||
github.com/stacktitan/smb v0.0.0-20190531122847-da9a425dceb8
|
github.com/stacktitan/smb v0.0.0-20190531122847-da9a425dceb8
|
||||||
golang.org/x/crypto v0.0.0-20201116153603-4be66e5b6582
|
golang.org/x/crypto v0.0.0-20201116153603-4be66e5b6582
|
||||||
)
|
)
|
||||||
|
9
go.sum
9
go.sum
@ -1,4 +1,6 @@
|
|||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk=
|
github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk=
|
||||||
github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
|
||||||
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
|
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
|
||||||
@ -9,10 +11,15 @@ github.com/jlaffaye/ftp v0.0.0-20201112195030-9aae4d151126 h1:ly2C51IMpCCV8RpTDR
|
|||||||
github.com/jlaffaye/ftp v0.0.0-20201112195030-9aae4d151126/go.mod h1:2lmrmq866uF2tnje75wQHzmPXhmSWUt7Gyx2vgK1RCU=
|
github.com/jlaffaye/ftp v0.0.0-20201112195030-9aae4d151126/go.mod h1:2lmrmq866uF2tnje75wQHzmPXhmSWUt7Gyx2vgK1RCU=
|
||||||
github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg=
|
github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg=
|
||||||
github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
|
||||||
|
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||||
github.com/stacktitan/smb v0.0.0-20190531122847-da9a425dceb8 h1:GVFkBBJAEO3CpzIYcDDBdpUObzKwVW9okNWcLYL/nnU=
|
github.com/stacktitan/smb v0.0.0-20190531122847-da9a425dceb8 h1:GVFkBBJAEO3CpzIYcDDBdpUObzKwVW9okNWcLYL/nnU=
|
||||||
github.com/stacktitan/smb v0.0.0-20190531122847-da9a425dceb8/go.mod h1:phLSETqH/UJsBtwDVBxSfJKwwkbJcGyy2Q/h4k+bmww=
|
github.com/stacktitan/smb v0.0.0-20190531122847-da9a425dceb8/go.mod h1:phLSETqH/UJsBtwDVBxSfJKwwkbJcGyy2Q/h4k+bmww=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
|
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
@ -20,8 +27,10 @@ golang.org/x/crypto v0.0.0-20201116153603-4be66e5b6582 h1:0WDrJ1E7UolDk1KhTXxxw3
|
|||||||
golang.org/x/crypto v0.0.0-20201116153603-4be66e5b6582/go.mod h1:tCqSYrHVcf3i63Co2FzBkTCo2gdF6Zak62921dSfraU=
|
golang.org/x/crypto v0.0.0-20201116153603-4be66e5b6582/go.mod h1:tCqSYrHVcf3i63Co2FzBkTCo2gdF6Zak62921dSfraU=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
12
main.go
12
main.go
@ -1,20 +1,14 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/shadow1ng/fscan/common"
|
|
||||||
"github.com/shadow1ng/fscan/Plugins"
|
"github.com/shadow1ng/fscan/Plugins"
|
||||||
"fmt"
|
"github.com/shadow1ng/fscan/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var Info common.HostInfo
|
var Info common.HostInfo
|
||||||
common.Flag(&Info) //fmt.Println(Info.Host,Info.Ports)
|
common.Flag(&Info) //fmt.Println(Info.Host,Info.Ports)
|
||||||
common.Parse(&Info)
|
common.Parse(&Info)
|
||||||
Plugins.Scan(Info)
|
Plugins.Scan(Info)
|
||||||
fmt.Println("scan end")
|
common.LogPrint("scan end .")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user