Skip to content

Instantly share code, notes, and snippets.

View fovtran's full-sized avatar
💭
I may be slow to respond.

Diego C. fovtran

💭
I may be slow to respond.
  • DMC
  • Argentina
View GitHub Profile
@fovtran
fovtran / twitter_status_by_id
Created June 18, 2013 08:22
REST v1.1 Twitter API 1st Status reader
#!/usr/bin/perl
# REST v1.1 Twitter API 1st Status reader
# DMC2013
# License: LGPL
#
use Net::Twitter;
use Scalar::Util 'blessed';
my $consumer_key = "";
my $consumer_secret = "";
@fovtran
fovtran / gist:5803898
Created June 18, 2013 09:16
ODE + Opensim under FreeBSD 9.0
# Configuring OpenSim+ODE over FreeBSD 9.0
#
optain the package from
Linux Bin: http://opensimulator.org/dist/opensim-0.7.3.1.tar.gz
Source tar: git clone git://opensimulator.org/git/opensim
Configuration files:
./OpenSimDefaults.ini
@fovtran
fovtran / mount_vkernels
Created June 18, 2013 09:45
mount vkernels
#!/bin/csh
# Mounts root images for vKernels
#
set num = 01
set disk = 0
set name = rootimg
set file = /var/vkernel/$name\.$num
set dev = vn$disk
set slice = $dev\s0
@fovtran
fovtran / file_zap
Created June 18, 2013 10:30
Recursive file zeroer (filename remains untouchd)
#!python
#
import os, sys, stat
import optparse
import logging
usage = '''%s [ -z | --zapdestroyall ] path''' % sys.argv[0]
def oswalk(path):
'''dir walk
@fovtran
fovtran / hmac_email_digester_keypass
Last active December 18, 2015 15:29
email list HMAC digester by their names using a single passkey
#!/usr/bin/python
#
import base64
import hmac
import hashlib
import sys,os
mainpass="mysupersecreto"
sitelist = []
@fovtran
fovtran / run.init.XPCOM
Created June 18, 2013 11:18
Mozilla and IE host process execution
var environment = Components.classes["@mozilla.org/process/environment;1"].
getService(Components.interfaces.nsIEnvironment);
var path = environment.get('PATH');
function RunExe(path) {
try {
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("msie") != -1) {
MyObject = new ActiveXObject("WScript.Shell")
MyObject.Run(path);
@fovtran
fovtran / pfx_cert
Created June 18, 2013 11:47
export Personal certificate
#!/bin/sh
#
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /srv/src/private/mycert.pem -out /srv/src/private/mycert.pem
openssl pkcs12 -export -out /srv/src/certs/mycert.pfx -in /srv/src/private/mycert.pem -name "Personal Certificate"
@fovtran
fovtran / pkcs11_pam
Created June 18, 2013 11:53
pkcs11 pam login setup
#!/bin/sh
#
wget -c http://www.opensc-project.org/files/pam_pkcs11/pam_pkcs11-0.6.3.tar.gz
wget -c http://curl.haxx.se/download/curl-7.21.7.tar.bz2
wget -c http://www.dit.upm.es/~jantonio/pam-pkcs11/downloads/pkcs11_login-0.5.1.tar.gz
tar xvzf curl-7.21.7.tar.bz2
cd curl-7.21.7
./configure --prefix=/usr --without-ssl \
--disable-ldap --disable-telnet \
@fovtran
fovtran / certdata.sh
Created June 18, 2013 12:23
read raw NSS certdata
#!/bin/sh
#
echo "Update Mozilla builtin certs"
wget -c http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
@fovtran
fovtran / binaryedit.perl
Created June 18, 2013 12:28
binary file editing
#!/usr/bin/perl
#
use strict;
use warnings;
use bytes;
my $filein = 'cm_cert.cer';
my $fileout = 'temp.cer';
my @pos1 = (328..340);