LoveHecate

[PYTHON] Centos Zmap Installation

Jul 22nd, 2017
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. #!/usr/bin/python
  2. #Centos 6 Zmap Installation
  3.  
  4. import time, subprocess
  5.  
  6. def system(cmd):
  7.    subprocess.call(cmd, shell=True)
  8.    
  9. print ("Installing Zmap For Centos 6")
  10. time.sleep(2)
  11.  
  12. system ("yum update -y")
  13. system ("yum install gcc cmake gmp gmp-devel libpcap-devel gengetopt byacc flex -y")
  14. system ("yum install json-c-doc.noarch json-c.i686 json-c.x86_64 json-c-devel.i686 json-c-devel.x86_64 -y")
  15. system ("yum install epel-release -y")
  16. system ("yum install gengetopt -y")
  17. system ("wget -q https://github.com/zmap/zmap/archive/v2.1.0.tar.gz")
  18. system ("tar -xvf v2.1.0.tar.gz")
  19. system ("cd zmap-2.1.0")
  20. system ("flex -o \"src/lexer.c\" --header-file=\"src/lexer.h\" \"src/lexer.l\"")
  21. system ("byacc -d -o \"src/parser.c\" \"src/parser.y\"")
  22. system ("mkdir /etc/zmap")
  23. system ("cp conf/* /etc/zmap")
  24. system ("cmake -DENABLE_HARDENING=ON")
  25. system ("make")
  26. system ("make install")
  27.  
  28. print ("Done Installing Zmap For Centos ! Coded By: Love Hecate")
Advertisement
Add Comment
Please, Sign In to add comment