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 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-05-03 14:31:56 +00:00
|
|
|
_, err := socks.DialSocksProxy(socks.SOCKS5, onionscanConfig.TorProxyAddress)("", hiddenService+":8333")
|
2016-04-25 02:46:28 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Printf("Failed to connect to service on port 8333\n")
|
|
|
|
} else {
|
|
|
|
log.Printf("Detected possible Bitcoin instance\n")
|
|
|
|
// TODO: Actual Analysis
|
|
|
|
report.BitcoinDetected = true
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|