Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions modules/gameserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[1;94m', '\033[1;91m', '\33[1;97m', '\33[1;93m', '\033[1;35m', '\033[1;32m', '\033[0m'


class ThreadManager(object):
i = 0

Expand All @@ -24,6 +25,7 @@ def getNextIp(self):
def getID(self):
return self.i + 1


def coreOptions():
options = [["network", "IP range to scan", ""], ["port-timeout", "Timeout (in sec) for port 80.", "0.3"],
["threads", "Number of threads to run.", "100"], ["verbose", "Show verbose output.", "true"]]
Expand All @@ -37,10 +39,12 @@ def createIPList(network):
ipList.append(x)
return ipList


def print1(data):
if verbose:
print("\033[K" + data)


def checkServer(address, port):
s = socket.socket()
s.settimeout(float(portTimeout))
Expand All @@ -55,6 +59,7 @@ def checkServer(address, port):
s.close()
return "FAIL"


def writeToFile(line):
file = open(fileName, "a")
file.write(line)
Expand Down Expand Up @@ -102,7 +107,7 @@ def scan(i):
possibleGame = tempPort[1]

openPorts = openPorts + 1
print1(GREEN + "[+] Port " + str(port) + " is open on '" + stringIP + "' - " + possibleGame + END)
print1(GREEN + "[+] Port " + str(port) + " is open on '" + stringIP + "' - " + possibleGame + END)
logLine = stringIP + " - " + str(port) + " OPEN - " + possibleGame + "\n"
logLines.append(logLine)
elif not isUp:
Expand All @@ -114,7 +119,8 @@ def scan(i):

def core(moduleOptions):
print(
"\n" + GREEN + "GameServer module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][2] + GREEN + "'...\n")
"\n" + GREEN + "GameServer module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][
2] + GREEN + "'...\n")

global status
global fileName
Expand Down Expand Up @@ -185,9 +191,9 @@ def core(moduleOptions):
break
statusWidget()
except KeyboardInterrupt:
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False

Expand Down
13 changes: 9 additions & 4 deletions modules/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[1;94m', '\033[1;91m', '\33[1;97m', '\33[1;93m', '\033[1;35m', '\033[1;32m', '\033[0m'


class ThreadManager(object):
i = 0

Expand All @@ -26,9 +27,11 @@ def getNextIp(self):
def getID(self):
return self.i + 1


def coreOptions():
options = [["network", "IP range to scan", ""], ["port-timeout", "Timeout (in sec) for port 80.", "0.3"],
["title-timeout", "Timeout (in sec) for title resolve.", "3"], ["threads", "Number of threads to run.", "50"],
["title-timeout", "Timeout (in sec) for title resolve.", "3"],
["threads", "Number of threads to run.", "50"],
["verbose", "Show verbose output.", "true"]]
return options

Expand All @@ -40,10 +43,12 @@ def createIPList(network):
ipList.append(x)
return ipList


def print1(data):
if verbose:
print("\033[K" + data)


def checkServer(address, port):
s = socket.socket()
s.settimeout(float(portTimeout))
Expand Down Expand Up @@ -225,9 +230,9 @@ def core(moduleOptions):
break
statusWidget()
except KeyboardInterrupt:
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False

Expand Down
17 changes: 12 additions & 5 deletions modules/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[1;94m', '\033[1;91m', '\33[1;97m', '\33[1;93m', '\033[1;35m', '\033[1;32m', '\033[0m'


class ThreadManager(object):
i = 0

Expand All @@ -24,8 +25,10 @@ def getNextIp(self):
def getID(self):
return self.i + 1


def coreOptions():
options = [["network", "IP range to scan", ""], ["ports", "Comma separated list of ports to scan. (e.g: '21,22,53')", ""],
options = [["network", "IP range to scan", ""],
["ports", "Comma separated list of ports to scan. (e.g: '21,22,53')", ""],
["port-timeout", "Timeout (in sec) for port 80.", "0.3"], ["threads", "Number of threads to run.", "50"],
["verbose", "Show verbose output.", "true"]]
return options
Expand All @@ -38,10 +41,12 @@ def createIPList(network):
ipList.append(x)
return ipList


def print1(data):
if verbose:
print("\033[K" + data)


def checkServer(address, port):
s = socket.socket()
s.settimeout(float(portTimeout))
Expand All @@ -56,6 +61,7 @@ def checkServer(address, port):
s.close()
return "FAIL"


def writeToFile(line):
file = open(fileName, "a")
file.write(line)
Expand Down Expand Up @@ -112,7 +118,8 @@ def scan(i):

def core(moduleOptions):
print(
"\n" + GREEN + "MANUAL module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][2] + GREEN + "'...\n")
"\n" + GREEN + "MANUAL module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][
2] + GREEN + "'...\n")

global status
global fileName
Expand Down Expand Up @@ -200,9 +207,9 @@ def core(moduleOptions):
break
statusWidget()
except KeyboardInterrupt:
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False

Expand Down
39 changes: 27 additions & 12 deletions modules/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[1;94m', '\033[1;91m', '\33[1;97m', '\33[1;93m', '\033[1;35m', '\033[1;32m', '\033[0m'


class ThreadManager(object):
i = 0

Expand All @@ -25,6 +26,7 @@ def getNextIp(self):
def getID(self):
return self.i + 1


def checkMongo(host, port):
try:
con = pymongo.MongoClient(host=host, port=port, connectTimeoutMS=mongoTimeout)
Expand All @@ -49,11 +51,14 @@ def checkMongo(host, port):

return ["success", serverVersion, dbs]


def coreOptions():
options = [["network", "IP range to scan", ""], ["port", "Port to scan.", "27017"],
["port-timeout", "Timeout (in sec) for port 80.", "0.3"], ["mongo-timeout", "Timeout (in sec) for the database connection.", "3"],
["port-timeout", "Timeout (in sec) for port 80.", "0.3"],
["mongo-timeout", "Timeout (in sec) for the database connection.", "3"],
["threads", "Number of threads to run.", "50"],
["checkauth", "Connect to the server and perform tests.", "true"], ["verbose", "Show verbose output.", "true"]]
["checkauth", "Connect to the server and perform tests.", "true"],
["verbose", "Show verbose output.", "true"]]
return options


Expand All @@ -64,10 +69,12 @@ def createIPList(network):
ipList.append(x)
return ipList


def print1(data):
if verbose:
print("\033[K" + data)


def checkServer(address, port):
s = socket.socket()
s.settimeout(float(portTimeout))
Expand Down Expand Up @@ -128,11 +135,13 @@ def scan(i):
if mongo[0] == "conection-error":
mongoStatus = False
mongoStatusReason = "CONNECTION ERROR"
print1(RED + "[!] Failed connecting to the database on '" + stringIP + "'. ERROR: " + mongoStatusReason + END)
print1(
RED + "[!] Failed connecting to the database on '" + stringIP + "'. ERROR: " + mongoStatusReason + END)
elif mongo[0] == "permission-error":
mongoStatus = False
mongoStatusReason = "PERMISSION ERROR"
print1(RED + "[!] Failed connecting to the database on '" + stringIP + "'. ERROR: " + mongoStatusReason + END)
print1(
RED + "[!] Failed connecting to the database on '" + stringIP + "'. ERROR: " + mongoStatusReason + END)
elif mongo[0] == "success":
mongoStatus = True
version = mongo[1]
Expand All @@ -146,16 +155,21 @@ def scan(i):
else:
dbsList = "-"

print1(GREEN + "[+] Open database found:\n\tIP: " + stringIP + "\n\t" + "MongoDB version: " + str(version) + "\n\tDB's: " + dbsList + "\n")
print1(
GREEN + "[+] Open database found:\n\tIP: " + stringIP + "\n\t" + "MongoDB version: " + str(
version) + "\n\tDB's: " + dbsList + "\n")

else:
print1(RED + "[!] Failed connecting to the database on '" + stringIP + "'. ERROR: " + mongoStatusReason + END)
print1(
RED + "[!] Failed connecting to the database on '" + stringIP + "'. ERROR: " + mongoStatusReason + END)
mongoStatus = False

if mongoStatus:
logLine = stringIP + " - " + str(port) + " OPEN" + " - " + "OPEN DATABASE - Version: " + version + " - " + " DB's: " + dbsList + "\n"
logLine = stringIP + " - " + str(
port) + " OPEN" + " - " + "OPEN DATABASE - Version: " + version + " - " + " DB's: " + dbsList + "\n"
else:
logLine = stringIP + " - " + str(port) + " OPEN" + " - DB SCAN ERROR: " + mongoStatusReason + "\n"
logLine = stringIP + " - " + str(
port) + " OPEN" + " - DB SCAN ERROR: " + mongoStatusReason + "\n"
logLines.append(logLine)
else:
logLine = stringIP + " - " + str(port) + " OPEN\n"
Expand All @@ -169,7 +183,8 @@ def scan(i):

def core(moduleOptions):
print(
"\n" + GREEN + "MONGODB module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][2] + GREEN + "'...\n")
"\n" + GREEN + "MONGODB module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][
2] + GREEN + "'...\n")

global status
global fileName
Expand Down Expand Up @@ -260,9 +275,9 @@ def core(moduleOptions):
break
statusWidget()
except KeyboardInterrupt:
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False

Expand Down
2 changes: 2 additions & 0 deletions modules/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[1;94m', '\033[1;91m', '\33[1;97m', '\33[1;93m', '\033[1;35m', '\033[1;32m', '\033[0m'


class ThreadManager(object):
i = 0

Expand All @@ -25,6 +26,7 @@ def getNextIp(self):
def getID(self):
return self.i + 1


def checkSQL(host, port):
loginFail = False
try:
Expand Down
16 changes: 11 additions & 5 deletions modules/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[1;94m', '\033[1;91m', '\33[1;97m', '\33[1;93m', '\033[1;35m', '\033[1;32m', '\033[0m'


class ThreadManager(object):
i = 0

Expand All @@ -26,9 +27,11 @@ def getNextIp(self):
def getID(self):
return self.i + 1


def coreOptions():
options = [["network", "IP range to scan", ""], ["port-timeout", "Timeout (in sec) for port 80.", "0.3"],
["title-timeout", "Timeout (in sec) for title resolve.", "3"], ["threads", "Number of threads to run.", "50"],
["title-timeout", "Timeout (in sec) for title resolve.", "3"],
["threads", "Number of threads to run.", "50"],
["verbose", "Show verbose output.", "true"]]
return options

Expand All @@ -40,10 +43,12 @@ def createIPList(network):
ipList.append(x)
return ipList


def print1(data):
if verbose:
print("\033[K" + data)


def checkServer(address, port):
s = socket.socket()
s.settimeout(float(portTimeout))
Expand Down Expand Up @@ -174,7 +179,8 @@ def scan(i):

def core(moduleOptions):
print(
"\n" + GREEN + "PRINTER module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][2] + GREEN + "'...\n")
"\n" + GREEN + "PRINTER module by @xdavidhu. Scanning subnet '" + YELLOW + moduleOptions[0][
2] + GREEN + "'...\n")

global status
global fileName
Expand Down Expand Up @@ -245,9 +251,9 @@ def core(moduleOptions):
break
statusWidget()
except KeyboardInterrupt:
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False
print("\n" + RED + "[I] Stopping..." + END)
stop = True
verbose = False

Expand Down
Loading