#/*********************************************************** # crypt.rb -- °Å¹æ #***********************************************************/ argc = ARGV.size if (argc < 3 || argc > 4 ||\ (infile = open(ARGV[0], "rb")) == nil ||\ (outfile = open(ARGV[1], "wb")) == nil) $stderr.puts("»ÈÍÑË¡: crypt infile outfile [key]\n") exit 0 end if (argc == 3); srand(ARGV[2].to_i); end while ((c = infile.getc) != nil) begin r = rand * 256 end while (r >= 256) outfile.putc(c ^ r) end exit 0