Extensible Messaging and Presence Protocol

This commit is contained in:
Scott Ainslie 2016-06-10 16:17:51 -04:00
parent 35fd1d3830
commit 8d45cd43cf
No known key found for this signature in database
GPG Key ID: 980BB9D8180C3E38
2 changed files with 37 additions and 0 deletions

36
protocol/xmpp_scanner.go Normal file
View File

@ -0,0 +1,36 @@
package protocol
import (
"github.com/s-rah/onionscan/config"
"github.com/s-rah/onionscan/report"
"github.com/s-rah/onionscan/utils"
"log"
)
type XMPPProtocolScanner struct {
}
func (rps *XMPPProtocolScanner) ScanProtocol(hiddenService string, onionscanConfig *config.OnionscanConfig, report *report.OnionScanReport) {
// XMPP
log.Printf("Checking %s XMPP(5222)\n", hiddenService)
_, err := utils.GetNetworkConnection(hiddenService, 5222, onionscanConfig.TorProxyAddress, onionscanConfig.Timeout)
if err != nil {
log.Printf("Failed to connect to service on port 5222\n")
report.XMPPDetected = false
} else {
log.Printf("Detected possible XMPP instance\n")
// TODO: Actual Analysis
report.XMPPDetected = true
}
// XMPP
log.Printf("Checking %s XMPP(5223)\n", hiddenService)
_, err = utils.GetNetworkConnection(hiddenService, 5223, onionscanConfig.TorProxyAddress, onionscanConfig.Timeout)
if err != nil {
log.Printf("Failed to connect to service on port 5223\n")
} else {
log.Printf("Detected possible XMPP (secure) instance\n")
// TODO: Actual Analysis
report.XMPPDetected = true
}
}

View File

@ -35,6 +35,7 @@ type OnionScanReport struct {
BitcoinDetected bool `json:"bitcoinDetected"` BitcoinDetected bool `json:"bitcoinDetected"`
MongoDBDetected bool `json:"mongodbDetected"` MongoDBDetected bool `json:"mongodbDetected"`
VNCDetected bool `json:"vncDetected"` VNCDetected bool `json:"vncDetected"`
XMPPDetected bool `json:"xmppDetected"`
// Web Specific // Web Specific
ServerPoweredBy string `json:"serverPoweredBy"` ServerPoweredBy string `json:"serverPoweredBy"`