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"
|
2016-06-07 06:29:29 +00:00
|
|
|
"github.com/s-rah/onionscan/utils"
|
2016-04-12 06:02:06 +00:00
|
|
|
"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-06-07 06:29:29 +00:00
|
|
|
_, err := utils.GetNetworkConnection(hiddenService, 9878, onionscanConfig.TorProxyAddress, onionscanConfig.Timeout)
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|