mirror of
https://github.com/bhattsameer/Bombers.git
synced 2023-08-10 21:12:53 +03:00
Whatsapp: Added menu and made the script more user friendly.
Created new banner using pyfiglet in combination with colorama (This is located under the banner() function) Moved the bombing to the bomb() function to make room for the menu in main(). Added a clean() function which clears the terminal. Improved XPATH since it was using outdated elements.
This commit is contained in:
parent
e74ec5aca7
commit
ccb7453bd7
@ -49,7 +49,7 @@
|
||||
### Whats-app Bombers :calling: :boom:
|
||||
| Sr.No. | Name | Description | Developed By | Status |
|
||||
|--------|------|--------------|-------------|--------|
|
||||
|1.| <a href="https://github.com/bhattsameer/Bombers/blob/master/wbomb.py">wbomb.py</a>| Whatsapp-bomber sending multipal message to a single user.|<a href="https://github.com/bhattsameer/Bombers/blob/master">bhattsameer</a> Last Modified: [getPoland](https://github.com/getPoland)|![Working](https://i.ibb.co/3FntR1c/1.png)|
|
||||
|1.| <a href="https://github.com/bhattsameer/Bombers/blob/master/wbomb.py">wbomb.py</a>| Whatsapp-bomber sending multipal message to a single user.|<a href="https://github.com/bhattsameer/Bombers/blob/master">bhattsameer</a> Last Modified: [OnTheLink](https://github.com/OnTheLink)|![Working](https://i.ibb.co/3FntR1c/1.png)|
|
||||
|2.| <a href="https://github.com/tbhaxor/whatabomb">whatabomb</a> | Whats-app bomber GUI. | [tbhaxor](https://github.com/tbhaxor)|![Working](https://i.ibb.co/3FntR1c/1.png) |
|
||||
|3.| <a href="https://github.com/rizwansoaib/WhatsApp-monitor">WhatsApp-Bomber</a> | WhatsApp Monitor+Bomber (Chrome Extension)| [rizwansoaib](https://github.com/rizwansoaib)|![Not-Working](https://i.ibb.co/wWtD8S6/2.png)|
|
||||
|4.| <a href="https://github.com/macr1408/Whatsapp-scripts">WhatsApp-Spam</a> | WhatsApp-Spam scripts | [macr1408](https://github.com/macr1408)|![Others](https://i.ibb.co/pQwqwcN/3.png) |
|
||||
|
5
requirements_WBOMB.txt
Normal file
5
requirements_WBOMB.txt
Normal file
@ -0,0 +1,5 @@
|
||||
selenium
|
||||
pyfiglet
|
||||
colorama
|
||||
webdriver-manager
|
||||
ChromeDriverManager
|
106
wbomb.py
106
wbomb.py
@ -1,41 +1,109 @@
|
||||
from selenium import webdriver
|
||||
import random
|
||||
import pyfiglet
|
||||
import webbrowser
|
||||
import os
|
||||
from webdriver_manager.chrome import ChromeDriverManager # 1st changer
|
||||
|
||||
|
||||
def banner():
|
||||
print('''
|
||||
## ## ======= #### #### #### =======
|
||||
\ \ #### / / # # ## ## / /\ \ / /\ \ # #
|
||||
\ \ / /\ \ / / #====== ## ## / / \ \/ / \ \ #======
|
||||
\ \/ / \ \/ / # # ## ## / / #### \ \ # #
|
||||
#### #### ======= #### ## ## =======
|
||||
''')
|
||||
from colorama import Fore
|
||||
from time import sleep
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.chrome.service import Service
|
||||
from webdriver_manager.chrome import ChromeDriverManager
|
||||
|
||||
driver = None # Global variable to store the driver object
|
||||
|
||||
def main():
|
||||
driver = webdriver.Chrome(ChromeDriverManager().install()) # 2nd change
|
||||
clean()
|
||||
banner()
|
||||
ans=True
|
||||
while ans:
|
||||
print("""
|
||||
1. Start bombing
|
||||
2. Support original creator
|
||||
3. Exit/Quit
|
||||
""")
|
||||
ans=input("What would you like to do? ")
|
||||
if ans=="1":
|
||||
clean()
|
||||
bomb()
|
||||
elif ans=="2":
|
||||
webbrowser.open('https://github.com/bhattsameer/Bombers/')
|
||||
print("\n Thanks for supporting the original creator!")
|
||||
sleep(0.3)
|
||||
main()
|
||||
elif ans=="3":
|
||||
print("\n Goodbye")
|
||||
ans = None
|
||||
exit()
|
||||
else:
|
||||
print("\n Not a valid choice. Try again.")
|
||||
sleep(0.3)
|
||||
main()
|
||||
|
||||
def setup():
|
||||
options = webdriver.ChromeOptions()
|
||||
options.add_argument('--no-sandbox')
|
||||
options.add_argument('--disable-dev-shm-usage')
|
||||
|
||||
# Set path to the ChromeDriver executable.
|
||||
service = Service(ChromeDriverManager().install())
|
||||
|
||||
global driver # Use the global driver variable
|
||||
driver = webdriver.Chrome(service=service, options=options)
|
||||
driver.get('https://web.whatsapp.com/')
|
||||
|
||||
return driver # Return the initialized driver object
|
||||
|
||||
def clean():
|
||||
# For Windows
|
||||
if os.name == 'nt':
|
||||
_ = os.system('cls')
|
||||
# For macOS and Linux
|
||||
else:
|
||||
_ = os.system('clear')
|
||||
|
||||
def banner():
|
||||
foreground_colors = [Fore.MAGENTA, Fore.WHITE, Fore.MAGENTA, Fore.MAGENTA, Fore.WHITE, Fore.MAGENTA]
|
||||
|
||||
f = pyfiglet.Figlet(font="stop")
|
||||
text = f.renderText('WB0MB')
|
||||
|
||||
lines = text.split('\n')
|
||||
cur_fore = 0
|
||||
for line in lines:
|
||||
foreground_color = foreground_colors[cur_fore] # Get the foreground color based on the current index
|
||||
cur_fore = (cur_fore + 1) % len(foreground_colors) # Increment the index and wrap around if it exceeds the list length
|
||||
colored_line = f"{foreground_color}{line}" # Add the foreground color to the line
|
||||
print(colored_line)
|
||||
sleep(0.05)
|
||||
|
||||
# Reset the colorama settings
|
||||
print(Fore.RESET)
|
||||
|
||||
def bomb():
|
||||
name = input('Enter the name of user or group: ')
|
||||
msg = input('Enter your message: ')
|
||||
count = int(input('Enter the count: '))
|
||||
|
||||
input('Enter any key after scanning QR code')
|
||||
input('Enter any key whenever you\'re ready!')
|
||||
|
||||
user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))
|
||||
user = driver.find_element(By.XPATH, f'//span[@title="{name}"]')
|
||||
user.click()
|
||||
|
||||
print('Waiting 4 seconds to let WhatsApp load...')
|
||||
sleep(4)
|
||||
# The classname of message box may vary.
|
||||
msg_box = driver.find_element_by_xpath('/html/body/div[1]/div[1]/div[1]/div[4]/div[1]/footer/div[1]/div/div/div[2]/div[1]/div/div[2]')
|
||||
msg_box = driver.find_element(By.XPATH, '/html/body/div[1]/div/div/div[5]/div/footer/div[1]/div/span[2]/div/div[2]/div[1]/div/div[1]')
|
||||
|
||||
for i in range(count):
|
||||
msg_box.send_keys(msg)
|
||||
# The classname of send button may vary.
|
||||
button = driver.find_element_by_xpath('/html/body/div[1]/div[1]/div[1]/div[4]/div[1]/footer/div[1]/div/div/div[2]/div[2]/button')
|
||||
button = driver.find_element(By.XPATH, '/html/body/div[1]/div/div/div[5]/div/footer/div[1]/div/span[2]/div/div[2]/div[2]/button')
|
||||
button.click()
|
||||
|
||||
print('Bombing Complete!!')
|
||||
sleep(4)
|
||||
main()
|
||||
|
||||
|
||||
banner()
|
||||
driver = setup()
|
||||
input('Enter any key after scanning QR code')
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user