Skip to content

Instantly share code, notes, and snippets.

View Ricky-Wilson's full-sized avatar
💭
Writing an ADB Lib

Ricky Wilson Ricky-Wilson

💭
Writing an ADB Lib
View GitHub Profile
@Ricky-Wilson
Ricky-Wilson / adb-sendkey
Created March 24, 2020 06:23 — forked from for2ando/adb-sendkey
Automate key input to Android applications and system utilities using input command on any Android device via adb
#!/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
}
@Ricky-Wilson
Ricky-Wilson / AdbCommands
Created March 22, 2020 03:45 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
#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())
#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()
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>'