#####################################
# Portscan TCP #
# #
#####################################
# -*- coding: utf-8 -*-
#!/usr/bin/python3
import socket
ip = input("Digite o IP ou endereco: ")
ports = []
count = 0
while count < 10:
ports.append(int(input("Digite a porta: ")))
count += 1
for port in ports:
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.settimeout(0.05)
code = client.connect_ex((ip, port)) #conecta e traz a msg de erro
#Like connect(address), but return an error indicator instead of raising an exception for errors
if code == 0: #0 = Success
print (str(port) + " -> Porta aberta")
else:
print (str(port) + " -> Porta fechada")
print ("Scan Finalizado")
上面的python腳本是TCP掃描。我如何將其更改爲TCP SYN掃描?如何使用方法(TCP SYN)創建端口掃描程序TCP SYN?如何使用方法(TCP SYN)創建端口掃描程序TCP SYN?
嗯,這不僅僅是試圖連接不同的一點。你將不得不採取自己的方法,並提出一個*精確的問題! –