I hereby claim:
- I am cvonkleist on github.
- I am cvk (https://keybase.io/cvk) on keybase.
- I have a public key whose fingerprint is E35D 9C97 586E 0A26 C1A3 E1E2 6C35 1436 B89F AE48
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| int main(int argc, char **argv) { | |
| char server[20] = "wwwsearch.bing.com"; | |
| int result_count; | |
| char query[20]; | |
| char command[100]; | |
| char buffer[10000]; |
| #!/usr/bin/env ruby | |
| class Array | |
| def random; self[rand(self.length)]; end | |
| end | |
| # extended by actual player classes | |
| class Player | |
| attr_reader :name | |
| def initialize(name) |
| # This is a method I use when working with slow ruby scripts that | |
| # operate on huge datasets. | |
| # | |
| # It caches the return value of a block of extremely slow code | |
| # in a file so that subsequent runs are fast. | |
| # | |
| # It's indispensable to me when doing edit-debug-edit-debug-edit | |
| # cycles on giant datasets. | |
| # loads ruby object from a cache file or (if cache file doesn't exist) runs |
| lockdown: | |
| - change passwords for all shell accounts and come up with policy | |
| - remove ssh authorized_keys | |
| - change mysql root password | |
| - grep for any | |
| - restart mysql with query logging -> mysql --log=/var/log/mysql | |
| - change mysql passwords | |
| - |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main(int argc, char **argv) { | |
| char buf[14]; | |
| char *pass, *salt; | |
| if(argc < 3) { | |
| printf("usage: %s password salt\n", argv[0]); | |
| return 1; |
| #!/usr/bin/env ruby | |
| PASS_BIN = 'pass' | |
| SHADOW_FILE = ARGV[0] | |
| lines = File.read(SHADOW_FILE).split("\n") | |
| def generate_password(user) | |
| 'houdini!@#' + user | |
| end |
| loaded 71 hackers | |
| testing: s.matches_are_sane? = true | |
| getting new hackers | |
| hacker1 will probably defeat hacker2 | |
| picking hacker1 | |
| @sequence = "L" (1) | |
| i know about 1412 hacker matches | |
| guessing accuracy == 0.00% | |
| checking on last guess and getting new hackers | |
| last guess was good |
| # first, run protocol.rb for a little while to get some match data into gamelog | |
| $ ruby protocol.rb | |
| ...later... | |
| # then, run smart.rb (reads gamelog and plays games with the server until it wins) | |
| $ ruby smart.rb |
| #!/usr/bin/env ruby | |
| # can be called like this: | |
| # | |
| # spec_run.rb foo.rb | |
| # spec_run.rb foo_spec.rb | |
| # spec_run.rb foo.rb -e "some test case" | |
| ruby_file = "" + ARGV.shift |