forked from themycode/python-hacker-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjiance.py
More file actions
62 lines (53 loc) · 1.6 KB
/
jiance.py
File metadata and controls
62 lines (53 loc) · 1.6 KB
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
daoru=__import__('colour',fromlist=True)
red=getattr(daoru,'red')
import re
ipzz='(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)'
def numbers(user_payload):
if user_payload == 'x86':
return 'x86'
elif user_payload == 'x64':
return 'x64'
elif user_payload == 'x86_64':
return 'x86_64'
else:
print(red('[-]'), 'No such digits')
return ''
def ips(user_ip):
zz = re.findall(ipzz, user_ip)
if zz:
for y in zz:
qc = str(y).replace("'", '').replace(',', '.').replace('(', '').replace(')', '').strip().rstrip().lstrip()
qc = "".join(qc.split(' '))
return qc
else:
print(red('[-]'), 'IP format error')
return ''
def ports(user_port):
if int(user_port) <= 65535:
return user_port
else:
print(red('[-]'), 'Incorrect port range')
return ''
def type_ofs(user_typeof):
if user_typeof == 'dll':
return 'dll'
elif user_typeof == 'exe':
return 'exe'
elif user_typeof == 'txt':
return 'txt'
elif user_typeof == 'c':
return 'c'
elif user_typeof == 'py':
return 'py'
elif user_typeof=='elf':
return 'elf'
elif user_typeof=='macho':
return 'macho'
else:
print(red('[-]'),'Not Type')
return ''
def names(user_name):
if user_name == '':
return 'haq520'
elif user_name != '':
return user_name