This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
run.py
57 lines (53 loc) · 1.58 KB
/
run.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
from config import cfg
from main import main
import click
# Click config
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.command(context_settings=CONTEXT_SETTINGS)
@click.option(
'--threads', '-t',
help='Number of threads',
show_default=True,
type=int,
default=cfg["threads_num"]
)
@click.option(
'--mode', '-m',
help="""The mode to catch the more recent link, using it as a limit. (noisy, stealth)\n
- noisy : it uploads a picture to get the more recent link\n
- stealth : it uses the last link shown on Twitter here : https://prntscr.com/twitter.json\n""",
show_default=True,
type=str,
default="noisy"
)
@click.option(
'--algo', '-a',
help='Algorithm used to generate links. (ascending, descending, random)',
show_default=True,
type=str,
default="descending"
)
@click.option(
'--debug', '-d',
help='Verbose mode, for debugging.',
show_default=True,
is_flag=True
)
@click.option(
'--resume_ro', '-ro',
help="Don't save the resume state, only read it.",
show_default=True,
is_flag=True
)
@click.option(
'--clean', '-c',
type=str,
help="""Clean some things you don't want anymore. (logs, resume, exports)\n
If you want want to specify multiple values, specify them comma-separated and without spaces. Ex: \"--clean logs,exports\""""
)
def start(threads, mode, algo, debug, clean, resume_ro):
if threads < 1:
exit("[-] Please put at least 1 thread.")
main(threads, mode, algo, debug, clean, resume_ro)
if __name__ == '__main__':
start()