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"
|
2016-06-07 06:29:29 +00:00
|
|
|
"github.com/s-rah/onionscan/utils"
|
2016-04-25 02:46:28 +00:00
|
|
|
"log"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BitcoinProtocolScanner struct {
|
|
|
|
}
|
|
|
|
|
2016-05-03 14:31:56 +00:00
|
|
|
func (rps *BitcoinProtocolScanner) ScanProtocol(hiddenService string, onionscanConfig *config.OnionscanConfig, report *report.OnionScanReport) {
|
2016-04-25 02:46:28 +00:00
|
|
|
// Bitcoin
|
|
|
|
log.Printf("Checking %s Bitcoin(8333)\n", hiddenService)
|
2016-06-07 06:29:29 +00:00
|
|
|
_, err := utils.GetNetworkConnection(hiddenService, 8333, onionscanConfig.TorProxyAddress, onionscanConfig.Timeout)
|
2016-04-25 02:46:28 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Printf("Failed to connect to service on port 8333\n")
|
2016-05-23 08:38:10 +00:00
|
|
|
report.BitcoinDetected = false
|
2016-04-25 02:46:28 +00:00
|
|
|
} else {
|
|
|
|
log.Printf("Detected possible Bitcoin instance\n")
|
|
|
|
// TODO: Actual Analysis
|
|
|
|
report.BitcoinDetected = true
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|