Skip to content

Instantly share code, notes, and snippets.

@JBirdVegas
Created March 8, 2013 20:42
Show Gist options
  • Save JBirdVegas/5119685 to your computer and use it in GitHub Desktop.
Save JBirdVegas/5119685 to your computer and use it in GitHub Desktop.
Grab all webview stored passwords
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));
}
}
@JBirdVegas
Copy link
Author

@JBirdVegas
Copy link
Author

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