diff --git a/README.md b/README.md index ed5ce14..a487670 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- + @@ -53,15 +53,15 @@ The goal of this project is to find out the fake access points opened by the WiF * **Hardware:** TP LINK TL-WN722N * **Modules:** scapy, time, termcolor, argparse, commands, netifaces, logging -#### Kali Linux: +#### Parrot OS or Kali Linux: Download pisavar: -`git clone https://github.com/WiPi-Hunter/PiSavar.git` +`git clone https://github.com/xcod3/PiSavar.git` Install Python librarie(s): -`pip install termcolor` +`pip3 install termcolor` It's done! @@ -83,7 +83,7 @@ Run: ```python cd PiSavar -python pisavar.py -h +python3 pisavar.py -h ``` ### Screenshots @@ -94,7 +94,8 @@ python pisavar.py -h ### Demo Video -+ new: https://www.youtube.com/watch?v=zJZkPz9ZPMk ++ new: update: https://youtu.be/82t14LtWbWE ++ old: https://www.youtube.com/watch?v=zJZkPz9ZPMk + old: https://youtu.be/P7mfh37NZc0 ### Authors diff --git a/images/attack.png b/images/attack.png deleted file mode 100644 index b73a6b8..0000000 Binary files a/images/attack.png and /dev/null differ diff --git a/images/dosnew.png b/images/dosnew.png deleted file mode 100644 index 5a03c5c..0000000 Binary files a/images/dosnew.png and /dev/null differ diff --git a/images/help.png b/images/help.png index bf46e8c..866bc7f 100644 Binary files a/images/help.png and b/images/help.png differ diff --git a/images/pisavar_attack.png b/images/pisavar_attack.png index 98a9d16..64e7923 100644 Binary files a/images/pisavar_attack.png and b/images/pisavar_attack.png differ diff --git a/images/pisavar_detect.png b/images/pisavar_detect.png index 87dee3c..5b54bbe 100644 Binary files a/images/pisavar_detect.png and b/images/pisavar_detect.png differ diff --git a/images/pisavar_log2.png b/images/pisavar_log2.png index 023bc63..1f5e0f6 100644 Binary files a/images/pisavar_log2.png and b/images/pisavar_log2.png differ diff --git a/images/pisavarnew.png b/images/pisavarnew.png deleted file mode 100644 index eaca79b..0000000 Binary files a/images/pisavarnew.png and /dev/null differ diff --git a/pisavar.py b/pisavar.py index d2dd728..287ef53 100644 --- a/pisavar.py +++ b/pisavar.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # coding=utf-8 # Modulles @@ -6,7 +7,7 @@ import argparse from termcolor import colored from argparse import RawTextHelpFormatter -import commands +import subprocess import netifaces from scapy.all import * from termcolor import colored @@ -38,7 +39,7 @@ the attacking device. -Pisavar Methods = +Pisavar Methods: 1 : Identify and log only PineAP activities 2 : Identify, attack and log PineAP activities @@ -50,7 +51,6 @@ parser.add_argument('-i', '--interface',required=True, help="Interface (Monitor Mode)", type=str) args = parser.parse_args() - def logging(log): with open("/var/log/pisavar.log", "a") as f: f.write(str(log)+"\n") @@ -82,21 +82,21 @@ def pp_analysis(info_list, pp, pisavar_method): """ for i in info_list: bssid, ssid= i.split("=*=") - if bssid not in pp.keys(): + if bssid not in list(pp.keys()): pp[bssid] = [] pp[bssid].append(ssid) - elif bssid in pp.keys() and ssid not in pp[bssid]: + elif bssid in list(pp.keys()) and ssid not in pp[bssid]: pp[bssid].append(ssid) """ Detects networks opened by PineAP Suite. """ - for v in pp.keys(): + for v in list(pp.keys()): if len(pp[v]) >= 2 and v not in blacklist: - print colored("\033[1m[*] PineAP module activity was detected.", 'magenta', attrs=['reverse', 'blink']) - print "\033[1m[*] MAC Address : ", v - print "\033[1m[*] FakeAP count: ", len(pp[v]) - log_time = time.strftime("%c") + print(colored("\033[1m[*] PineAP module activity was detected.", 'magenta', attrs=['reverse', 'blink'])) + print("\033[1m[*] MAC Address : ", v) + print("\033[1m[*] FakeAP count: ", len(pp[v])) + log_time = time.strftime("%c") blacklist.append(v) if pisavar_method == "2": pp_deauth(blacklist) @@ -122,7 +122,7 @@ def pp_deauth(blacklist): Starts deauthentication attack for PineAP Suite. """ attack_start = "[*] Attack has started for " + str(blacklist) - print colored(attack_start, 'red', attrs=['reverse', 'blink']) + print(colored(attack_start, 'red', attrs=['reverse', 'blink'])) time.sleep(2) channel = 1 for target in blacklist: @@ -131,31 +131,31 @@ def pp_deauth(blacklist): deauth = RadioTap() / Dot11(addr1="ff:ff:ff:ff:ff:ff", addr2=target.lower(), addr3=target.lower()) / Dot11Deauth() sendp(deauth, iface=iface, count=120, inter=.2, verbose=False) time.sleep(1) - print colored("[*] Attack has completed..", 'green', attrs=['reverse', 'blink']) + print(colored("[*] Attack has completed..", 'green', attrs=['reverse', 'blink'])) time.sleep(2) - if __name__ == '__main__': path = "/var/log/pisavar/pisavar.log" + os.system("reset") + now = time.strftime("%c") + print(banner_intro) + print(DESCRIPTION) iface = args.interface mode = "Monitor" pisavar_method = args.attack_method - os.system("reset") - now = time.strftime("%c") - print banner_intro - print "Information about test:" - print "----------"*5 - print "[*] Start time: ", now - print "[*] Detects PineAP module activity and starts deauthentication attack \n (for fake access points - WiFi Pineapple Activities Detection) " - print "------------"*7 + print("Information about test:") + print("----------"*5) + print("[*] Start time: ", now) + print("[*] Detects PineAP module activity and starts deauthentication attack \n (for fake access points - WiFi Pineapple Activities Detection) ") + print("------------"*7) while True: - time.sleep(10) - channel = 0 - blacklist = [] - info_list = [] - pp = {} - sniff_channel_hop(iface) - blacklist = pp_analysis(info_list, pp, pisavar_method) - time.sleep(2) - if len(blacklist)!=0: - print "--------"*5 + time.sleep(10) + channel = 0 + blacklist = [] + info_list = [] + pp = {} + sniff_channel_hop(iface) + blacklist = pp_analysis(info_list, pp, pisavar_method) + time.sleep(2) + if len(blacklist)!=0: + print("--------"*5) \ No newline at end of file