Skip to content

Commit

Permalink
removed the optparse livrary requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
liamja committed Mar 3, 2012
1 parent 90031c9 commit 27039ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions torrent-parser.rb
@@ -1,12 +1,11 @@
require 'rubygems' require 'rubygems'
require 'bencode' require 'bencode'
require 'digest/sha1' require 'digest/sha1'
require 'optparse'


ARGV.each do|file| ARGV.each do|file|
puts "File: #{file}"
torrent = BEncode.load_file( file ) torrent = BEncode.load_file( file )
info_hash = Digest::SHA1.hexdigest( torrent['info'].bencode ) info_hash = Digest::SHA1.hexdigest( torrent['info'].bencode )
puts "File: #{file}"
puts "Hash: #{info_hash}" puts "Hash: #{info_hash}"
puts "---" puts "---"
end end

0 comments on commit 27039ca

Please sign in to comment.