-
Notifications
You must be signed in to change notification settings - Fork 10
/
main.py
137 lines (112 loc) · 5.3 KB
/
main.py
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
126
127
128
129
130
131
132
133
134
135
136
137
import sys
import datetime
import requests
import json
import os.path
import time
from time import sleep
from colorama import init
import threading
from threading import Semaphore
from colorama import Fore, Back, Style
from Ebay import ebay_views
from Ebay import account_create
from Ebay import ebay_watchers
init(autoreset=True)
class EBAY:
def __init__(self,) -> None:
self.lock = Semaphore(value=1)
pass
print(Fore.GREEN +"███████╗██████╗ █████╗ ██╗ ██╗".center(90))
print(Fore.GREEN +"██╔════╝██╔══██╗██╔══██╗╚██╗ ██╔╝".center(90))
print(Fore.GREEN +"█████╗ ██████╔╝███████║ ╚████╔╝ ".center(90))
print(Fore.GREEN +"██╔══╝ ██╔══██╗██╔══██║ ╚██╔╝ ".center(90))
print(Fore.GREEN +"███████╗██████╔╝██║ ██║ ██║ ".center(87))
print(Fore.GREEN +"╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═╝ ".center(87))
print()
print(f"{Fore.CYAN}[1] {Fore.YELLOW}Add Views".center(92))
print(f"{Fore.CYAN}[2] {Fore.YELLOW}Add Watchers".center(93))
print(f"{Fore.CYAN}[3] {Fore.YELLOW}Account Generator".center(100))
print(f"{Fore.CYAN}[4] {Fore.YELLOW}Press 'q' to Quit".center(100))
print()
self.main()
def main(self):
# MAIN MENU
choice = ""
while choice != "q":
choice = input(f"{Fore.CYAN}Enter your choice: ")
if choice == "1":
self.URL = str(input("Enter eBay Listing URL: "))
while 'https://www.ebay.com' not in self.URL:
print(Fore.BLUE + format(datetime.datetime.now()), Fore.RED +"Please Enter a valid eBay Link")
self.main()
else:
self.view()
elif choice == "2":
self.URL = str(input("Enter eBay Listing URL: "))
while 'https://www.ebay.com' not in self.URL:
print(Fore.BLUE + format(datetime.datetime.now()), Fore.RED +"Please Enter a valid eBay Link")
self.main()
else:
self.watcherBot()
elif choice == "3":
self.accountGenerator()
elif choice == "q":
print(Fore.BLUE +"Closing Instance... Bye Bye!")
else:
print(Fore.BLUE + format(datetime.datetime.now()), Fore.RED +"ERROR CHOICE UNAVAILABLE!")
self.main()
def view(self):
i=0
if 'https://www.ebay.com' not in self.URL:
print(Fore.BLUE + format(datetime.datetime.now()), Fore.RED +"Please Enter a valid eBay Link")
self.main()
views = int(input("Enter amount of views needed: "))
choice = int(input("Enter amount of tasks at a time: "))
num_tasks = choice
self.sem = threading.Semaphore(value=num_tasks)
threads = []
i= 0
for i in range(views):
i +=1
self.sem.acquire()
task = threading.Thread(target=ebay_views.Views, args=(self, i))
threads.append(task)
time.sleep(.05)
task.start()
def watcherBot(self):
views = int(input("Enter amount of Watchers needed: "))
choice = int(input("Enter amount of tasks at a time: "))
num_tasks = choice
self.sem = threading.Semaphore(value=num_tasks)
threads = []
i= 0
with open('Config/created_accounts.txt', 'r') as f1:
for line, in zip(f1):
i +=1
self.sem.acquire()
email = line.split(":")[0]
password = line.split(":")[1]
task = threading.Thread(target=ebay_watchers.Watch, args=(self, email, password, i))
threads.append(task)
time.sleep(.05)
task.start()
def accountGenerator(self):
choice = int(input("Enter amount of tasks at a time: "))
num_tasks = choice
self.sem = threading.Semaphore(value=num_tasks)
threads = []
i= 0
with open('Config/emails.txt', 'r') as f1:
for line, in zip(f1):
i +=1
self.sem.acquire()
email = line.split(":")[0]
task = threading.Thread(target=account_create.Gen, args=(self,email, i))
threads.append(task)
time.sleep(.05)
task.start()
if __name__ == "__main__":
EBAY()
sleep(3)
exit()