forked from ndelphit/apkurlgrep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apkurlgrep.go
38 lines (28 loc) · 828 Bytes
/
apkurlgrep.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
/*
made with love by @ndelphit 5/2020
*/
package main
import (
"fmt"
"github.com/akamensky/argparse"
"github.com/abdilahrf/apkurlgrep/command/apktool"
dependency "github.com/abdilahrf/apkurlgrep/command/dependency"
"github.com/abdilahrf/apkurlgrep/directory"
"github.com/abdilahrf/apkurlgrep/extractor"
"os"
)
func main() {
parser := argparse.NewParser("apkurlgrep", "ApkUrlGrep - Extract endpoints from APK files V1.0")
apk := parser.String("a", "apk", &argparse.Options{Required: true, Help: "Input a path to APK file."})
err := parser.Parse(os.Args)
if err != nil {
fmt.Print(parser.Usage(err))
os.Exit(-1)
}
var baseApk = *apk
var tempDir = directory.CreateTempDir()
dependency.AreAllReady()
apktool.RunApktool(baseApk, tempDir)
extractor.Extract(tempDir)
directory.RemoveTempDir(tempDir)
}