fofa 0.4.20 → 0.4.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/fofacli +7 -7
- data/lib/fofa/version.rb +4 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ba6286e4654e1e55b8b07ba1996edfb64b61139eb9957f03a7e73a35ae93e4a
|
4
|
+
data.tar.gz: 0b0c0daa6a59f9c602b5e72c19cf35f539cef73d0a0609d8090d73dd9ecc1676
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 137d9c7252fd91dff2f6ac7d61f01fa43bca086bb716912c8e694aebaca9817970051708e29726f8c0c16920b7bf11e9b4b66334758ee826b24f5d907b2008fa
|
7
|
+
data.tar.gz: 0716e3e28ce190378a25aae007308d395ee651fa4ac02dd1ba29d36482f084f69b1a298d362dd4180bc7d6d34b7618db49efc2f598c683287977f45ccc9cad27
|
data/Gemfile.lock
CHANGED
data/bin/fofacli
CHANGED
@@ -152,17 +152,17 @@ def log_record(options, r)
|
|
152
152
|
case options[:format]
|
153
153
|
when 'json'
|
154
154
|
if r.kind_of?(Array)
|
155
|
-
puts Hash[options[:fields].split(',').zip r].to_json
|
155
|
+
STDOUT.puts Hash[options[:fields].split(',').zip r].to_json
|
156
156
|
elsif r.kind_of?(Hash)
|
157
|
-
puts r.to_json
|
157
|
+
STDOUT.puts r.to_json
|
158
158
|
else
|
159
|
-
puts %Q|{"id":"#{r}"}|
|
159
|
+
STDOUT.puts %Q|{"id":"#{r}"}|
|
160
160
|
end
|
161
161
|
when 'csv'
|
162
162
|
if r.kind_of?(Array)
|
163
|
-
|
163
|
+
STDOUT.puts r.map{|v| v}.join("\t")
|
164
164
|
else
|
165
|
-
|
165
|
+
STDOUT.puts r
|
166
166
|
end
|
167
167
|
|
168
168
|
end
|
@@ -176,7 +176,7 @@ case options[:mode]
|
|
176
176
|
exit -1
|
177
177
|
end
|
178
178
|
query = options[:query] || ARGV.join(' ')
|
179
|
-
puts "Query: '#{query}'"
|
179
|
+
STDERR.puts "Query: '#{query}'"
|
180
180
|
if options[:page] #search one page
|
181
181
|
Fofa::API.new(options[:email], options[:apikey], {debug:options[:verbose]})
|
182
182
|
.search(query, {
|
@@ -218,7 +218,7 @@ case options[:mode]
|
|
218
218
|
require 'concurrent'
|
219
219
|
semaphore = Concurrent::Semaphore.new(1)
|
220
220
|
pool = Concurrent::FixedThreadPool.new(10)
|
221
|
-
$
|
221
|
+
$STDOUT.sync = true
|
222
222
|
File.open(options[:file]){|f|
|
223
223
|
fields = options[:fields].split(',')
|
224
224
|
f.each_line{|line|
|
data/lib/fofa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fofa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -121,7 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 2.7.7
|
125
126
|
signing_key:
|
126
127
|
specification_version: 4
|
127
128
|
summary: A Ruby library to interact with the FOFA API. https://fofa.so
|