We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1e30b6 commit 64e7f13Copy full SHA for 64e7f13
lib/msf/core/payload/apk.rb
@@ -241,6 +241,10 @@ def backdoor_apk(apkfile, raw_payload)
241
242
print_status "Rebuilding #{apkfile} with meterpreter injection as #{injected_apk}\n"
243
run_cmd("apktool b -o #{injected_apk} #{tempdir}/original")
244
+ unless File.readable?(injected_apk)
245
+ raise RuntimeError, "Unable to rebuild apk with apktool"
246
+ end
247
+
248
print_status "Signing #{injected_apk}\n"
249
run_cmd("jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore #{keystore} -storepass #{storepass} -keypass #{keypass} #{injected_apk} #{keyalias}")
250
print_status "Aligning #{injected_apk}\n"
0 commit comments