Created
March 27, 2011 12:32
-
-
Save leejarvis/889167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# who the fuck said Ruby couldn't be hacky, NEVER DO THIS IT IS STUPID | |
require 'socket' | |
($s = TCPSocket.new(*ARGV.map {|a| Integer(a) rescue a }) rescue nil) or 'Usage: fail <server> <port>' | |
def w(*a); $s.write a.join("\r\n") + "\r\n"; end; w 'NICK asdf', "USER #{'asdf' * 3} :asdf" | |
until $s.eof?; $s.gets[/PING :(.+)/] && w('PONG ' + $1); end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/892172