Exemple #1
0
def ack(args):
    if not args.ip:
        colors.error('Please enter an IP address for scanning')
        LOGGER.error('[-] Please enter an IP address for scanning')
        sys.exit(1)
    try:
        colors.info('Initiating TCP ACK Scan')

        from lib.port_scanner import port_scanner

        portScanObj = port_scanner.PortScanner(ip=args.ip,
                                               start_port=args.start_port,
                                               end_port=args.end_port,
                                               threads=args.threads,
                                               source_port=args.source_port)
        portScanObj.tcp_ack_scan()
    except ImportError:
        colors.error('Could not import the required module.')
        LOGGER.error('[-] Could not import the required module.')
    except Exception as e:
        LOGGER.error(e)
Exemple #2
0
            LOGGER.error('[-] Could not import the required module.')
        except Exception as e:
            LOGGER.error(e)

    if args.fin:
        if not args.ip:
            colors.error('Please enter an IP address for scanning')
            LOGGER.error('[-] Please enter an IP address for scanning')
            sys.exit(1)
        try:
            colors.info('Initiating FIN Scan')

            from lib.port_scanner import port_scanner

            portScanObj = port_scanner.PortScanner(ip=args.ip, start_port=args.start_port,
                                                   end_port=args.end_port, threads=args.threads,
                                                   source_port=args.source_port)
            portScanObj.fin_scan()
        except ImportError:
            colors.error('Could not import the required module')
            LOGGER.error('[-] Could not import the required module')
            sys.exit(1)
        except Exception as e:
            LOGGER.error(e)

    if args.null:
        if not args.ip:
            colors.error('Please enter an IP address for scanning')
            LOGGER.error('[-] Please enter an IP address for scanning')
            sys.exit(1)
        try: