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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d545f5e3f2e72200759bf4f2f113cf4ae3933cacc79e7436db2948fca942f092
4
- data.tar.gz: e72a5f234fdd0d8ffc0319140dd1e9a5493f53da7c0d212c19807be4a516f0b9
3
+ metadata.gz: 4ba6286e4654e1e55b8b07ba1996edfb64b61139eb9957f03a7e73a35ae93e4a
4
+ data.tar.gz: 0b0c0daa6a59f9c602b5e72c19cf35f539cef73d0a0609d8090d73dd9ecc1676
5
5
  SHA512:
6
- metadata.gz: 0f610a997d2fc71c76c2d960426d1fc80346a19ef306d808c8e7a09175cd4e625105a108d4534a4dc01e49546b4f730cc05014c28ffed22e87ac5bdf364fabda
7
- data.tar.gz: c768c528f1ba58e8e5823df16e4b2ea533800057c24411f0d47989ef3f0ef117e162073e60348ac4eb31840b0e03ba49ec349d4c4b09e67e892459e0f84c740b
6
+ metadata.gz: 137d9c7252fd91dff2f6ac7d61f01fa43bca086bb716912c8e694aebaca9817970051708e29726f8c0c16920b7bf11e9b4b66334758ee826b24f5d907b2008fa
7
+ data.tar.gz: 0716e3e28ce190378a25aae007308d395ee651fa4ac02dd1ba29d36482f084f69b1a298d362dd4180bc7d6d34b7618db49efc2f598c683287977f45ccc9cad27
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fofa (0.3.19)
4
+ fofa (0.4.20)
5
5
  colorize
6
6
  concurrent-ruby
7
7
 
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
- puts r.map{|v| v}.join("\t")
163
+ STDOUT.puts r.map{|v| v}.join("\t")
164
164
  else
165
- puts r
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
- $stdout.sync = true
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
@@ -1,3 +1,6 @@
1
+ # 0.4.21
2
+ # split result to stdout
3
+ #
1
4
  # 0.4.20
2
5
  # add -V option, and ip_tags method need to upgrade major version
3
6
  #
@@ -37,5 +40,5 @@
37
40
  # 0.3.6
38
41
  # add fields
39
42
  module Fofa
40
- VERSION = "0.4.20"
43
+ VERSION = "0.4.21"
41
44
  end
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.20
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: 2020-06-29 00:00:00.000000000 Z
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
- rubygems_version: 3.0.6
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