Really simple code that just fires one pcap (packet) using scapy,
If I just want to do simple cgi-bin POSTS to myself to run a set of 10 easy tests why is this just kicking back as text (rather than a website). If I comment out the line
sendp(a, iface="em1")
Then the below code actually generates the website fine... but it won't actually send the packet, I imagine this is something with stdout.... suggestions are welcome!
#!/usr/local/bin/python
from scapy.all import *
#import v6tester_main
print "Content-type:text/html\r\n\r\n"
print '<html>'
print '<head>'
print '<title>NPD Automation Tool - GCT-USG</title>'
print '</head>'
print '<body>'
print '<font> NPD Automation Tool </font>'
a = Ether() / IP() / IPv6() / ICMPv6EchoRequest()
sendp(a, iface="em1")
print '<br>'
print '<font>End of Test</font>'
print '</body>'
print '</html>'
If I view source I see this->
<html>
<head>
<title>NPD Automation Tool - GCT-USG</title>
</head>
<body>
<font> NPD Automation Tool </font>
Sent 1 packets.
<br>
<font>End of Test</font>
</body>
</html>