Skip to content

Commit

Permalink
Extensible Messaging and Presence Protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
sainslie committed Jun 10, 2016
1 parent 35fd1d3 commit 8d45cd4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions protocol/xmpp_scanner.go
Original file line number Diff line number Diff line change
@@ -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
}
}
1 change: 1 addition & 0 deletions report/onionscanreport.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type OnionScanReport struct {
BitcoinDetected bool `json:"bitcoinDetected"`
MongoDBDetected bool `json:"mongodbDetected"`
VNCDetected bool `json:"vncDetected"`
XMPPDetected bool `json:"xmppDetected"`

// Web Specific
ServerPoweredBy string `json:"serverPoweredBy"`
Expand Down

0 comments on commit 8d45cd4

Please sign in to comment.