Permalink
Browse files

minor scapy noodling

  • Loading branch information...
1 parent 9f2265b commit cf5cda01485afa0ccdcdf2452b151a2a9d7566b0 @ShepardSiegel committed Apr 9, 2012
Showing with 6 additions and 4 deletions.
  1. +2 −2 bin/dcp_tool.py
  2. +4 −2 bin/send_dcp.py
View
@@ -29,10 +29,10 @@ def main(argv):
#p.payload = "\x00\x0E\x00\x00\x1F\x06\x00\x00\x00\x24\x00\x00\x00\x02" # 14B Write 0x24 with 0x00000002
p.payload = "\x00\x0A\x00\x00\x2F\x07\x00\x00\x00\x24" # 10B Read 0x24
print "Sending packet..."
- rp = srp(p, iface="eth1")
+ rp = srp1(p, iface="eth1")
print "Got back"
#print rp
- #rp.show
+ rp.show()
prog_name = os.path.basename(sys.argv[0])
View
@@ -18,10 +18,12 @@ def main(argv):
p.dst = '00:0A:35:42:01:00' # Xilinx FPGA Dest MAC Address
p.type = 0xF040 # EtherType TCP
#p.payload = "\x00\x0A\x00\x00\x0F\x05\x80\x00\x00\x01" # 10B NOP
- p.payload = "\x00\x0E\x00\x00\x1F\x06\x00\x00\x00\x24\x00\x00\x00\x02" # 14B Write 0x24 with 0x00000002
+ p.payload = "\x00\x0E\x00\x00\x1F\x06\x00\x00\x00\x24\x00\x00\x00\x03" # 14B Write 0x24 with 0x00000002
#p.payload = "\x00\x0A\x00\x00\x2F\x07\x00\x00\x00\x24" # 10B Read 0x24
print "Sending packet..."
- sendp(p, iface="eth1")
+ r = srp(p, iface="eth1")
+ print r
+ print 'r is a ' + str(type(r))
prog_name = os.path.basename(sys.argv[0])

0 comments on commit cf5cda0

Please sign in to comment.