esearchy 0.2.0.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/esearchy +12 -4
- data/lib/esearchy/esearchy.rb +1 -1
- data/lib/esearchy/genericengine.rb +6 -2
- metadata +20 -5
data/bin/esearchy
CHANGED
@@ -89,7 +89,8 @@ opts = GetoptLong.new(
|
|
89
89
|
[ '--output','-o', GetoptLong::REQUIRED_ARGUMENT ],
|
90
90
|
[ '--yahookey','-y', GetoptLong::REQUIRED_ARGUMENT ],
|
91
91
|
[ '--bingkey','-b', GetoptLong::REQUIRED_ARGUMENT ],
|
92
|
-
[ '--maxhits','-m', GetoptLong::REQUIRED_ARGUMENT ]
|
92
|
+
[ '--maxhits','-m', GetoptLong::REQUIRED_ARGUMENT ],
|
93
|
+
[ '--proxy', GetoptLong::REQUIRED_ARGUMENT]
|
93
94
|
)
|
94
95
|
|
95
96
|
def logo
|
@@ -156,7 +157,7 @@ def print_(list)
|
|
156
157
|
end
|
157
158
|
|
158
159
|
def print_linux(email)
|
159
|
-
if email.match(/#{ESearchy::Search.query.gsub("@","").split('.')[0]}/i)
|
160
|
+
if email.match(/#{ESearchy::Search.query.gsub("*","").gsub("@","").split('.')[0]}/i)
|
160
161
|
puts "\033[31m" + email + "\033\[0m"
|
161
162
|
else
|
162
163
|
puts "\033[32m" + email + "\033\[0m"
|
@@ -164,7 +165,7 @@ def print_linux(email)
|
|
164
165
|
end
|
165
166
|
|
166
167
|
def print_windows(email)
|
167
|
-
if email.match(/#{ESearchy::Search.query.gsub("@","").split('.')[0]}/i)
|
168
|
+
if email.match(/#{ESearchy::Search.query.gsub("*","").gsub("@","").split('.')[0]}/i)
|
168
169
|
Wcol.puts(12, email)
|
169
170
|
else
|
170
171
|
Wcol.puts(2, email)
|
@@ -373,7 +374,9 @@ opts.each do |opt, arg|
|
|
373
374
|
puts "\t Disables PGP searches.\n"
|
374
375
|
puts "--disable-usenet"
|
375
376
|
puts "\t Disables Usenet searches.\n\n"
|
376
|
-
puts "
|
377
|
+
puts "--proxy [127.0.0.1:8080]"
|
378
|
+
puts "\t Setup a proxy.\n"
|
379
|
+
puts "Copyright 2010 - FreedomCoder\n"
|
377
380
|
#END OF HELP
|
378
381
|
exit(0)
|
379
382
|
when '--enable-all' then
|
@@ -483,6 +486,11 @@ opts.each do |opt, arg|
|
|
483
486
|
@output = Output.new arg
|
484
487
|
when '--maxhits' then
|
485
488
|
@params[:maxhits] = arg.to_i
|
489
|
+
when '--proxy' then
|
490
|
+
require 'socksify'
|
491
|
+
url, port = arg.split(":")
|
492
|
+
TCPSocket::socks_server = url
|
493
|
+
TCPSocket::socks_port = port.to_i
|
486
494
|
else
|
487
495
|
puts "Unknown command. Please try again"
|
488
496
|
exit(0)
|
data/lib/esearchy/esearchy.rb
CHANGED
@@ -43,15 +43,19 @@ module ESearchy
|
|
43
43
|
|
44
44
|
private
|
45
45
|
|
46
|
-
def get(url, port, querystring = "/", headers = {}, &block)
|
46
|
+
def get(url, port, querystring = "/", headers = {}, limit = 10, &block)
|
47
47
|
http = Net::HTTP.new(url,port)
|
48
48
|
begin
|
49
49
|
http.start do |http|
|
50
50
|
request = Net::HTTP::Get.new(querystring, headers)
|
51
51
|
response = http.request(request)
|
52
52
|
case response
|
53
|
-
when Net::HTTPSuccess
|
53
|
+
when Net::HTTPSuccess
|
54
54
|
block.call(response)
|
55
|
+
when Net::HTTPRedirection
|
56
|
+
get(URI.parse(response['location']).host,
|
57
|
+
URI.parse(response['location']).port,
|
58
|
+
querystring, headers, limit - 1, block)
|
55
59
|
else
|
56
60
|
return response.error!
|
57
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esearchy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 0.2.0.8
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Matias P. Brutti
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-
|
18
|
+
date: 2010-06-19 00:00:00 -03:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -83,6 +82,22 @@ dependencies:
|
|
83
82
|
version: 0.2.1
|
84
83
|
type: :runtime
|
85
84
|
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: socksify
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 17
|
94
|
+
segments:
|
95
|
+
- 1
|
96
|
+
- 1
|
97
|
+
- 1
|
98
|
+
version: 1.1.1
|
99
|
+
type: :runtime
|
100
|
+
version_requirements: *id005
|
86
101
|
description:
|
87
102
|
email: matiasbrutti@gmail.com
|
88
103
|
executables:
|