diff --git a/client/example.sh b/client/example.sh index 7ff918e..3e48075 100644 --- a/client/example.sh +++ b/client/example.sh @@ -1,3 +1,3 @@ #!/bin/bash -./IPAGoClient -user mrx.trojan@icloud.com -pswd ... -h 65.109.64.76 -p 9001 -q TikTok -b com.zhiliaoapp.musically -u ... +./IPAGoClient -user mrx.trojan@icloud.com -pswd ... -h 65.109.64.76 -p 9001 -q TikTok -b com.zhiliaoapp.musically -u ... -o /Users/trojvn/Documents/Code/iTikBot/apps/ diff --git a/client/main.go b/client/main.go index f0ba737..00b701a 100644 --- a/client/main.go +++ b/client/main.go @@ -223,7 +223,6 @@ func checkVersionInDownloaded(udid, query, version string) bool { } func main() { - os.MkdirAll("apps", 0755) bundleID := flag.String("b", "com.zhiliaoapp.musically", "Bundle ID of the app to download from IPAGo server") host := flag.String("h", "", "Host IPAGo server") @@ -233,8 +232,17 @@ func main() { pswd := flag.String("pswd", "", "Password to login to IPAGo server") query := flag.String("q", "", "Query to search for apps on IPAGo server (example: TikTok)") limit := flag.Int("l", 1, "Limit of apps to search for on IPAGo server") + outputPath := flag.String("o", "", "Output path to save the app") flag.Parse() + if *outputPath == "" { + fmt.Println("output path is required") + flag.PrintDefaults() + os.Exit(1) + } + + os.MkdirAll(*outputPath, 0755) + if *host == "" { fmt.Println("host is required") flag.PrintDefaults()