-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathscan_googlehacks.py
More file actions
35 lines (21 loc) · 982 Bytes
/
scan_googlehacks.py
File metadata and controls
35 lines (21 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This is other simple python code which ca help scanning some hacks with google in faster and time saving manner
# the script recieves an input argument from the user and displays the important information regarding the hacks to the user
# can be found usefull in some cases
import re # regex --regular expression operation handling library in python....USED HERE FOR THE PATTERN MATCHING HIGHLY NEEDED HERE!!!
import sys
import google
import urllib2
if len(sys.argv) < 2: # argument count validation supplied by the user
print sys.argv[0] + ": <dict>"
sys.exit(2)
fo = open(sys.argv[1])
for word in fo.readlines():
print "\n searching the " + word.strip()
result = google.search(word.strip())
try:
for implink in results:
if re.search("youtube", implink) == None: print implink
except urllib2.HTTPError, e:
print "Search not found : " + str(e)
# program ends
# happy hacking :)