Python Forum
How to send a HTTP response packet using scapy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to send a HTTP response packet using scapy
#1
How would I use scapy 2.4.3+ to spoof a http response? I tried using the packet below, however on the target machine (which has been arp spoofed, where the machine of the spoofer does not have port fowarding, resulting in the http request having to be answered by the spoofed packet, that is what I am trying to do), the provided HTML from the packet does not get rendered, once its sent using scapy.send(packet). So how would I adapt the packet below, to send a HTTP packet that would render on the target machine?

packet = scapy.IP(src=server_ip, dst=target_ip)/scapy.TCP() / HTTP() / HTTPResponse(Server=server_ip) / "<html><p>Hi</p></html>"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Scapy Basics Shivi 0 956 Sep-25-2023, 07:37 AM
Last Post: Shivi
  sending packet onto dummy network device but receiving echo sabuzaki 2 1,456 Feb-12-2023, 10:31 AM
Last Post: Vadanane
  How to get every IP found by a Scapy traceroute? jao 0 2,463 Feb-06-2022, 01:00 AM
Last Post: jao
  scapy wifi scan to get payload \ data korenron 0 2,157 Nov-16-2021, 01:47 PM
Last Post: korenron
  Send UDP packet after bind pacmyc 0 2,639 Mar-11-2021, 10:28 PM
Last Post: pacmyc
  can I set scan interval for scapy? korenron 0 2,335 Dec-31-2020, 01:43 PM
Last Post: korenron
  scapy trazom 1 2,642 Aug-30-2020, 04:17 PM
Last Post: micseydel
  network and scapy trazom 0 2,071 Aug-16-2020, 03:54 PM
Last Post: trazom
  Need Help with creating an IP packet with timestamp field using Scapy RTD 0 3,490 Jun-15-2019, 08:21 PM
Last Post: RTD
  Need Help W/ Simple Packet Capture Code Caesars_10th 3 3,337 Mar-11-2019, 08:28 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020