go fmt
This commit is contained in:
parent
d83d10bd93
commit
44cc375066
|
@ -7,7 +7,6 @@ import (
|
|||
)
|
||||
|
||||
type BitcoinProtocolScanner struct {
|
||||
|
||||
}
|
||||
|
||||
func (rps *BitcoinProtocolScanner) ScanProtocol(hiddenService string, proxyAddress string, report *report.OnionScanReport) {
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
)
|
||||
|
||||
type FTPProtocolScanner struct {
|
||||
|
||||
}
|
||||
|
||||
func (sps *FTPProtocolScanner) ScanProtocol(hiddenService string, proxyAddress string, report *report.OnionScanReport) {
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
)
|
||||
|
||||
type IRCProtocolScanner struct {
|
||||
|
||||
}
|
||||
|
||||
func (rps *IRCProtocolScanner) ScanProtocol(hiddenService string, proxyAddress string, report *report.OnionScanReport) {
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
)
|
||||
|
||||
type RicochetProtocolScanner struct {
|
||||
|
||||
}
|
||||
|
||||
func (rps *RicochetProtocolScanner) ScanProtocol(hiddenService string, proxyAddress string, report *report.OnionScanReport) {
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
)
|
||||
|
||||
type SMTPProtocolScanner struct {
|
||||
|
||||
}
|
||||
|
||||
func (sps *SMTPProtocolScanner) ScanProtocol(hiddenService string, proxyAddress string, report *report.OnionScanReport) {
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
package protocol
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/s-rah/onionscan/report"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"h12.me/socks"
|
||||
"log"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"net"
|
||||
"errors"
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type SSHProtocolScanner struct {
|
||||
|
||||
}
|
||||
|
||||
func (sps *SSHProtocolScanner) ScanProtocol(hiddenService string, proxyAddress string, report *report.OnionScanReport) {
|
||||
|
@ -25,8 +24,8 @@ func (sps *SSHProtocolScanner) ScanProtocol(hiddenService string, proxyAddress s
|
|||
// TODO SSH Checking
|
||||
report.SSHDetected = true
|
||||
|
||||
config := &ssh.ClientConfig {
|
||||
HostKeyCallback : func (hostname string, addr net.Addr, key ssh.PublicKey) error {
|
||||
config := &ssh.ClientConfig{
|
||||
HostKeyCallback: func(hostname string, addr net.Addr, key ssh.PublicKey) error {
|
||||
h := md5.New()
|
||||
h.Write(key.Marshal())
|
||||
|
||||
|
@ -45,7 +44,7 @@ func (sps *SSHProtocolScanner) ScanProtocol(hiddenService string, proxyAddress s
|
|||
return errors.New("error")
|
||||
},
|
||||
}
|
||||
ssh.NewClientConn(conn,hiddenService+":22",config)
|
||||
ssh.NewClientConn(conn, hiddenService+":22", config)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ package report
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/s-rah/onionscan/utils"
|
||||
"io/ioutil"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type ExifTag struct {
|
||||
|
|
|
@ -25,7 +25,7 @@ func CheckDirectoryListing(scan Scanner, dir string, status int, contents string
|
|||
for _, file := range interestingFiles {
|
||||
log.Printf("\t Found interesting file %s/%s\n", dir, file[1])
|
||||
//TODO: We can do further analysis here, for now, just report them.
|
||||
report.AddInterestingFile(dir+"/"+file[1])
|
||||
report.AddInterestingFile(dir + "/" + file[1])
|
||||
}
|
||||
|
||||
r = regexp.MustCompile(`href="([^/](.*?))/"`)
|
||||
|
|
|
@ -5,5 +5,5 @@ import (
|
|||
)
|
||||
|
||||
type Scanner interface {
|
||||
ScanPage(string, string,*report.OnionScanReport, func(Scanner, string,int, string,*report.OnionScanReport))
|
||||
ScanPage(string, string, *report.OnionScanReport, func(Scanner, string, int, string, *report.OnionScanReport))
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ func StandardPageScan(scan Scanner, page string, status int, contents string, re
|
|||
if isTitlePresent {
|
||||
var startIndex = strings.Index(contents, "<title>")
|
||||
var endIndex = strings.Index(contents, "</title>")
|
||||
var pageTitle = contents[startIndex+len("<title>"):endIndex]
|
||||
var pageTitle = contents[startIndex+len("<title>") : endIndex]
|
||||
log.Printf("\tPage Title: %s\n", pageTitle)
|
||||
report.PageTitle = pageTitle
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue