- This topic has 3 replies, 2 voices, and was last updated 5 years, 5 months ago by .
- You must be logged in to reply to this topic.
Hello, when i run this code:
#!/usr/bin/env python
import scapy.all as scapy
from scapy.layers import http
def sniff(interface):
scapy.sniff(iface=interface, store=False, prn=process_sniff_packet)
def process_sniff_packet(packet):
if packet.haslayer(http.HTTPRequest):
if packet.haslayer(scapy.Raw):
print(packet[scapy.Raw].load)
sniff("eth0")
i get this:
root@kali:~/PycharmProjects/packet_sniffer# python packet_sniffer1.py
0R0P0N0L0J0 +�BF0�’��p���s�_f8����n�ϛ�`���} �+���x��CU
0R0P0N0L0J0 +�BF0�’��p���s�_f8����n�ϛ�`���} �+�lh�(m�CU%
0R0P0N0L0J0 +�BF0�’��p���s�_f8����n�ϛ�`���} �+���x��CU
0Q0O0M0K0I0 +�BF0�’��p���s�_f8����n�ϛ�`���} �+/w�[_)�CU
0R0P0N0L0J0 +��cR�I�
�{�����;��{��2]�7r��\�&�Gy��k� U��� ��%
Before importing “from scapy.layers import http” it was working fine.
Can you please help?
Hi!
Are you testing in the local host?
Which sites are you using for the tests?
Let me know.
Diego
Hi Diego I sorted it thanks!
Hi Peter!
Cool you got it!
Diego
Not a member yet? Register now
Are you a member? Login now
Enroll in this course to access this lesson!
All of our courses include:
✔ Lifetime, unlimited access to course materials & training videos.
✔ Verifiable certificate of completion from zSecurity, signed by the course instructor, Zaid.
✔ Get answers from our Support Team within a maximum of 15 hours.
✔ Unlimited Updates.
Get free 1 month VIP membership per course with:
✔ Live mentorship and Q&A session with the course instructor, Zaid.
✔ Instant support from community members through our private discord channel.
✔ Daily updates with the latest tutorials & news in the hacking world.
✔ Daily resources like CTFs, bug bounty programs, onion services and more!
✔ Access our VIP community & connect with like-minded people.
✔ Discounts on other zSecurity products and services.