python - SYN Port Scanner Script: "Mac address to reach destination not found. Using Broadcast" error -


I am writing a SYN port scanner in Python with scp. There are no syntax errors, but unable to send any packets to any destination when I run the script.

Enter image details here

this code

  #! / Usr / bin / python #, 'argparse' module user-Freindly command-line interface #it Automatically generates messages and problems on invalid arguments and use argParser = argparse.ArgumentParser (Description = 'A host of For 'TCP SNN Scanner') argParser.add_argument ('- version', '- V', action = 'version', version = '% (progamy) s version 1.0.0') argParser.add_argument ('host' Metavar = 'host', type = str, help = 'Hostname or IP to scan.') ArgParser.add_argument ('- p', metavar = 'port', nargs = 2, type = str, help = ' Ert range scan eg 80 443 ') argParser.add_argument (' -t ', metavar =' timeout ', type = float, help =' time to wait for ACK. ', Default = 1) argument = argParser.parse_args ( ) Print 'Scanning host% s'% (arguments.host) startPort = 1 endPort = 65535 if arguments.p! = None: # If we have arguments for port in the xrange, startPort = int (arguments.p [0]) is endPort = int (arguments.p [1]) (startPort, endPort +1): packet = SR1 ( IP (DST) = Arguments.host) / TCP (dport = port, flags = 's'), verbose = 0, timeout = arguments.) // error if packet: print ('Port% d is open!' )  

Enter image details here

Note: The second question with the same error is a completely different script. Please copy the duplicate Do not mark in the form.

im a fool you can not enter a public IP address because PAT is not applicable - Must be A, B or C He said that on the first sentence of the information para, where I

/ div>

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -