Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # obtain target IP and options
- visualize = ''
- target_ip = ''
- def usage():
- print '-h for help'
- print '-t for target IP'
- try:
- opts, args = getopt.getopt(sys.argv[1:], "ht:vd", ["help", "targetip=", "visualize", "debug"])
- except getopt.GetoptError:
- usage()
- print 'err'
- sys.exit(2)
- for opt, arg in opts:
- if opt in ("-h", "--help"):
- usage()
- print 'help help'
- sys.exit()
- elif opt in ("-t", "--targetip"):
- target_ip = arg
- elif opt in ('-v', '--visualize'):
- visualize = True
- elif opt in ('-d', '--debug'):
- global _debug
- _debug = 1
- if visualize:
- print 'visualize'
- else:
- print 'no v'
- if target_ip == '':
- print 'Shall we indicate target AP or Ctrllr IP'
- sys.exit()
- else:
- print target_ip
Advertisement
Add Comment
Please, Sign In to add comment