-1

i need your help guys, well my idea is, after we press the enter v button to search for a site, i have to capture this packet and check it, i already did the "check part", the packet i am looking for is 'get' requests, i guess? so here is the code where i need help

from __future__ import print_function

def process_tcp_packet(packet):   
      #here i should stop the packet
      #after i captured the packet i am checking it(already have this part)
      #decide if i should delete the request packet or send it as i wished   
      return 

def main():
      #sniff(filter=, prn=process_tcp_packet)
      pass

after i sniff the packet how i am stopping the sending, like i need to stop the packet check it and then decide to send it as i wanted or delete the packet, can i do it?

Arun Karunagath
  • 1,593
  • 10
  • 24

1 Answers1

0

It is not possible to "stop" a packet using scapy:

Scapy only sniffs packets, which means get a copy of them as they are beeing sent. It is using some libraries to do so, and cannot force your OS to cancel the sending.

Cukic0d
  • 5,111
  • 2
  • 19
  • 48