1. Tim Tomes
  2. PeepingTom

Commits

Tim Tomes  committed 35315a8

Migrated from optparse to argparse and updated the readme file.

  • Participants
  • Parent commits 1ce619c
  • Branches master

Comments (0)

Files changed (2)

File README.md

View file
 
 ### Changelog
 
+01.03.14
+
+- migrated from optparse to argparse.
+
+12.13.13
+
+- fixed the indefinite timeout bug in the cURL command.
+
 11.07.13
 
 - added the ability to store and view the source code of each target.
-- changed the curl command to avoid using HEAD requests.
+- changed the cURL command to avoid using HEAD requests.
 
 08.09.13
 

File peepingtom.py

View file
         print '[!] PhantomJS and cURL required.'
         return
     # parse options
-    import optparse
+    import argparse
     usage = """
 
 PeepingTom - Tim Tomes (@LaNMaSteR53) (www.lanmaster53.com)
  - PhantomJS
  - cURL
 
-$ python ./%prog <mode> <path>"""
-    parser = optparse.OptionParser(usage=usage)
-    parser.add_option('-l', help='list input mode. path to list file.', dest='list_file', type='string', action='store')
-    parser.add_option('-x', help='xml input mode. path to Nessus/Nmap XML file.', dest='xml_file', type='string', action='store')
-    parser.add_option('-s', help='single input mode. path to target, remote URL or local path.', dest='target', type='string', action='store')
-    parser.add_option('-t', help='socket timeout in seconds. default is 8 seconds.', dest='timeout', type='int', action='store')
-    parser.add_option('-v', help='verbose mode', dest='verbose', action='store_true', default=False)
-    parser.add_option('-b', help='open results in browser', dest='browser', action='store_true', default=False)
-    (opts, args) = parser.parse_args()
+$ python ./%(prog)s <mode> <path>"""
+    parser = argparse.ArgumentParser(usage=usage)
+    parser.add_argument('-l', help='list input mode. path to list file.', dest='list_file', action='store')
+    parser.add_argument('-x', help='xml input mode. path to Nessus/Nmap XML file.', dest='xml_file', action='store')
+    parser.add_argument('-s', help='single input mode. path to target, remote URL or local path.', dest='target', action='store')
+    parser.add_argument('-t', help='socket timeout in seconds. default is 8 seconds.', dest='timeout', type=int, action='store')
+    parser.add_argument('-v', help='verbose mode', dest='verbose', action='store_true', default=False)
+    parser.add_argument('-b', help='open results in browser', dest='browser', action='store_true', default=False)
+    opts = parser.parse_args()
 
     # process options
     if opts.list_file: