-
Notifications
You must be signed in to change notification settings - Fork 24
/
old_grapX
23 lines (21 loc) · 1.22 KB
/
old_grapX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python
import pyfiglet
import sys
import os
ext = [".asp",".aspx",".cer",".cfm",".cfml",".rb",".php",".php3",".php4",".php5",".jsp",".json",".apk",".ods",".xls",".xlsm",".xlsx",".bak",".cab",".cpl",".dmp",".drv",".tmp",".sys",".doc",".docx",".pdf",".txt",".wpd",".bat",".bin",".cgi",".pl",".py",".exe",".gadget",".jar",".msi",".wsf",".csv",".dat",".db",".dbf",".log",".mdb",".sav",".sql",".tar",".xml",".7z",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".bin",".dmg",".iso",".toast",".vcd",".email",".eml",".emlx",".msg",".oft",".ost",".pst",".vcf",".shtm",".shtml",".phtm",".phtml",".jhtml",".conf",".yml",".config",".yaml",".wsdl",".java",".key",".html",".sh"]
length = len(ext)-1
print(pyfiglet.figlet_format("grapX"))
try:
args =sys.argv[1]
for i in range(0,length):
payload = ext[i]
print("===="+payload+" ====")
print("\n")
command = "cat "+args+" |"
command2 = ' \ '
space = command2.replace(" ", "")
final = command+" grep -i \'"+space+payload+space+">$\'"
os.system(final)
print("\n")
except IndexError:
print("./grapX file: Please Specify file!!")