-
Notifications
You must be signed in to change notification settings - Fork 8
/
ipa-deb.py
executable file
·99 lines (63 loc) · 2.43 KB
/
ipa-deb.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import sys
import zipfile
import os
import shutil
import time
print('''
██╗██████╗░░█████╗░░░░░░░██████╗░███████╗██████╗░
██║██╔══██╗██╔══██╗░░░░░░██╔══██╗██╔════╝██╔══██╗
██║██████╔╝███████║█████╗██║░░██║█████╗░░██████╦╝
██║██╔═══╝░██╔══██║╚════╝██║░░██║██╔══╝░░██╔══██╗
██║██║░░░░░██║░░██║░░░░░░██████╔╝███████╗██████╦╝
╚═╝╚═╝░░░░░╚═╝░░╚═╝░░░░░░╚═════╝░╚══════╝╚═════╝░
''')
print('By CaspD3V ;)')
file = input("iPA File Name: ")
source = ''+file+'.ipa'
dest = ''+file+'.zip'
os.rename(source, dest)
print("Turning iPA Into ZIP...")
print("Done Renaming.")
with zipfile.ZipFile(''+file+'.zip', 'r') as zip_ref:
zip_ref.extractall('Extracted')
print("Extracting Archive..")
time.sleep(20)
print("Done Extracting.")
os.chdir('Extracted')
source1 = 'Payload'
dest1 = 'Applications'
print("Making Applications Folder")
os.rename(source1, dest1)
path = "DEBIAN"
try:
os.mkdir(path)
except OSError:
print ("Creation of the directory %s failed" % path)
else:
print ("Successfully created the directory %s " % path)
print("Making DEBIAN Folder")
os.chdir('DEBIAN')
print("Making control File")
bid = input("Bundle ID: ")
name = input("Name: ")
ver = input("Version: ")
desc = input("Description: ")
maintain = input("Maintainer: ")
auth = input("Auther: ")
f = open('control',"w+")
for i in range(1):
f.write('Package: '+bid+'\nName: '+name+'\nDepends: \nVersion: '+ver+'\nArchitecture: iphoneos-arm\nDescription: '+desc+'\nMaintainer: '+maintain+'\nAuthor: '+auth+'\nSection: Applications\n')
f.close()
print("Done With Control File...")
os.chdir('../../')
print("Packaging Deb..")
os.system('dpkg-deb -b Extracted')
print("Cleaning Up..")
source2 = 'Extracted.deb'
dest2 = ''+file+'.deb'
os.rename(source2, dest2)
source3 = ''+file+'.zip'
dest3 = ''+file+'.ipa'
os.rename(source3, dest3)
removedir = "Extracted"
shutil.rmtree(removedir)