2016-06-05 20:54:01 +02:00
|
|
|
package protocol
|
|
|
|
|
|
|
|
import (
|
2016-07-31 02:00:42 +02:00
|
|
|
"fmt"
|
2016-06-05 20:54:01 +02:00
|
|
|
"github.com/s-rah/onionscan/config"
|
|
|
|
"github.com/s-rah/onionscan/report"
|
2016-06-07 08:29:29 +02:00
|
|
|
"github.com/s-rah/onionscan/utils"
|
2016-06-05 20:54:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type VNCProtocolScanner struct {
|
|
|
|
}
|
|
|
|
|
2016-07-31 02:00:42 +02:00
|
|
|
func (vncps *VNCProtocolScanner) ScanProtocol(hiddenService string, osc *config.OnionscanConfig, report *report.OnionScanReport) {
|
2016-06-05 20:54:01 +02:00
|
|
|
// MongoDB
|
2016-07-31 02:00:42 +02:00
|
|
|
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 {
|
2016-07-31 02:00:42 +02:00
|
|
|
osc.LogInfo("Failed to connect to service on port 5900\n")
|
2016-06-05 20:54:01 +02:00
|
|
|
report.VNCDetected = false
|
|
|
|
} else {
|
2016-07-31 02:00:42 +02:00
|
|
|
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
|
|
|
}
|