Skip to content

Commit

Permalink
Basic Release
Browse files Browse the repository at this point in the history
  • Loading branch information
ThusharaX committed Jul 12, 2021
1 parent da9e804 commit b3ad516
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 53 deletions.
63 changes: 10 additions & 53 deletions bot.py
Original file line number Diff line number Diff line change
@@ -1,53 +1,10 @@
# Python Spam BOT

# Author: Thushara Thiwanka
# Version: v0.0.1
# Released: 12-07-2021

import pyautogui
import keyboard
import time
import random
from alive_progress import alive_bar

# countdown function
def countdown(sec):
while not (sec < 0):
timer = sec
print("Spaming in ", timer, end="\r")
time.sleep(1)
sec -= 1


spamText = []
count = 0

flag = 'y'

while (flag == 'y'):
text = input("Spam Text : ")
spamText.append(text)
flag = input("Do you want to add more messages(y/n) : ")
if (flag == 'n'):
break

count = int(input("How many times : "))
interval = float(input("Time interval(sec) : "))

# input time in seconds
sec = 5

# countdown function call
countdown(int(sec))

with alive_bar(count, title="Spaming!", spinner="classic") as bar:
for _ in range(count):
pyautogui.typewrite(random.choice(spamText))
pyautogui.press('enter')
time.sleep(interval)
bar()
print('\nDone')

print("Press any key to continue")
keyboard.read_key()
print("Happy hacking...! ;-)")
# Python Spam BOT

# Author: Thushara Thiwanka
# Version: v0.0.1
# Released: 12-07-2021

from src import main

if __name__ == '__main__':
main.main()
Empty file added src/__init__.py
Empty file.
47 changes: 47 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import pyautogui
import keyboard
import time
import random
from alive_progress import alive_bar

# countdown function
def countdown(sec):
while not (sec < 0):
timer = sec
print("Spaming in ", timer, end="\r")
time.sleep(1)
sec -= 1

def main():
spamText = []
count = 0

flag = 'y'

while (flag == 'y'):
text = input("Spam Text : ")
spamText.append(text)
flag = input("Do you want to add more messages(y/n) : ")
if (flag == 'n'):
break

count = int(input("How many times : "))
interval = float(input("Time interval(sec) : "))

# input time in seconds
sec = 5

# countdown function call
countdown(int(sec))

with alive_bar(count, title="Spaming!", spinner="classic") as bar:
for _ in range(count):
pyautogui.typewrite(random.choice(spamText))
pyautogui.press('enter')
time.sleep(interval)
bar()
print('\nDone')

print("Press any key to continue")
keyboard.read_key()
print("Happy hacking...! ;-)")

0 comments on commit b3ad516

Please sign in to comment.