Created
March 8, 2013 20:42
-
-
Save JBirdVegas/5119685 to your computer and use it in GitHub Desktop.
Grab all webview stored passwords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jbirdvegas.webview; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.ArrayAdapter; | |
import android.widget.ListView; | |
import com.jbirdvegas.webview.aokp.CMDProcessor; | |
import com.jbirdvegas.webview.aokp.Executable; | |
import java.util.ArrayList; | |
public class PasswordFinder extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
CMDProcessor cmdProcessor = new CMDProcessor(); | |
setContentView(R.layout.main); | |
Executable findFiles = new Executable("find /data/data/. | grep webview.db"); | |
ArrayList<String> rowList = new ArrayList<String>(0); | |
for (String db : cmdProcessor.su.runWaitFor(findFiles).getStdout().split("\n")) | |
rowList.add(cmdProcessor.su.runWaitFor(new Executable( | |
String.format("sqlite3 -cmd \"SELECT * FROM password;\" %s '.quit'", db))).getStdout()); | |
((ListView) findViewById(R.id.listView)).setAdapter(new ArrayAdapter<String>(this, | |
android.R.layout.simple_list_item_1, android.R.id.text1, rowList)); | |
} | |
} |
or from a shell
find /data/data/. | grep webview.db | while read line
do sqlite3 -cmd "SELECT * FROM password;" ${line} '.quit'
done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
full code: https://github.com/JBirdVegas/android_webview_PasswordFinder