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: http://www.seehuhn.de/blog/52 | |
| class Timezone(datetime.tzinfo): | |
| def __init__(self, name="+0000"): | |
| self.name = name | |
| seconds = int(name[:-2])*3600+int(name[-2:])*60 | |
| self.offset = datetime.timedelta(seconds=seconds) | |
| def utcoffset(self, dt): | |
| return self.offset |
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
| package main | |
| import "log" | |
| import "time" | |
| import "reflect" | |
| // suggested via http://stackoverflow.com/a/8363629/87207 | |
| func trace(s string) (string, time.Time) { | |
| log.Println("START:", s) | |
| return s, time.Now() |
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
| """ | |
| requirements: | |
| - requests | |
| - unicodecsv | |
| - beautifulsoup4 | |
| """ | |
| import re | |
| import functools | |
| from collections import namedtuple | |
| from collections import defaultdict |
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
| import synapse.link as s_link | |
| import synapse.daemon as s_daemon | |
| import synapse.telepath as s_tele | |
| def log(*args, **kwargs): | |
| print("log %s %s" % (args, kwargs)) | |
| def main(): |
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 | |
| # debian dependencies | |
| sudo apt-get install python3 python3-pip qt5-default python3-pyqt5 git | |
| # get virtualenv package for python3 | |
| sudo pip3 install virtualenv | |
| # prepare a clean Python environment | |
| mkdir env; virtualenv -p python3 env |
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 | |
| # arch dependencies | |
| sudo pacman -S python3 python-pyqt5 git | |
| sudo pip3 install virtualenv | |
| # prepare a clean Python environment | |
| mkdir env; virtualenv -p python3 env |
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
| package main | |
| import ( | |
| "encoding/hex" | |
| "fmt" | |
| uc "github.com/unicorn-engine/unicorn/bindings/go/unicorn" | |
| "strings" | |
| ) | |
| var asm = strings.Join([]string{ |
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
| import sys | |
| import shlex | |
| import logging | |
| from collections import namedtuple | |
| from collections import defaultdict | |
| import colorama | |
| class LINE_TYPES: |
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
| # build wine Docker image | |
| pushd wine; docker build -t wine .; popd | |
| # build x11 Docker image for IDA | |
| pushd ida; docker build -t wine/ida .; popd | |
| # demonstrate x11 forwarding works | |
| docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix wine/ida xclock | |
| # interactive shell in container |
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
| def get_QtCore(): | |
| try: | |
| # IDA 6.8 and below | |
| import PySide.QtCore as QtCore | |
| return QtCore | |
| except ImportError: | |
| # IDA 6.9 | |
| import PyQt5.QtCore as QtCore | |
| return QtCore |