Skip to content

Instantly share code, notes, and snippets.

@wodim
wodim / ewoks.py
Last active December 3, 2016 20:33
from datetime import datetime
import os
import pickle
import sys
import markovify
import tweepy
CONFIG_KEYS = {
@wodim
wodim / bigfile_extract.py
Created January 4, 2016 16:08
Extracts files inside BFZ archives (Cryo BigFile)
# wodim, 04/01/2016 -- public domain
import mimetypes
import os
import sys
import zlib
import magic
WORD_SIZE = 4
@wodim
wodim / molten.pl
Created November 17, 2015 22:49
Script I used back in old Molten-WoW to vote and get points automatically.
use strict;
use warnings;
use LWP::UserAgent;
use HTTP::Request::Common;
use HTTP::Cookies;
use warnings;
use POSIX;
use HTML::Tree;
print "Not enough arguments (usage: $0 account password)\n" and exit unless ($#ARGV > 0);
@wodim
wodim / proxy.py
Last active October 26, 2015 14:50
MITM proxy with Twisted. Can be used to tamper with traffic by modifying the rules.json file while it is running.
LISTEN_PORT = 8085
SERVER_PORT = 8085
SERVER_ADDR = "37.187.171.215"
BIND_ADDR = ("10.14.88.15", 0)
from twisted.internet import protocol, reactor
import json
class RulesLoader():
use Irssi;
use vars qw($VERSION %IRSSI);
use strict;
use warnings;
use Capture::Tiny ':all';
$VERSION = '1.2'; # :D
%IRSSI = (
authors => 'Adolf Hitler',
contact => '',
@wodim
wodim / mykiller.py
Last active June 14, 2017 21:22
MyKiller
# This is a Python script that runs as a daemon and will monitor and
# eventually kill queries that are taking too long.
import os
import time
import pymysql as mysql
timeout_min = 2
@wodim
wodim / interfaces
Created January 2, 2015 20:23
Archivo interfaces para NAT y host-only (VirtualBox)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 192.168.4.103
@wodim
wodim / seconds_to_hhmmss.js
Last active August 29, 2015 14:11
YASTHHMMSSF (Yet Another Seconds To HHMMSS Function)
var seconds_to_hhmmss = function(seconds) {
if (seconds < 0 || isNaN(seconds)) {
return "--:--";
}
var hh = (seconds / 3600);
hh = Math.floor(hh);
hh = hh < 10 ? "0" + hh : hh;
var mm = (seconds / 60) % 60;
mm = Math.floor(mm);
@wodim
wodim / migrate.py
Last active August 29, 2015 14:08
Script para migrar de escriure a WordPress
# -*- coding: utf-8 -*-
import sqlite3
import MySQLdb
import os
import sys
import mimetypes
admin_nick = "wodim"
admin_email = "lalala@lalala.com"
@wodim
wodim / poster.py
Created September 19, 2014 12:41
Python script to post images to Twitter. (Needs tweepy)
# -*- coding: utf-8 -*-
import re
import requests
import sys
import md5
import magic
import os
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler