-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
65 lines (51 loc) · 981 Bytes
/
main.go
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
package main
import(
"fmt";
"android_burpsuit_injector/lib"
"os"
"github.com/fatih/color"
)
func main(){
if len(os.Args) <= 1{
fmt.Println(color.CyanString("Usage: ./abinject "), color.MagentaString("[apk file path]"))
return
}
a := lib.Apk{FileLocation:os.Args[1]}
if err := a.CheckFile(); err!=nil{
color.Red(err.Error())
return
}
if err:= a.Disassamble(); err!=nil{
color.Red(err.Error())
return
}
if err:=a.InsertNetworkConfig();err!=nil{
color.Red(err.Error())
return
}
if err:=a.ModifyAndroidManifest();err!=nil{
color.Red(err.Error())
return
}
if err:= a.Assamble(); err!=nil{
color.Red(err.Error())
return
}
if err:= a.StoreUnsignedApk(); err!=nil{
color.Red(err.Error())
return
}
if err:=a.Clean();err!=nil{
color.Red(err.Error())
return
}
if err:=a.Zipalign();err!=nil{
color.Red(err.Error())
return
}
if err:=a.SignApk();err!=nil{
color.Red(err.Error())
return
}
color.Green("Done.\n")
}