Python Forum
sending packet onto dummy network device but receiving echo
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sending packet onto dummy network device but receiving echo
#1
Hello,

I have created a dummy network device (command: ip link add mydevice type dummy). I'm sending and receiving packets there.
For some reason I receive my own packet which I have sent.
If I bind the same code to another physical network card, there is no echo. Any suggestions please?
Thanks,
I

SENDER:
with socket.socket(socket.AF_PACKET, socket.SOCK_RAW) as rs:
rs.bind(("mydevice", ETH_P_ALL))
sendbytes = rs.send(bpdu)

RECEIVER:
rs.bind(("mydevice", ETH_P_ALL))
buffer=rs.recvfrom(BUFFER_SIZE)[0].hex()
Reply
#2
Never mind. I was creating two separate threads each creating a separate socket.
But if using the same socket to receive and transmit, there is no echo....
Solved.
Reply
#3
It depends on what you are trying to do. If you are trying to create a web application, then you will need to use a web framework such as Django or Flask. If you are trying to create a desktop application, then you will need to use a GUI library such as Tkinter or PyQt. If you are trying to create a game, then you will need to use a game engine such as Pygame or Unity.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send a HTTP response packet using scapy JeffreyStoner 0 2,669 Apr-18-2022, 05:23 AM
Last Post: JeffreyStoner
  Send UDP packet after bind pacmyc 0 2,634 Mar-11-2021, 10:28 PM
Last Post: pacmyc
  Netmiko Program ssh from the Jumpssh ( host -> Jumphost -> Network Device matya0403 3 6,841 Jul-31-2020, 08:22 AM
Last Post: dtw
  python echo server kerzol81 2 2,725 Jan-16-2020, 06:01 PM
Last Post: codexcotechnologies
  help with sending and receiving pics taken mcgrim 9 5,951 Nov-06-2019, 07:45 PM
Last Post: mcgrim
  Need Help with creating an IP packet with timestamp field using Scapy RTD 0 3,487 Jun-15-2019, 08:21 PM
Last Post: RTD
  Need Help W/ Simple Packet Capture Code Caesars_10th 3 3,335 Mar-11-2019, 08:28 PM
Last Post: Larz60+
  Sending/Receiving Multiple Message from Server or Client Lyperion 0 10,466 Jul-30-2018, 07:52 AM
Last Post: Lyperion
  Copy data from 1 blk device in machine A to another blk device in machine B AbhishekV 2 3,421 Feb-01-2018, 11:40 AM
Last Post: DeaD_EyE
  Failed to recieve scapy udp packet SkyAmryBoi 1 3,814 Sep-29-2017, 01:26 PM
Last Post: camp0

Forum Jump:

User Panel Messages

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