This file contains hidden or 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
#!/bin/bash | |
pnam=$(basename "$0") | |
usage="$pnam [-b] [-n] [-v] KeySequence | |
$pnam {-h|--help} | |
" | |
adb_shell_input_keyevent() { | |
$verbose && echo "adb shell input keyevent $1" | |
$dryrun || adb shell -n input keyevent $1 | |
} |
This file contains hidden or 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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains hidden or 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
#coding:utf-8 | |
import urllib | |
import BeautifulSoup | |
import urlparse | |
import time | |
def main(): | |
urlList = open("seed.txt","r").read().splitlines() | |
allowDomainList = set(open("allowDomain.txt","r").read().splitlines()) |
This file contains hidden or 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
#http://www.diveintopython.net/html_processing/extracting_data.html | |
#https://docs.python.org/2/library/robotparser.html | |
import robotparser | |
import urllib | |
import csv | |
from urlparse import urlparse | |
def get_page(url): | |
sock = urllib.urlopen(url) | |
htmlSource = sock.read() | |
sock.close() |
This file contains hidden or 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
from BeautifulSoup import BeautifulSoup | |
def _remove_attrs(soup): | |
for tag in soup.findAll(True): | |
tag.attrs = None | |
return soup | |
def example(): | |
doc = '<html><head><title>test</title></head><body id="foo" onload="whatever"><p class="whatever">junk</p><div style="background: yellow;" id="foo" class="blah">blah</div></body></html>' |