aioportscan.py 506 B

1234567891011121314151617181920
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. @Author: hywell
  5. @Email: hywell.28@gmail.com
  6. @Blog: iassas.com
  7. @Date: 2019/10/17 10:51
  8. """
  9. from lib.controller.aionmap import *
  10. from lib.core.setting import NMAP_CONF
  11. from lib.core.setting import CONF, SUDO_PASSWORD
  12. async def portScan(current_target):
  13. scanner = PortScanner()
  14. result = await scanner.scan(current_target, arguments=NMAP_CONF[CONF.level][0], sudo=True,
  15. sudo_passwd=SUDO_PASSWORD)
  16. return result