Skip to content

Instantly share code, notes, and snippets.

@dirkakrid
dirkakrid / 0deodex.md
Created May 21, 2016 16:45 — forked from dweinstein/0deodex.md
tools for deodex android--must download the .jar files separately (smali/baksmali: https://bitbucket.org/JesusFreke/smali/downloads | apktool: https://bitbucket.org/iBotPeaches/apktool/downloads)

A few utilities to help with de-odexing.

You'll need to download baksmali/smali/apktool jars and link/rename the jars as appropriate (e.g., apktool.jar, smali.jar, baksmali.jar) in the directory with these scripts.

You can grab the utilities (currently) from bitucket:

@dirkakrid
dirkakrid / SB3
Last active July 9, 2016 14:57
SB3 Build 3103
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@dirkakrid
dirkakrid / download.sh
Created September 24, 2016 04:50 — forked from mildred/download.sh
Download from archive.org Wayback Machine
#!/bin/bash
url=http://redefininggod.com
webarchive=https://web.archive.org
wget="wget -e robots=off -nv"
tab="$(printf '\t')"
additional_url=url.list
# Construct listing.txt from url.list
# The list of archived pages, including some wildcard url
@dirkakrid
dirkakrid / server.py
Created September 24, 2016 06:23 — forked from mildred/server.py
Python 3 http.server with PUT support
#!/usr/bin/env python
import argparse
import http.server
import os
class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def do_PUT(self):
path = self.translate_path(self.path)
if path.endswith('/'):
@dirkakrid
dirkakrid / howto_nat_traversal.md
Created September 24, 2016 06:27 — forked from mildred/howto_nat_traversal.md
How To TCP NAT Traversal using Node.js and a STUN Server

How To TCP NAT Traversal using Node.js and a STUN Server

With the scarecity of IPv4 addresses, and IPv6 still not available at large, NAT traversal is becoming a necessity. Especially with the generalisation of Carrier-grade NATs that you can find on mobile connections. Even with IPv6 you may suffer NAT66. Imagine your mobile device that gets only a single Ipv6 address, and you want to share it on your computer.

The solution might be in a decentralized protocol for address attribution such

@dirkakrid
dirkakrid / api.py
Created September 27, 2016 08:10 — forked from jeffbrl/api.py
Simple JSON API example in Python
# test with
# curl -X POST -H "Content-Type: application/json" -d '{ "action" : "RUN"}'
# http://127.0.0.1:5000/example/
import json
from flask import request, url_for
from flask.ext.api import FlaskAPI, status, exceptions
app = FlaskAPI(__name__)
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""xml2json.py Convert XML to JSON
Relies on ElementTree for the XML parsing. This is based on
pesterfish.py but uses a different XML->JSON mapping.
The XML->JSON mapping is described at
http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
@dirkakrid
dirkakrid / xml2json.py
Created October 4, 2016 07:33 — forked from anonymous/xml2json.py
xml 2 json, with some utils, like ensureUnicode, ensureAscii, etc.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""xml2json.py Convert XML to JSON
Relies on ElementTree for the XML parsing. This is based on
pesterfish.py but uses a different XML->JSON mapping.
The XML->JSON mapping is described at
http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
@dirkakrid
dirkakrid / snippet.py
Created October 4, 2016 07:36 — forked from zhasm/snippet.py
python snippets
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#author: rex
#blog: http://iregex.org
#
import re
from os.path import dirname as dirname
@dirkakrid
dirkakrid / example.py
Created October 11, 2016 07:56 — forked from crazed/example.py
example doing parallel junos pyez execution
import time
from multiprocessing import Pool
from pprint import pprint
from optopus import Client, OPTOPUS_ENDPOINT
from jnpr.junos import Device
# work in progress
class MetaStore(object):
"""