mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-20 23:37:00 +08:00
Merge pull request #8 from CameronNemo/patch-1
Improve usage() when installed in /usr/bin
This commit is contained in:
commit
a6a03d309f
|
@ -3,6 +3,7 @@
|
||||||
import string
|
import string
|
||||||
import httplib
|
import httplib
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
from socket import *
|
from socket import *
|
||||||
import re
|
import re
|
||||||
import getopt
|
import getopt
|
||||||
|
@ -26,6 +27,11 @@
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
|
|
||||||
|
comm = os.path.basename(sys.argv[0])
|
||||||
|
|
||||||
|
if os.path.dirname(sys.argv[0]) == os.getcwd():
|
||||||
|
comm = "./" + comm
|
||||||
|
|
||||||
print "Usage: theharvester options \n"
|
print "Usage: theharvester options \n"
|
||||||
print " -d: Domain to search or company name"
|
print " -d: Domain to search or company name"
|
||||||
print """ -b: data source:
|
print """ -b: data source:
|
||||||
|
@ -52,10 +58,10 @@ def usage():
|
||||||
print " -h: use SHODAN database to query discovered hosts"
|
print " -h: use SHODAN database to query discovered hosts"
|
||||||
print " google 100 to 100, and pgp doesn't use this option)"
|
print " google 100 to 100, and pgp doesn't use this option)"
|
||||||
print "\nExamples:"
|
print "\nExamples:"
|
||||||
print " ./theharvester.py -d microsoft.com -l 500 -b google"
|
print " " + comm + " -d microsoft.com -l 500 -b google"
|
||||||
print " ./theharvester.py -d microsoft.com -b pgp"
|
print " " + comm + " -d microsoft.com -b pgp"
|
||||||
print " ./theharvester.py -d microsoft -l 200 -b linkedin"
|
print " " + comm + " -d microsoft -l 200 -b linkedin"
|
||||||
print " ./theHarvester.py -d apple.com -b googleCSE -l 500 -s 300\n"
|
print " " + comm + " -d apple.com -b googleCSE -l 500 -s 300\n"
|
||||||
|
|
||||||
def start(argv):
|
def start(argv):
|
||||||
if len(sys.argv) < 4:
|
if len(sys.argv) < 4:
|
||||||
|
|
Loading…
Reference in a new issue