-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBitBomb.pyw
More file actions
125 lines (94 loc) · 3.9 KB
/
BitBomb.pyw
File metadata and controls
125 lines (94 loc) · 3.9 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
from tkinter import *
import tkinter.messagebox as tmsg
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import keyboard
import time
# launching browser and opening whatsapp web
driver = webdriver.Chrome('./chromedriver')
driver.get("http://web.whatsapp.com")
driver.maximize_window()
driver.find_element_by_name('rememberMe').click()
#launching UI
root = Tk()
#window background color
root.configure(bg='white')
root.title("BitBomb")
root.minsize(300, 300)
root.maxsize(300, 300)
photo = PhotoImage(file = "win_icon.png")
root.iconphoto(False, photo)
# Launch button function
def launch():
try:
launch_button["state"] = DISABLED
launch_button.update()
target = target_val.get()
msg = msg_val.get()
count = count_val.get()
#confirmation prompt
MsgBox = tmsg.askquestion ('Confirmation prompt', f'confirm {count} shots to the target: {target.upper()}.', icon = 'warning')
if MsgBox == 'yes':
pass
else:
launch_button.update()
launch_button["state"] = NORMAL
return None
search = driver.find_element_by_xpath("//*[@data-tab='3']")
search.click()
search.send_keys(target)
time.sleep(2)
search.send_keys(Keys.ENTER)
text_msg = driver.find_element_by_xpath("//*[@id='main']/footer/div[1]/div[2]/div/div[2]")
for i in range(count):
text_msg.send_keys(msg)
driver.find_element_by_xpath("//*[@id='main']/footer/div[1]/div[3]/button/span").click()
if keyboard.is_pressed('q'):
break
# output window
tmsg.showinfo("Messages sent", "Task completed successfully.")
launch_button.update()
launch_button["state"] = NORMAL
except:
pass
# destroy button function
def destroy():
driver.quit()
root.destroy()
# UI lebels
head = Label(root, text="BitBomb" , bg='#00BFA5', fg='white', padx=90, pady=0, font=("cosmicsansms", 20 , 'bold'))
head.grid(row=0, column=0, columnspan=2)
# insttuction label
msg_label = Label(text="Please scan and login first.", bg='#00BFA5', fg='white', padx=40, pady=2, font=("cosmicsansms", 10, 'bold'))
msg_label.grid(row=1, column=0, columnspan=2, padx=0, pady=5)
# entries label
target_label = Label(text="Target",bg='white', padx=10, pady=10, font=("cosmicsansms", 10))
target_label.grid(row=2, column=0)
msg_label = Label(text="Message", bg='white', padx=10, pady=10, font=("cosmicsansms", 10))
msg_label.grid(row=3, column=0)
count_label = Label(text="Count", bg='white', padx=10, pady=10, font=("cosmicsansms", 10))
count_label.grid(row=4, column=0)
# UI Entries
target_val = StringVar()
msg_val = StringVar()
count_val = IntVar()
target_entry = Entry(root, textvariable = target_val)
target_entry.grid(row=2, column=1, padx=0, pady=5)
msg_entry = Entry(root, textvariable = msg_val)
msg_entry.grid(row=3, column=1, padx=0, pady=5)
count_entry = Entry(root, textvariable = count_val)
count_entry.grid(row=4, column=1, padx=0, pady=5)
# Termination lebel
msg_label = Label(text="press 'Q' to Terminate.", bg='#00BFA5', fg='white', padx=60, pady=2, font=("cosmicsansms", 10, 'bold'))
msg_label.grid(row=5, column=0, columnspan=2)
# Launch button
launch_button = Button(text="LAUNCH", command=launch, borderwidth=3, padx=30, pady=0)
launch_button.grid(row=6, column=1, padx=10, pady=10)
# Destroy button
destroy_button = Button(text="DESTROY", command=destroy, borderwidth=3, padx=20, pady=0)
destroy_button.grid(row=6, column=0, padx=10, pady=10)
# About logo
msg_label = Label(text="Copyright, XtremaX 2020.\n Coded by- RAJAT (rajatkumar2312001@gmail.com)",bg='white', fg='black', padx=0, pady=2, font=("cosmicsansms", 8))
msg_label.grid(row=7, column=0, columnspan=2)
# UI main loop
root.mainloop()