Skip to content

Instantly share code, notes, and snippets.

View tonylambiris's full-sized avatar

Tony Lambiris tonylambiris

  • Boston, MA
View GitHub Profile
@tonylambiris
tonylambiris / cmd.txt
Created October 20, 2018 04:45
Reset nautilus as default mime-type for inode/directory
xdg-mime default org.gnome.Nautilus.desktop inode/directory
@tonylambiris
tonylambiris / dnsmasq.conf
Created October 19, 2018 23:54
NetworkManager drop-in configuration for dnsmasq
interface=lo
bind-interfaces
localise-queries
strict-order
log-queries
cache-size=1000
no-negcache
no-hosts
domain-needed
expand-hosts
@tonylambiris
tonylambiris / binaryninja.sh
Created October 1, 2018 19:13
Binary Ninja startup script
#!/bin/bash
pushd ~/binaryninja &>/dev/null
test -f libcurl.so.4 || ln -sf /usr/lib/libcurl-openssl-1.0.so libcurl.so.4
cd plugins
test -f libpython2.7.so.1 || ln -sf /usr/lib/libpython2.7.so libpython2.7.so.1
test -f libpython3.so.1 || ln -sf /usr/lib/libpython3.so libpython3.so.1
popd &>/dev/null
LD_LIBRARY_PATH=$HOME/binaryninja/plugins $HOME/binaryninja/binaryninja
@tonylambiris
tonylambiris / binaryninja.desktop
Last active October 1, 2018 19:13
Binary Ninja desktop file
[Desktop Entry]
Name=Binary Ninja
Exec=/home/user/bin/binaryninja.sh %u
Icon=/home/user/binaryninja/docs/img/logo.png
Terminal=false
Type=Application
MimeType=application/x-binaryninja;x-scheme-handler/binaryninja;
Categories=Utility;
Comment=Binary Ninja: A Reverse Engineering Platform
@tonylambiris
tonylambiris / keybase.md
Created September 21, 2018 17:34
Keybase proof

Keybase proof

I hereby claim:

  • I am tonylambiris on github.
  • I am tonylambiris (https://keybase.io/tonylambiris) on keybase.
  • I have a public key ASDH6G0Q8e4k_7uHjk4_4zzXOzadL7FQ7DeIHgoYW7tIBwo

To claim this, I am signing this object:

@tonylambiris
tonylambiris / spotify.preload.c
Created September 5, 2018 16:39 — forked from mdierolf/spotify.preload.c
An LD_PRELOAD fix for a really stupid spotify problem
// Save this file somewhere as spotify.preload.c
// Then build the library:
// gcc -fPIC -shared -o ~/spotify.preload.so spotify.preload.c -ldl
// When you execute spotify, you need to preload this library, which wraps the "setsockopt" function call with another function that gives spotify the results it expects:
// LD_PRELOAD=~/spotify.preload.so spotify
// To make the desktop icon work, edit: /usr/share/applications/spotify.desktop
// Change Exec=... to:
@tonylambiris
tonylambiris / authors.py
Created August 9, 2018 19:09
Parse authors from git log
#!/usr/bin/env python2
# script to extract commit author's name from standard input. The
# input should be <AUTHOR>:<EMAIL>, one per line.
# This script expects the input is created by git-log command:
#
# git log --format=%aN:%aE
#
# This script removes duplicates based on email address, breaking a
# tie with longer author name. Among the all author names extract the
@tonylambiris
tonylambiris / dlopen.c
Created July 28, 2018 00:48
gposttl shared library tokenizer test
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
int (*initialize_tagger)(char *envp);
void (*destroy_tagger)(void);
char *(*Tokenizer)(char *buff);
char *(*tag)(char *buf, int enhanced_penntag);
int main(int argc, char **argv) {
@tonylambiris
tonylambiris / enable_plugins.py
Last active April 28, 2020 19:21
Enable plugins for Binary Ninja
# vim: ft=python sw=4 ts=4 et
from pprint import pprint
mgr = RepositoryManager()
# add third-party plugins with the following:
# mgr.add_repository(url="https://github.com/GitMirar/BinaryNinjaYaraPlugin.git",
# repopath="plugins",
# localreference="master",
@tonylambiris
tonylambiris / ffmpeg.sh
Created June 15, 2018 20:43
Covert mkv to mp4 using ffmpeg
#!/bin/bash
# copy video stream instead of re-encoding
ffmpeg -i input.mkv -acodec mp3 -strict -2 -vcodec copy output.mp4