When I run the following inside of Scapy I get the following output:
>>> sp=RandShort()
>>> dp=8000
>>> s=socket.socket()
>>> s.connect(("192.168.0.2",dp))
>>> ss=StreamSocket(s,Raw)
>>> ss.sr1(Raw("GET / HTTP/1.1\r\n\r\n"))
Begin emission:
Finished sending 1 packets.
*
Received 1 packets, got 1 answers, remaining 0 packets
<Raw load='HTTP/1.0 200 OK\r\nServer: SimpleHTTP/0.6 Python/2.7.18\r\nDate: Fri, 23 Sep 2022 17:59:57 GMT\r\nContent-type: text/html\r\nContent-Length: 167\r\nLast-Modified: Fri, 23 Sep 2022 14:49:46 GMT\r\n\r\n<!DOCTYPE html>\n<html>\n<title>Test Server</title>\n<head>\n</head>\n<body>\n<h1>This is a test server</h1>\n<div>hello,goodbye,goodmorning,goodnight.</div>\n</body>\n</html>\n' |>
But when I run in a python script, I get no Raw load output.
How can I print the Raw load output with my python script? Even better, is there a way scapy can auto format it?