enotkrutoy commited on
Commit
b7c1b6a
1 Parent(s): 2a39575

Update GVA_gui.py

Browse files
Files changed (1) hide show
  1. GVA_gui.py +55 -183
GVA_gui.py CHANGED
@@ -1,183 +1,55 @@
1
- import tkinter as tk
2
- import json
3
- from dotenv import load_dotenv
4
- import customtkinter
5
- import os
6
- from components.dns_recon import DNSRecon
7
- from components.geo import geo_ip_recon
8
- from components.port_scanner import NetworkScanner
9
- from components.jwt import JWTAnalyzer
10
- from components.packet_analysis import PacketAnalysis
11
- from components.subdomain import SubEnum
12
-
13
- list_loc = "lists//default.txt"
14
- load_dotenv()
15
- gkey = os.getenv('GEOIP_API_KEY')
16
- akey = os.getenv('OPENAI_API_KEY')
17
- bkey = os.getenv('BARD_API_KEY')
18
- lkey = os.getenv('RUNPOD_API_KEY')
19
- lendpoint = os.getenv('RUNPOD_ENDPOINT_ID')
20
-
21
- dns_enum = DNSRecon()
22
- geo_ip = geo_ip_recon()
23
- packet_analysis = PacketAnalysis()
24
- port_scanner = NetworkScanner()
25
- jwt_analyzer = JWTAnalyzer()
26
- sub_recon = SubEnum()
27
-
28
- customtkinter.set_appearance_mode("dark")
29
- customtkinter.set_default_color_theme("dark-blue")
30
-
31
- root = customtkinter.CTk()
32
- root.title("GVA - GUI")
33
- root.geometry("800x400")
34
-
35
- paned_window = tk.PanedWindow(root, orient="horizontal")
36
- paned_window.pack(fill="both", expand=True)
37
- input_frame = customtkinter.CTkFrame(paned_window, width=400)
38
- output_frame = customtkinter.CTkFrame(paned_window, width=400)
39
- paned_window.add(input_frame)
40
- paned_window.add(output_frame)
41
- navigation_frame = customtkinter.CTkFrame(input_frame, width=100)
42
- navigation_frame.pack(side="left", fill="y")
43
-
44
-
45
- def application(attack, entry2, entry3, entry_ai, entry5):
46
- try:
47
- target = entry2.get()
48
- profile = entry3.get() if entry3 else None
49
- save_loc = entry5.get() if entry5 else None
50
- ai_choices = entry_ai.get() if entry_ai else None
51
-
52
- if attack == 'geo':
53
- geo_output: str = geo_ip_recon.geoip(gkey, target)
54
- output_save(str(geo_output))
55
- elif attack == 'nmap':
56
- p1_out = port_scanner.scanner(
57
- ip=target,
58
- profile=int(profile) if profile else None,
59
- akey=akey,
60
- bkey=bkey,
61
- lkey=lkey,
62
- lendpoint=lendpoint,
63
- AI=ai_choices
64
- )
65
- output_save(p1_out)
66
- elif attack == 'dns':
67
- dns_output: str = dns_enum.dns_resolver(
68
- target=target,
69
- akey=akey,
70
- bkey=bkey,
71
- lkey=lkey,
72
- lendpoint=lendpoint,
73
- AI=ai_choices
74
- )
75
- output_save(dns_output)
76
- elif attack == 'sub':
77
- sub_output: str = sub_recon.sub_enumerator(target, list_loc)
78
- output_save(sub_output)
79
- elif attack == 'jwt':
80
- output: str = jwt_analyzer.analyze(
81
- token=target,
82
- openai_api_token=akey,
83
- bard_api_token=bkey,
84
- llama_api_token=lkey,
85
- llama_endpoint=lendpoint,
86
- AI=ai_choices
87
- )
88
- output_save(output)
89
- elif attack == 'pcap':
90
- packet_analysis.perform_full_analysis(
91
- pcap_path=target,
92
- json_path=save_loc,
93
- )
94
- output_save("Done")
95
- except KeyboardInterrupt:
96
- print("Keyboard Interrupt detected ...")
97
-
98
-
99
- def output_save(output: str) -> None:
100
- if output == "Done":
101
- output_data = "Status: Successful"
102
- output_textbox.insert("1.0", output_data)
103
- else:
104
- output_textbox.delete("1.0", "end")
105
- json_data = json.loads(output)
106
- formatted_json = json.dumps(json_data, indent=2)
107
- output_textbox.insert("1.0", formatted_json)
108
-
109
-
110
- def select_frame_by_name(name):
111
- global frame
112
- frame.destroy()
113
- frame = customtkinter.CTkFrame(master=input_frame)
114
- frame.pack(pady=20, padx=20, fill="both", expand=True)
115
-
116
- label_text = f"GVA System - {name.capitalize()}"
117
- label = customtkinter.CTkLabel(master=frame, text=label_text)
118
- label.pack(pady=12, padx=10)
119
-
120
- entry2 = customtkinter.CTkEntry(master=frame, placeholder_text="Target/capfile/token")
121
- entry2.pack(pady=12, padx=10)
122
-
123
- if name in ["nmap", "dns", "jwt"]:
124
- ai_choices_val = ["openai", "bard", "llama-api"]
125
- entry_ai = customtkinter.CTkComboBox(master=frame, values=ai_choices_val, state="readonly")
126
- entry_ai.set("Select AI Input")
127
- entry_ai.pack(pady=12, padx=10)
128
- else:
129
- entry_ai = None
130
-
131
- entry3 = None
132
- entry5 = None
133
- if name == "nmap":
134
- entry3 = customtkinter.CTkEntry(master=frame, placeholder_text="Profile")
135
- entry3.pack(pady=12, padx=10)
136
- elif name == "sub":
137
- entry3 = customtkinter.CTkEntry(master=frame, placeholder_text="File Location")
138
- entry3.pack(pady=12, padx=10)
139
- elif name == "pcap":
140
- entry5 = customtkinter.CTkEntry(master=frame, placeholder_text="Save Location")
141
- entry5.pack(pady=12, padx=10)
142
-
143
- button = customtkinter.CTkButton(master=frame, text="Run", command=lambda: application(
144
- attack=name,
145
- entry2=entry2,
146
- entry3=entry3,
147
- entry_ai=entry_ai,
148
- entry5=entry5
149
- ))
150
- button.pack(pady=12, padx=10)
151
-
152
-
153
- nmap_button = customtkinter.CTkButton(navigation_frame, text="Nmap", command=lambda: select_frame_by_name("nmap"))
154
- nmap_button.pack(side="top", pady=5, anchor="center")
155
- dns_button = customtkinter.CTkButton(navigation_frame, text="DNS", command=lambda: select_frame_by_name("dns"))
156
- dns_button.pack(side="top", pady=5, anchor="center")
157
- sub_button = customtkinter.CTkButton(navigation_frame, text="Subdomain", command=lambda: select_frame_by_name("sub"))
158
- sub_button.pack(side="top", pady=5, anchor="center")
159
- jwt_button = customtkinter.CTkButton(navigation_frame, text="JWT Analysis", command=lambda: select_frame_by_name("jwt"))
160
- jwt_button.pack(side="top", pady=5, anchor="center")
161
- pcap_button = customtkinter.CTkButton(navigation_frame, text="Pcap Analysis", command=lambda: select_frame_by_name("pcap"))
162
- pcap_button.pack(side="top", pady=5, anchor="center")
163
- geo_button = customtkinter.CTkButton(navigation_frame, text="GeoIP Recon", command=lambda: select_frame_by_name("geo"))
164
- geo_button.pack(side="top", pady=5, anchor="center")
165
-
166
- frame = customtkinter.CTkFrame(master=input_frame)
167
- frame.pack(pady=20, padx=20, fill="both", expand=True)
168
- label = customtkinter.CTkLabel(master=frame, text="GVA System")
169
- label.pack(pady=12, padx=10)
170
- entry2 = customtkinter.CTkEntry(master=frame, placeholder_text="Target")
171
- entry2.pack(pady=12, padx=10)
172
- ai_choices = ["openai", "bard", "llama-api"]
173
- entry_ai = customtkinter.CTkComboBox(master=frame, values=ai_choices, state="readonly")
174
- entry_ai.set("Select AI Input")
175
- entry_ai.pack(pady=12, padx=10)
176
- entry3 = customtkinter.CTkEntry(master=frame, placeholder_text="Profile (Only Nmap)")
177
- entry3.pack(pady=12, padx=10)
178
- button = customtkinter.CTkButton(master=frame, text="Run", command=lambda: application("default", entry2, entry3, entry_ai))
179
- button.pack(pady=12, padx=10)
180
- output_textbox = customtkinter.CTkTextbox(master=output_frame, height=800, width=900, corner_radius=0)
181
- output_textbox.pack(pady=12, padx=10)
182
-
183
- root.mainloop()
 
1
+ import streamlit as st
2
+ import cowsay
3
+ from components.passbeaker import PasswordCracker
4
+
5
+ # Функция для имитации взлома пароля
6
+ def crack_password(password_hash, wordlist_file, algorithm, salt, parallel, complexity, min_length, max_length, character_set, brute_force):
7
+ Cracker = PasswordCracker(
8
+ password_hash=password_hash,
9
+ wordlist_file=wordlist_file,
10
+ algorithm=algorithm,
11
+ salt=salt,
12
+ parallel=parallel,
13
+ complexity_check=complexity
14
+ )
15
+ if brute_force:
16
+ Cracker.crack_passwords_with_brute_force(min_length, max_length, character_set)
17
+ else:
18
+ Cracker.crack_passwords_with_wordlist()
19
+ return Cracker.get_statistics() # Возвращаем статистику вместо печати
20
+
21
+ # Интерфейс Streamlit
22
+ def main():
23
+ st.title("GVA Password Cracker")
24
+
25
+ st.sidebar.header("Settings")
26
+ password_hash = st.sidebar.text_input("Password Hash")
27
+ wordlist_file = st.sidebar.file_uploader("Upload Wordlist File", type=['txt'])
28
+ algorithm = st.sidebar.selectbox("Hash Algorithm", ["md5", "sha1", "sha256", "sha512"])
29
+ salt = st.sidebar.text_input("Salt (optional)")
30
+ parallel = st.sidebar.checkbox("Use Parallel Processing")
31
+ complexity = st.sidebar.checkbox("Check for Password Complexity")
32
+ min_length = st.sidebar.number_input("Minimum Password Length", min_value=1, value=1)
33
+ max_length = st.sidebar.number_input("Maximum Password Length", min_value=1, value=6)
34
+ character_set = st.sidebar.text_input("Character Set", "abcdefghijklmnopqrstuvwxyz0123456789")
35
+ brute_force = st.sidebar.checkbox("Perform Brute Force Attack")
36
+
37
+ if st.sidebar.button("Crack Password"):
38
+ st.spinner("Cracking...")
39
+ stats = crack_password(
40
+ password_hash=password_hash,
41
+ wordlist_file=wordlist_file,
42
+ algorithm=algorithm,
43
+ salt=salt,
44
+ parallel=parallel,
45
+ complexity=complexity,
46
+ min_length=min_length,
47
+ max_length=max_length,
48
+ character_set=character_set,
49
+ brute_force=brute_force
50
+ )
51
+ st.success(f"Password Cracked! {stats}")
52
+ st.balloons()
53
+
54
+ if __name__ == "__main__":
55
+ main()