More improvements
This commit is contained in:
parent
1c377afbdf
commit
eff4462d76
21
jupiter.py
21
jupiter.py
@ -46,7 +46,6 @@ key = 'xChangeMex'
|
|||||||
# Settings
|
# Settings
|
||||||
admin = 'nick!user@host' # Can use wildcards (Must be in nick!user@host format)
|
admin = 'nick!user@host' # Can use wildcards (Must be in nick!user@host format)
|
||||||
connect_delay = True # Random delay between 5-15 minutes before connecting a clone to a server
|
connect_delay = True # Random delay between 5-15 minutes before connecting a clone to a server
|
||||||
concurrency = 3 # Number of clones to load per server
|
|
||||||
id = 'TEST' # Unique ID so you can tell which bots belong what server
|
id = 'TEST' # Unique ID so you can tell which bots belong what server
|
||||||
|
|
||||||
# Formatting Control Characters / Color Codes
|
# Formatting Control Characters / Color Codes
|
||||||
@ -413,7 +412,7 @@ class clone():
|
|||||||
|
|
||||||
async def main(input_data=None):
|
async def main(input_data=None):
|
||||||
jobs = list()
|
jobs = list()
|
||||||
for i in range(concurrency):
|
for i in range(args.clones):
|
||||||
for server in servers:
|
for server in servers:
|
||||||
if input_data:
|
if input_data:
|
||||||
for item in input_data:
|
for item in input_data:
|
||||||
@ -441,19 +440,17 @@ if __name__ == '__main__':
|
|||||||
print('#{:^54}#'.format(''))
|
print('#{:^54}#'.format(''))
|
||||||
print('#'*56)
|
print('#'*56)
|
||||||
parser = argparse.ArgumentParser(usage='%(prog)s [options]')
|
parser = argparse.ArgumentParser(usage='%(prog)s [options]')
|
||||||
parser.add_argument('-p', '--proxies', type=str, default='proxies.txt', help="Path to file containing proxies. Default is proxies.txt.")
|
parser.add_argument('-p', '--proxies', type=str, help="Path to file containing proxies.")
|
||||||
parser.add_argument('-v', '--vhosts', type=str, default='vhosts.txt', help="Path to file containing vhosts. Default is vhosts.txt.")
|
parser.add_argument('-v', '--vhosts', type=str, help="Path to file containing vhosts.")
|
||||||
parser.add_argument('-c', '--clones', type=int, default=3, help="Number to define the concurrency to use. Default is 3.")
|
parser.add_argument('-c', '--clones', type=int, default=3, help="Number to define the concurrency to use. Default is 3.")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.clones:
|
if (input_file := args.proxies if args.proxies else args.vhosts if args.vhosts else None):
|
||||||
concurrency = args.clones
|
|
||||||
loop = asyncio.get_event_loop()
|
|
||||||
input_file = args.proxies if args.proxies else args.vhosts if args.vhosts else None
|
|
||||||
if input_file:
|
|
||||||
if os.path.exists(input_file):
|
if os.path.exists(input_file):
|
||||||
data = open(input_file, 'r').read().split('\n')
|
data = open(input_file, 'r').read().split('\n')
|
||||||
loop.run_until_complete(main(data))
|
print('Loaded {0:,} items from {1}'.format(len(data), input_file))
|
||||||
|
asyncio.run(main(data))
|
||||||
else:
|
else:
|
||||||
raise SystemExit(f'Error: {input_file} does not exist!')
|
raise SystemExit(f'Error: {input_file} does not exist!')
|
||||||
else:
|
else:
|
||||||
loop.run_until_complete(main())
|
print('Loading raw clones...')
|
||||||
|
asyncio.run(main())
|
||||||
|
Loading…
Reference in New Issue
Block a user