added owasp search client in misc_rbtools
This commit is contained in:
parent
4d22e3194a
commit
46398dde86
1 changed files with 30 additions and 0 deletions
30
owasp_search.rb
Executable file
30
owasp_search.rb
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# owasp search
|
||||||
|
# https://github.com/kenpratt/wikipedia-client
|
||||||
|
# reusing this gem with owasp url instead
|
||||||
|
|
||||||
|
require 'wikipedia'
|
||||||
|
|
||||||
|
|
||||||
|
Wikipedia.configure do
|
||||||
|
protocol 'https'
|
||||||
|
domain 'www.owasp.org'
|
||||||
|
path '/api.php'
|
||||||
|
user_agent(
|
||||||
|
'owasp-client/0.1 (https://github.com/booboy/owasp-client)'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
search_term = ARGV[0]
|
||||||
|
|
||||||
|
page = Wikipedia.find( search_term )
|
||||||
|
|
||||||
|
puts page.title
|
||||||
|
puts '-----------------------------------------------------------------'
|
||||||
|
puts page.fullurl
|
||||||
|
puts '-----------------------------------------------------------------'
|
||||||
|
puts page.content
|
||||||
|
puts '-----------------------------------------------------------------'
|
||||||
|
puts page.links
|
||||||
|
puts '-----------------------------------------------------------------'
|
Loading…
Add table
Reference in a new issue