Skip to content

Instantly share code, notes, and snippets.

@cormacrelf
cormacrelf / pwdpractise.rb
Created July 16, 2011 03:20
Ruby Password Practise
# Ruby Password Practise Utility
#!/usr/local/bin/ruby
require 'rubygems'
require 'highline/import'
$password = ask("Enter your password: ") { |q| q.echo = "*" }
puts "Now type your password and hit return."
$success = 0
def check(possible)
if possible == $password
@cormacrelf
cormacrelf / Spacedust.tmTheme
Created June 12, 2011 04:43
Spacedust TextMate theme - hand-transferred from Xcode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Spacedust</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@cormacrelf
cormacrelf / Crack.rb
Created June 12, 2011 02:59
Ruby Vigenere Cipher cracker (password list)
class EnumLike
@server_Symb=[:a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, :l, :m, :n, :o, :p, :q, :r, :s, :t, :u, :v, :w, :x, :y, :z]
@string_array=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
def EnumLike.hash_of_symbols
server_Enum=Hash::new
i=1
@server_Symb.each{ |e| server_Enum[e]=i; i +=1}
return server_Enum
end