Skip to content

Instantly share code, notes, and snippets.

View meh's full-sized avatar

meh. meh

View GitHub Profile
@meh
meh / IA32 Opcodes
Created July 6, 2009 13:59
IA32 opcodes list (partial)
All values are hexadecimal.
If [reg32] is [esp] add 24 at the end.
00 00-3f add [reg32],reg8
00 40-7f xx add [reg32+xx],reg8
01 00-3f add [reg32],reg32
01 40-7f xx add [reg32+xx],reg32
01 c0-ff add reg32,reg32
@meh
meh / gen-pass.js
Created July 6, 2009 14:06
ljs password generator
#! /usr/bin/env ljs
var range = (arguments.shift() || "15-20").split(/-/);
var charset = new RegExp(arguments.shift() || "[a-zA-Z0-9]");
var regex = new RegExp(arguments.shift() || ".");
var length = ((Math.random() * (range[1].toNumber() - range[0].toNumber())) + range[0].toNumber()).ceil();
do {
var password = "";
@meh
meh / braille.js
Created July 6, 2009 16:25
Braille to ASCII & ASCII to Braille
#! /usr/bin/env ljs
braille = [
['1', '⠼⠁'],
['2', '⠼⠃'],
['3', '⠼⠉'],
['4', '⠼⠙'],
['5', '⠼⠑'],
['6', '⠼⠋'],
['7', '⠼⠛'],
{ aa_IA32_Opcodes_add_name, "\x00\x0b", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %cl, (%ebx) */
{ aa_IA32_Opcodes_add_name, "\x00\x0c\x24", 3, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %cl, (%esp) */
{ aa_IA32_Opcodes_add_name, "\x00\x0d", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %cl, (%ebp) */
{ aa_IA32_Opcodes_add_name, "\x00\x0e", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %cl, (%esi) */
{ aa_IA32_Opcodes_add_name, "\x00\x0f", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %cl, (%edi) */
{ aa_IA32_Opcodes_add_name, "\x00\x10", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %dl, (%eax) */
{ aa_IA32_Opcodes_add_name, "\x00\x11", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb %dl, (%ecx) */
{ aa_IA32_Opcodes_add_name, "\x00\x12", 2, 0, AARegister8Operand, AAMemoryFromRegister32Operand }, /* addb
/* addb %cl, (%ebx) */
AA_OPCODE(IA32, add, "\x00\x0b", 2, 0,
AA_OPCODE_OPERAND(AARegister8Operand, AA_OPCODE_REGISTER(IA32, CL)),
AA_OPCODE_OPERAND(AAMemoryFromRegister32Operand, AA_OPECODE_REGISTER(IA32, EBX))),
/* addb %cl, (%esp) */
AA_OPCODE(IA32, add, "\x00\x0c\x24", 3, 0,
AA_OPCODE_OPERAND(AARegister8Operand, AA_OPCODE_REGISTER(IA32, CL)),
AA_OPCODE_OPERAND(AAMemoryFromRegister32Operand, AA_OPECODE_REGISTER(IA32, ESP))),
@meh
meh / lulzBot.rb
Created July 14, 2010 07:23
lol a bot
We couldn’t find that file to show.
@meh
meh / gist:652101
Created October 28, 2010 19:10
packo example testing
#<Stage: dependencies ({:at=>:beginning})> []
#<Stage: fetch ({:after=>:dependencies})> []
#<Stage: fetching ({:after=>:fetch})> []
wget "-c" "-O" "/tmp/ncurses-5.7.tar.gz" "http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz"
--2010-10-29 00:54:36-- http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz
Resolving ftp.gnu.org... 140.186.70.20
Connecting to ftp.gnu.org|140.186.70.20|:80... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable
The file is already fully retrieved; nothing to do.
>> require 'versionomy'
NoMethodError: undefined method `metaclass' on Versionomy::Format::Standard (Module)
kernel/delta/kernel.rb:79:in `metaclass (method_missing)'
/usr/local/rvm/gems/rbx-head/gems/blockenspiel-0.4.1/lib/blockenspiel/unmixer_rubinius.rb:55:in `unmix'
/usr/local/rvm/gems/rbx-head/gems/blockenspiel-0.4.1/lib/blockenspiel/impl.rb:481:in `_execute_dsl'
/usr/local/rvm/rubies/rbx-head/lib/thread.rb:119:in `synchronize'
/usr/local/rvm/gems/rbx-head/gems/blockenspiel-0.4.1/lib/blockenspiel/impl.rb:477:in `_execute_dsl'
/usr/local/rvm/gems/rbx-head/gems/blockenspiel-0.4.1/lib/blockenspiel/impl.rb:371:in `_invoke_with_block'
/usr/local/rvm/gems/rbx-head/gems/blockenspiel-0.4.1/lib/blockenspiel/impl.rb:298:in `invoke'
/usr/local/rvm/gems/rbx-head/gems/versionomy-0.4.1/lib/versionomy/schema/wrapper.rb:55:in `create'
/usr/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
-- control frame ----------
c:0023 p:---- s:0081 b:0081 l:000080 d:000080 CFUNC :require
c:0022 p:0053 s:0077 b:0077 l:000076 d:000076 METHOD /usr/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
c:0021 p:0012 s:0070 b:0070 l:000061 d:000069 BLOCK /usr/lib/ruby/gems/1.9.1/gems/datamapper-1.1.0/lib/datamapper.rb:12
c:0020 p:---- s:0067 b:0067 l:000066 d:000066 FINISH
c:0019 p:---- s:0065 b:0065 l:000064 d:000064 CFUNC :each
c:0018 p:0028 s:0062 b:0062 l:000061 d:000061 TOP /usr/lib/ruby/gems/1.9.1/gems/datamapper-1.1.0/lib/datamapper.rb:3
>> require 'versionub'
=> true
>> Versionub.parse('2.3')
TypeError: Tried to use object of type PackedObject (45) as type ByteArray (11)
/usr/local/rvm/gems/rbx-head/gems/versionub-0.0.6/lib/versionub/type.rb:32:in `initialize'
/usr/local/rvm/gems/rbx-head/gems/versionub-0.0.6/lib/versionub/type.rb:92:in `parse'
/usr/local/rvm/gems/rbx-head/gems/versionub-0.0.6/lib/versionub.rb:26:in `parse'
(ripl):2:in `__script__'
kernel/common/block_environment.rb:72:in `call_on_instance'
kernel/common/eval.rb:74:in `eval'