我想创建一个HTTP调用,其中包含指向localhost//dvwa的套接字/登录名.php. 如果我想要类似的场景www.google.com如何指向localhost/dvwa/登录名.php? 下面是我的代码和错误。我会非常感谢。在
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
target ="localhost//dvwa//login.php" #input("Enter URL:")"attack.samsclass.info"
s.connect((target,80))
#s.send(r"GET / HTTP/1.1\nHost:{}\n\n".format(target).encode())
print(s.recv(1024))
s.close()
以下代码片段可能对您有所帮助:
相关问题 更多 >
编程相关推荐