-
Notifications
You must be signed in to change notification settings - Fork 3
/
andropyducky.py
66 lines (53 loc) · 2.51 KB
/
andropyducky.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
# coding: utf-8
''' andropyducky '''
'''
@Author: Daniel Victor Freire Feitosa
@Version: 1.0.0
Twitter: @DanielFreire00
Github: github.com/proxyanon
<danielfrerie56@hotmail.com>
'''
from lib.AndroPyDucky import *
index = 1
help_banner = "\n"
help_banner += ("██ ▄ ██▄ █▄▄▄▄ ████▄ █ ▄▄ ▀▄ ▄ ██▄ ▄ ▄█▄ █ █▀ ▀▄ ▄ \n")
help_banner += ("█ █ █ █ █ █ ▄▀ █ █ █ █ █ █ █ █ █ █▀ ▀▄ █▄█ █ █ \n")
help_banner += ("█▄▄█ ██ █ █ █ █▀▀▌ █ █ █▀▀▀ ▀█ █ █ █ █ █ ▀ █▀▄ ▀█ \n")
help_banner += ("█ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ █▄ ▄▀ █ █ █ \n")
help_banner += ("█ █ █ █ ███▀ █ █ ▄▀ ███▀ █▄ ▄█ ▀███▀ █ ▄▀ \n")
help_banner += ("█ █ ██ ▀ ▀ ▀▀▀ ▀ \n")
help_banner += ("▀ \n\n")
help_banner += ("Uso: python {scriptname} --duckyfile script.dd --output payload.sh\n".format(scriptname=argv[0].split("\\")[len(argv[0].split("\\"))-1]))
help_banner += ("Opcoes:\n")
help_banner += (" -d, -D, --duckyfile Arquivo ducky para ser convertido\n")
help_banner += (" -o, -O, --output Arquivo que de saida da conversao\n\n")
for arg in argv:
if arg == "--duckyfile" or arg == "-d" or arg == "-D":
duckyfile = argv[index+1]
index += 2
elif arg == "--output" or arg == "-o" or arg == "-O":
output = argv[index+1]
index += 2
elif arg == "--help" or arg == "-h" or arg == "-H":
print help_banner
exit()
try:
andropyducky = AndroPyDucky(duckyfile, output)
andropyducky.andro2hid()
if andropyducky.verifyadb():
if andropyducky.banners:
print("\n[$] ADB detectado ...")
quiz = raw_input("Voce quer transferir o payload para seu aparelho [S/N] ? ")
if quiz == 'S' or quiz == 's' or quiz == '':
path = raw_input("Coloque a pasta onde o hid-keyboard (ex => /data/local/tmp): ")
if path != '' and len(path) > 0:
andropyducky.adbpush(path)
else:
if andropyducky.banners:
print("Nenhum path indicado ...")
exit()
else:
exit()
except:
print("python {scriptname} --help\n".format(scriptname=argv[0].split("\\")[len(argv[0].split("\\"))-1]))
exit()