-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathFireOver.py
53 lines (49 loc) · 1.37 KB
/
FireOver.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import argparse
import re
import sys
from util.takeover import Takeover
from util.delete import deletepoc
from util.banner import banner
try:
from printy import printy,inputy
except:
print(banner)
print("Requirements Error ,Please install requirements from requirements.txt")
sys.exit()
printy(banner,predefined='n')
parser = argparse.ArgumentParser()
parser.add_argument('-u','--url',help="Firebase Database URL",dest='url')
parser.add_argument('-l','--list',help="Location of File having list of URL\'s",dest='list')
parser.add_argument('-o','--output',help="Location of Output file",dest='out')
parser.add_argument('-d','--delete',help="Enter POC file location to delete all pocs\'s",dest='delete')
args=parser.parse_args()
url=args.url
ifile=args.list
out=args.out
delete=args.delete
if not out:
out='poc.txt'
if args.url:
Takeover(url)
sys.exit()
elif args.list:
urls=[]
urls=open(ifile).read().splitlines()
f=open(out,'w+')
for url in urls:
temp=Takeover(url)
if(temp!=''):
f.write(temp+'\n')
else:
pass
f.close()
printy("\n\n[*]POC URLS file stored at:\t" + out,'y>')
sys.exit()
elif delete:
urls=[]
urls=open(delete).read().splitlines()
for url in urls:
deletepoc(url)
sys.exit()
else:
printy("Invalid arguments or Unknown Errors Please Submit the issue","r>")