def runmod(): command = notation.libc + " -r " + notation.pack_file + " -R " + notation.recon_packet + notation.sort_recon execute = os.popen(command).read() line = execute.split("\n") j = len(line) j = j - 2 a = 0 while (a <= j): k = line[a] no, type, sor, dst, month, date, year, time = k.split(",") source_mac_check = fakemaclib.mac_check(sor) dest_mac_check = fakemaclib.mac_check(dst) if (type == "0x08"): print source_mac_check + "(" + sor + ")" + "Sends a Beacon Frame to " + "(" + dst + ")" + dest_mac_check + " at " + time a = a + 1 elif (type == "0x00"): print Fore.MAGENTA + source_mac_check + "(" + sor + ")" + "Sends an Association request to " + "(" + dst + ")" + dest_mac_check + " at " + time + Style.RESET_ALL a = a + 1 elif (type == "0x01"): print source_mac_check + "(" + sor + ")" + "Sends a Association response to " + "(" + dst + ")" + dest_mac_check + " at " + time a = a + 1 elif (type == "0x04"): print source_mac_check + "(" + sor + ")" + "Sends a Probe request to " + "(" + dst + ")" + dest_mac_check + " at " + time a = a + 1 elif (type == "0x05"): print source_mac_check + "(" + sor + ")" + "Sends a Probe response to " + "(" + dst + ")" + dest_mac_check + "at " + time a = a + 1 else: a = a + 1
def runmod(): command=notation.libc+" -r "+ notation.pack_file +" -R "+ notation.recon_packet+ notation.sort_recon execute=os.popen(command).read() line=execute.split("\n") j=len(line) j=j-2 a=0 while(a<=j): k=line[a] no,type,sor,dst,month,date,year,time=k.split(",") source_mac_check=fakemaclib.mac_check(sor) dest_mac_check=fakemaclib.mac_check(dst) if(type=="0x08"): print source_mac_check+"("+sor+")"+"Sends a Beacon Frame to "+"("+dst+")"+dest_mac_check+ " at "+time a=a+1 elif(type=="0x00"): print Fore.MAGENTA+source_mac_check+"("+sor+")"+"Sends an Association request to "+"("+dst+")"+dest_mac_check+ " at "+time+Style.RESET_ALL a=a+1 elif(type=="0x01"): print source_mac_check+"("+sor+")"+"Sends a Association response to "+"("+dst+")"+dest_mac_check+ " at "+time a=a+1 elif(type=="0x04"): print source_mac_check+"("+sor+")"+"Sends a Probe request to "+"("+dst+")"+dest_mac_check+ " at "+time a=a+1 elif(type=="0x05"): print source_mac_check+"("+sor+")"+"Sends a Probe response to "+"("+dst+")"+dest_mac_check+ "at "+time a=a+1 else: a=a+1
def show_all_Deauth(): command=notation.libc+ " -r "+notation.pack_file+" -R "+notation.deauth+notation.sort_deauth execute=os.popen(command).read() line=execute.split("\n") j=len(line) j=j-2 print("No.of Packets\t\tSource\t\t\t\t\tDestination") print("=============\t\t======\t\t\t\t\t===========") while(j>=0): k=line[j] num,source,dest=k.split(",") smc=fakemaclib.mac_check(source) dmc=fakemaclib.mac_check(dest) if(dmc=="none" and dest!="ff:ff:ff:ff:ff:ff"): print(num+"\t\t\t"+source+"\t\t"+dest+"(Suspicious)"+Style.RESET_ALL) elif(dest=="ff:ff:ff:ff:ff:ff"): print(Style.DIM+num+"\t\t\t"+source+"\t\t\t"+dest+"(Broadcast)"+Style.RESET_ALL) else: print(Fore.RED+Style.BRIGHT+num+"\t\t\t"+source+"("+smc+")"+"\t\t"+dest+"("+dmc+")"+Style.RESET_ALL) j=j-1
def show_high_data(): command=notation.libc+ " -r "+notation.pack_file+" -R "+notation.data+notation.sort_data_count execute=os.popen(command). read() line=execute.split("\n") j=len(line) j=j-2 a=j max_bit=0 int(max_bit) print("No.of Packets\tSource\t\t\t\tDestination") print("=============\t======\t\t\t\t===========") while(a>=0): b=line[a] bits1,source1,dest1=b.split(",") #Match With the Broadcast Addresses and Multicast Addresses if(source1=="01:00:5e:00:00:01" or source1=="01:00:5e:00:00:02" or source1=="01:00:5e:00:00:01" or source1=="33:33:00:00:00:fb" or source1=="33:33:00:00:00:02" or source1=="33:33:00:00:00:01" or source1=="01:00:5e:00:00:fb" or source1=="01:00:5e:7f:ff:fa"): print(Style.DIM+bits1+"\t\t"+dest1+"\t\t"+source1+"(MultiCast)"+Style.RESET_ALL) elif(source1=="ff:ff:ff:ff:ff:ff"): print(Style.DIM+bits1+"\t\t"+dest1+"\t\t"+source1+"(Broadcast)"+Style.RESET_ALL) else: dest=fakemaclib.mac_check(dest1) sour=fakemaclib.mac_check(source1) print Fore.RED+Style.BRIGHT+bits1+"\t\t"+dest1+"("+dest+")"+"\t"+source1+"("+sour+")"+Style.RESET_ALL a=a-1
def show_all_Deauth(): command = notation.libc + " -r " + notation.pack_file + " -R " + notation.deauth + notation.sort_deauth execute = os.popen(command).read() line = execute.split("\n") j = len(line) j = j - 2 print("No.of Packets\t\tSource\t\t\t\t\tDestination") print("=============\t\t======\t\t\t\t\t===========") while (j >= 0): k = line[j] num, source, dest = k.split(",") smc = fakemaclib.mac_check(source) dmc = fakemaclib.mac_check(dest) if (dmc == "none" and dest != "ff:ff:ff:ff:ff:ff"): print(num + "\t\t\t" + source + "\t\t" + dest + "(Suspicious)" + Style.RESET_ALL) elif (dest == "ff:ff:ff:ff:ff:ff"): print(Style.DIM + num + "\t\t\t" + source + "\t\t\t" + dest + "(Broadcast)" + Style.RESET_ALL) else: print(Fore.RED + Style.BRIGHT + num + "\t\t\t" + source + "(" + smc + ")" + "\t\t" + dest + "(" + dmc + ")" + Style.RESET_ALL) j = j - 1