2016-04-25 02:46:28 +00:00
|
|
|
package protocol
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/s-rah/onionscan/report"
|
|
|
|
"h12.me/socks"
|
|
|
|
"log"
|
|
|
|
)
|
|
|
|
|
|
|
|
type SMTPProtocolScanner struct {
|
|
|
|
}
|
|
|
|
|
2016-05-01 02:44:48 +00:00
|
|
|
func (sps *SMTPProtocolScanner) ScanProtocol(hiddenService string, os *ProtocolConfig, report *report.OnionScanReport) {
|
2016-04-25 02:46:28 +00:00
|
|
|
// SMTP
|
|
|
|
log.Printf("Checking %s SMTP(25)\n", hiddenService)
|
2016-05-01 02:44:48 +00:00
|
|
|
_, err := socks.DialSocksProxy(socks.SOCKS5, os.TorProxyAddress)("", hiddenService+":25")
|
2016-04-25 02:46:28 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Printf("Failed to connect to service on port 25\n")
|
|
|
|
} else {
|
|
|
|
// TODO SMTP Checking
|
|
|
|
report.SMTPDetected = true
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|