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
PID USER TIME COMMAND | |
1 root 0:01 init [5] | |
2 root 0:00 [kthreadd] | |
3 root 0:00 [ksoftirqd/0] | |
4 root 0:00 [kworker/0:0] | |
5 root 0:00 [kworker/u:0] | |
6 root 0:00 [khelper] | |
7 root 0:00 [netns] | |
8 root 0:00 [sync_supers] | |
9 root 0:00 [bdi-default] |
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
[ 0.000000] Initializing cgroup subsys cpu | |
[ 0.000000] Linux version 3.0.21+ (benxiwang@benxiwang-Lenovo) (gcc version 4.6.3 20111117 (prerelease) (GCC) ) #1 PREEMPT Mon Oct 10 12:53:23 CST 2016 | |
[ 0.000000] CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c5387d | |
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache | |
[ 0.000000] Machine: QCT MSM9615 CDP | |
[ 0.000000] Partition (from atag) boot -- Offset:2fc Size:52 | |
[ 0.000000] Partition (from atag) sbl2 -- Offset:a Size:1b | |
[ 0.000000] Partition (from atag) rpm -- Offset:25 Size:1b | |
[ 0.000000] Partition (from atag) efs2 -- Offset:40 Size:53 | |
[ 0.000000] Partition (from atag) dsp1 -- Offset:93 Size:1f |
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
- hosts: all | |
remote_user: root | |
tasks: | |
- user: name=name state=present shell=/bin/bash | |
- name: setup resolv.conf | |
lineinfile: path=/run/resolvconf/resolv.conf line='nameserver 8.8.8.8' create=yes state=present | |
- name: hardcode ports.ubuntu.com | |
lineinfile: path=/etc/hosts line='91.189.88.150 ports.ubuntu.com' state=present | |
- name: aptitude | |
apt: name=aptitude state=installed |
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
import os | |
import socket | |
import struct | |
import asyncio | |
import logging | |
DNS_SERVER = '8.8.8.8' | |
DNS_PORT = 53 | |
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
from threading import Thread | |
from scapy.layers.inet import Ether, IP, UDP | |
from scapy.layers.dhcp import DHCP, BOOTP | |
from scapy.config import conf | |
from scapy.arch import get_if_raw_hwaddr, get_if_hwaddr | |
from scapy.sendrecv import sniff, sendp | |
import queue | |
import time | |
BOOTREPLY = 2 | |
def dhcp_reqresp(interface="wwan0", timeout=5): |
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
f = open('/dev/urandom', 'rb') | |
default_n = 1000000 | |
max_r = 256 | |
def r1dx(x=20): | |
while True: | |
# get one byte, take as int on [1,256] | |
r = int.from_bytes(f.read(1), 'little')+1 | |
# if byte is less than the max factor of 'x' on the interval max_r, return r%x+1 | |
if r < (max_r-(max_r%x)+1): return (r%x)+1 |
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
# | |
# Automatically generated make config: don't edit | |
# Linux/arm 3.0.21 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_SYS_SUPPORTS_APM_EMULATION=y | |
CONFIG_HAVE_SCHED_CLOCK=y | |
CONFIG_GENERIC_GPIO=y | |
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set | |
CONFIG_GENERIC_CLOCKEVENTS=y |
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
import asyncio | |
import sys | |
async def test(): | |
1//0 | |
loop = asyncio.get_event_loop() | |
def asyncio_handler(loop, context): | |
print("XXXX", "got", context) |
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
gcc -O2 -DNDEBUG -fpic -DARM -DARCH="ARM" -DLINUX -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_LITTLE_ENDIAN -fno-omit-frame-pointer -fno-strict-aliasing -static-libgcc -I./sqlite -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT2 -DHAVE_READLINE=0 -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DTEMP_STORE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_DEPRECATED -DSQLITE_OS_UNIX=1 -c ./sqlite/sqlite3.c -o sqlite3.o | |
gcc -O2 -DNDEBUG -fpic -DARM -DARCH="ARM" -DLINUX -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_LITTLE_ENDIAN -fno-omit-frame-pointer -fno-strict-aliasing -static-libgcc -I./sqlite -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_STAT2 -DHAVE_READLINE=0 -DSQLITE_THREADSAFE= |