onionscan/protocol/vnc_scanner.go

29 lines
753 B
Go
Raw Permalink Normal View History

2016-06-05 20:54:01 +02:00
package protocol
import (
"fmt"
2016-06-05 20:54:01 +02:00
"github.com/s-rah/onionscan/config"
"github.com/s-rah/onionscan/report"
"github.com/s-rah/onionscan/utils"
2016-06-05 20:54:01 +02:00
)
type VNCProtocolScanner struct {
}
func (vncps *VNCProtocolScanner) ScanProtocol(hiddenService string, osc *config.OnionscanConfig, report *report.OnionScanReport) {
2016-06-05 20:54:01 +02:00
// MongoDB
osc.LogInfo(fmt.Sprintf("Checking %s VNC(5900)\n", hiddenService))
conn, err := utils.GetNetworkConnection(hiddenService, 5900, osc.TorProxyAddress, osc.Timeout)
2016-06-05 20:54:01 +02:00
if err != nil {
osc.LogInfo("Failed to connect to service on port 5900\n")
2016-06-05 20:54:01 +02:00
report.VNCDetected = false
} else {
osc.LogInfo("Detected possible VNC instance\n")
2016-06-05 20:54:01 +02:00
// TODO: Actual Analysis
report.VNCDetected = true
}
2016-07-31 21:05:42 +02:00
if conn != nil {
conn.Close()
}
2016-06-05 20:54:01 +02:00
}