I assume you know how to do basic python scripting:
Please remember that we use any type of scripts for white hack hacking and nothing more.
​
import tkinter as tk
from tkinter import messagebox
import webbrowser
import pyttsx3
import os
from bs4 import BeautifulSoup
import requests
# Dictionary of URLs corresponding to the tactics
tactic_urls = {
'reconnaissance': 'https://attack.mitre.org/tactics/TA0043/',
'resource development': 'https://attack.mitre.org/tactics/TA0042/',
'initial access': 'https://attack.mitre.org/tactics/TA0001/',
'execution': 'https://attack.mitre.org/tactics/TA0002/',
'persistence': 'https://attack.mitre.org/tactics/TA0003/',
'privilege escalation': 'https://attack.mitre.org/tactics/TA0004/',
'defense evasion': 'https://attack.mitre.org/tactics/TA0005/',
'credential access': 'https://attack.mitre.org/tactics/TA0006/',
'discovery': 'https://attack.mitre.org/tactics/TA0007/',
'lateral movement': 'https://attack.mitre.org/tactics/TA0008/',
'collection': 'https://attack.mitre.org/tactics/TA0009/',
'command and control': 'https://attack.mitre.org/tactics/TA0011/',
'exfiltration': 'https://attack.mitre.org/tactics/TA0010/',
'impact': 'https://attack.mitre.org/tactics/TA0040/'
}
def open_url():
channel_name = tactic_menu.get()
if channel_name not in tactic_urls:
messagebox.showerror("Error", "Invalid tactic name. Please enter a valid tactic name.")
return
# Open the URL based on the user's choice
url = tactic_urls[channel_name]
webbrowser.open_new_tab(url)
def get_tactic_info():
channel_name = tactic_menu.get()
if channel_name not in tactic_urls:
messagebox.showerror("Error", "Invalid tactic name. Please enter a valid tactic name.")
return
# Open the URL based on the user's choice
url = tactic_urls[channel_name]
# Get the content of the current page using BeautifulSoup
result = requests.get(url)
content = result.text
box = BeautifulSoup(content, 'lxml')
paragraphs = box.find_all('p')
text = ' '.join([p.get_text() for p in paragraphs])
# Convert the text to speech
engine = pyttsx3.init()
engine.setProperty('rate', 150) # Adjust the rate as per your preference
engine.say(text)
engine.runAndWait()
def save_to_wav():
channel_name = tactic_menu.get()
if channel_name not in tactic_urls:
messagebox.showerror("Error", "Invalid tactic name. Please enter a valid tactic name.")
return
# Open the URL based on the user's choice
url = tactic_urls[channel_name]
# Get the content of the current page using BeautifulSoup
result = requests.get(url)
content = result.text
box = BeautifulSoup(content, 'lxml')
paragraphs = box.find_all('p')
text = ' '.join([p.get_text() for p in paragraphs])
# Convert the text to speech and save to an MP3 file in the specified directory
engine = pyttsx3.init()
engine.setProperty('rate', 150) # Adjust the rate as per your preference
engine.save_to_file(text, f'F:\\newerPowershell\\wav\\{channel_name}.mp3')
engine.runAndWait()
def exit_program():
window.destroy()
# Create the main window
window = tk.Tk()
window.title("Menu GUI")
window.geometry("400x300") # Set the initial size of the window
# Create a dropdown menu for tactics
tactic_menu = tk.StringVar(window)
tactic_menu.set("reconnaissance") # Set the default tactic name
tactic_dropdown = tk.OptionMenu(window, tactic_menu, *tactic_urls.keys())
tactic_dropdown.pack()
# Create buttons for each menu option
button1 = tk.Button(window, text="Open URL", command=open_url, width=20, height=2)
button2 = tk.Button(window, text="Get Tactic Info", command=get_tactic_info, width=20, height=2)
button3 = tk.Button(window, text="Save to WAV", command=save_to_wav, width=20, height=2)
button4 = tk.Button(window, text="Exit", command=exit_program, width=20, height=2)
button1.pack(pady=10)
button2.pack(pady=10)
button3.pack(pady=10)
button4.pack(pady=10)
# Run the Tkinter event loop
window.mainloop()
​
​
​
