2016-04-25 02:46:28 +00:00
|
|
|
package protocol
|
|
|
|
|
|
|
|
import (
|
2016-05-03 14:31:56 +00:00
|
|
|
"github.com/s-rah/onionscan/config"
|
2016-04-25 02:46:28 +00:00
|
|
|
"github.com/s-rah/onionscan/report"
|
|
|
|
"h12.me/socks"
|
|
|
|
"log"
|
|
|
|
)
|
|
|
|
|
|
|
|
type FTPProtocolScanner struct {
|
|
|
|
}
|
|
|
|
|
2016-05-03 14:31:56 +00:00
|
|
|
func (sps *FTPProtocolScanner) ScanProtocol(hiddenService string, onionscanConfig *config.OnionscanConfig, report *report.OnionScanReport) {
|
2016-04-25 02:46:28 +00:00
|
|
|
// FTP
|
|
|
|
log.Printf("Checking %s FTP(22)\n", hiddenService)
|
2016-05-03 14:31:56 +00:00
|
|
|
_, err := socks.DialSocksProxy(socks.SOCKS5, onionscanConfig.TorProxyAddress)("", hiddenService+":21")
|
2016-04-25 02:46:28 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Printf("Failed to connect to service on port 21\n")
|
|
|
|
} else {
|
|
|
|
// TODO FTP Checking
|
|
|
|
report.FTPDetected = true
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|