2016-04-12 06:02:06 +00:00
|
|
|
package protocol
|
|
|
|
|
|
|
|
import (
|
2016-05-03 14:31:56 +00:00
|
|
|
"github.com/s-rah/onionscan/config"
|
2016-04-12 06:02:06 +00:00
|
|
|
"github.com/s-rah/onionscan/report"
|
|
|
|
"h12.me/socks"
|
|
|
|
"log"
|
|
|
|
)
|
|
|
|
|
|
|
|
type RicochetProtocolScanner struct {
|
|
|
|
}
|
|
|
|
|
2016-05-03 14:31:56 +00:00
|
|
|
func (rps *RicochetProtocolScanner) ScanProtocol(hiddenService string, onionscanConfig *config.OnionscanConfig, report *report.OnionScanReport) {
|
2016-04-12 06:02:06 +00:00
|
|
|
// Ricochet
|
|
|
|
log.Printf("Checking %s ricochet(9878)\n", hiddenService)
|
2016-05-03 14:31:56 +00:00
|
|
|
_, err := socks.DialSocksProxy(socks.SOCKS5, onionscanConfig.TorProxyAddress)("", hiddenService+":9878")
|
2016-04-12 06:02:06 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Printf("Failed to connect to service on port 9878\n")
|
2016-05-23 08:38:10 +00:00
|
|
|
report.RicochetDetected = false
|
2016-04-12 06:02:06 +00:00
|
|
|
} else {
|
|
|
|
log.Printf("Detected possible ricochet instance\n")
|
|
|
|
// TODO: Actual Analysis
|
2016-04-25 02:46:28 +00:00
|
|
|
report.RicochetDetected = true
|
2016-04-12 06:02:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|