Code Monkey home page Code Monkey logo

tab-extract's Introduction

Tab Extract

A quick hack to pull out the addresses in all of your Google Chrome for Android tabs.

What

This is a quick Python 3 script I wrote to extract all of the URLs (or URIs) from Chrome tab files usually located somewhere like /data/data/com.android.chrome/app_tabs and probably accessible only via root. Use adb shell or something and copy all those files somewhere to analyze them.

Why

I got myself into a weird thing where I kept opening up tabs as one does and before I knew it I just had too many. They weren't available on the "tabs from other devices" and such in Chrome on my desktop, so I decided to come up with something to find them.

How

Do something like:

find . -name "tab*" |xargs ./extract.py |sort |uniq > urls.txt

But...

Yeah, this is a hack. I don't really parse the files, I just look for things that start with something like a url. A short list of issues are:

  • Weird characters sometimes ... I just look for \x00 to terminate the string and obviously something else is going on with this format
  • Weird encoding errors ... I just fudged in Latin-1 but you will probably want something else if you aren't mostly browsing English sites. With the script as is it should spit out the name of the problem file, so maybe skip the sort and uniq above first.
  • Multiple results per file ... Not sure... sometimes the address I want is the first, sometimes it is the last, I have some flags in there for your to try but for now I just dump them all out.

But!

Okay! Let me know. Not sure how much I can help, but maybe you can?

Last update: February 2018

tab-extract's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.