Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save picatz/28a8d8c9983a54a0cbd2a96f71778d9f to your computer and use it in GitHub Desktop.
Save picatz/28a8d8c9983a54a0cbd2a96f71778d9f to your computer and use it in GitHub Desktop.
Violent Ruby: Streaming REST API Unix Password Cracker Basic Stream
post '/crack_passwords' do
content_type :json
config = {
file: params['file'][:tempfile],
dictionary: params['dictionary'][:tempfile]
}
stream do |out|
ViolentRuby::UnixPasswordCracker.new(config).crack do |result|
out << result.to_json
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment