Posts Tagged ‘ ruby ’
To jest kod skryptu w Ruby do wyświetlania definicji ze “Słownika Wyrazów Obcych Kopalińskiego”. Pobierz plik kopalinski.rb. Żeby użyć tego skryptu musisz mieć zainstalowanego Ruby-ego. W terminalu wpisz: kopalinski.rb Słownik Skrypt wyświetli definicje słowa “Słownik”. Jeśli w słowniku Kopalińskiego nie ma jakiegoś słowa skrypt nie wyświetla nic[ READ MORE ]
This is a script in Ruby, that I wrote, which use filestube.com to search files on rapidshare (It don’t use filestube API — it just fetch and parse html). #!/usr/bin/ruby require 'net/http' require 'uri' require 'optparse' require 'rexml/document' def get(url, data=nil) url = URI.parse(url) http = Net::HTTP.new(url.host) if data data = data.map{|k,v| "#{k}=#{url_escape(v)}"}.reduce {|a,b| "#{a}&#{b}" [ READ MORE ]
This is script which I wrote for testing if file exist on rapidshare hosting service, it use Rapidshare API require 'net/http' require 'uri' require 'optparse' class FalseException < Exception end def check(file, quiet=nil) file.each_line {|url| begin url = url.stript #skip blank lines, comments and invalid urls if url =~ /^\s*$/ or url =~ /^\s*#/ or [ READ MORE ]
Aby ściągnąć pliki z wrzuty w Ruby, należy ze strony danego adresu odczytać zmienne javascript-u które zostaną przekazane do odtwarzacza napisanego we flashu. require 'net/http' require 'uri' require 'rexml/document' def get(url) url = URI.parse(url) http = Net::HTTP.new(url.host) return http.get(url.path).body end page = get(url) #zczytanie zmiennych javascript if page =~ /'key' : '([^']*)',/ key = $1 [ READ MORE ]
I’ve create my first github project Downloader. It’s a Ruby script for download files from file hosting services. You can download files from 4shared, rapidshare, przeklej, filesonic and wrzuta. You can download it from github or from here. You can use it: download.rb <url> or download.rb -f <file with urls> If you download files from [ READ MORE ]
Here is the code for bruteforce md5 hash. It check only small letters. require 'digest/md5' def crack(hash, max_length) for i in 1..max_length for word in ('a'*i..'z'*i) if Digest::MD5.new(word) == hash return word end end end end puts crack(ARGV[0], 5)[ READ MORE ]
Get every new post delivered to your Inbox.
Join 69 other followers