-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflower.py
67 lines (53 loc) · 1.86 KB
/
flower.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import colorama
import sys
# Browsers
from decryptors import Chrome, OperaGX, Firefox, Opera
browsers = [
Chrome.Chrome(),
OperaGX.OperaGX(),
Firefox.Firefox(),
Opera.Opera()
]
colorama.init(True)
version = 0.2
print(colorama.Fore.GREEN + """
$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
$ _____.__ $
$ _/ ____\ | ______ _ __ ___________ $
$ \ __\| | / _ \ \/ \/ // __ \_ __ \\ $
$ | | | |_( <_> ) /\ ___/| | \/ $
$ |__| |____/\____/ \/\_/ \___ >__| $
$ \/ $
$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
""")
print(f"- Build of Flower: {colorama.Fore.GREEN}{version}\n")
# Few allowed write types:
# 1. txt
# 2. csv
save_type = sys.argv[sys.argv.index("-type") + 1]
def WriteCookies(name, storage):
out = ""
match save_type:
case "txt":
for data in storage:
host = data["host"]
name2 = data["name"]
value = data["value"]
out += f"{host} | {name2} | {value}\n"
case "csv":
out += "Host, Name, Value\n\n"
for data in storage:
host = data["host"]
name2 = data["name"]
value = data["value"]
out += f"{host}, {name2}, {value}\n"
case _:
print(f"{colorama.Fore.RED}bro selected unknown output type :skull:")
exit()
with open(f"{name}.{save_type}", "w") as file:
file.write(out)
for browser in browsers:
if f"-{browser.GetBrowser().lower()}" in sys.argv:
data = browser.Decrypt()
WriteCookies(browser.GetBrowser(), data)
print(f"[+] {colorama.Fore.GREEN}Total {browser.GetBrowser()} cookies: {colorama.Fore.WHITE}{len(data)}")