-
Notifications
You must be signed in to change notification settings - Fork 24
/
Vailyn
executable file
·141 lines (114 loc) · 3.16 KB
/
Vailyn
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
138
139
140
141
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
_____, ___
'+ .;
, ;
.
.
.;.
.;
:
,
┌─[Vailyn]─[~]
└──╼ VainlyStrain
"""
from core.methods.version import check_version
from core.methods.print import intro, ldis
from core.methods.parser import parser
from core.Shell import shell_main
from core.Cli import cli_main
from core.App import app_main
from core.config import (
DESKTOP_NOTIFY,
)
from core.colors import (
color, FAIL, lines,
)
from core.variables import adv_li
import core.variables as variables
import colorama
import sys
if adv_li:
import setproctitle
try:
import notify2
except ModuleNotFoundError:
pass
# initialize colorama
if not adv_li:
colorama.init()
if __name__ == "__main__":
try:
# set custom process title
if adv_li:
setproctitle.setproctitle("Vailyn")
# print Vailyn's ascii art
intro()
# parse commandline arguments
parser = parser()
args = parser.parse_args()
opt = vars(args)
if opt["notmain"]:
variables.adv_li = False
if variables.adv_li and DESKTOP_NOTIFY:
# initialize notifications
try:
notify2.init("Vailyn")
except NameError:
pass
# set global variables and determine
# main method
if opt["version"]:
print("\n\n{}".format(variables.e_version))
if check_version():
print("latest available version.")
else:
print("an update is available.")
sys.exit(0)
if opt["timeout"]:
variables.timeout = args.timeout
variables.stable = True
assert variables.timeout is not None
if opt["precise"]:
variables.precise = True
assert variables.precise
if opt["lfi"]:
variables.lfi = True
assert variables.lfi
if opt["debug"]:
variables.verbose = True
if opt["phase2"]:
typ, ip, port = args.phase2
if typ == "inject":
# RCE for LFI
variables.revshell = True
variables.LISTENIP = ip
variables.LISTENPORT = port
assert (
variables.revshell
and variables.LISTENIP is not None
and variables.LISTENPORT is not None
)
elif typ == "implant":
# RCE for path traversal
variables.implant = True
assert variables.implant
if opt["app"]:
ldis()
app_main()
elif not opt["victim"]:
# shell_main()
cli_main(parser, opt, args)
else:
ldis()
cli_main(parser, opt, args)
except KeyboardInterrupt:
print("\n\n{0}[INFO]{2}{1} {3}{2}{0}{4}{2}".format(
color.RD, color.RB, color.END, FAIL,
lines.VL,
))
print("{0} {2} Alvida!{1}\n".format(
color.RD, color.END, lines.SW,
))
sys.exit(1)