fofa 0.3.12 → 0.3.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87d0a961aecc981843e098178b7c3fc2c70c14f7
4
- data.tar.gz: 10df9f621ee857e19eb9a31ea5c488fe71895135
3
+ metadata.gz: 46230a00b448e0d6fa729755b2d1b3c03c5450c5
4
+ data.tar.gz: 7841106b219d240133f9741f4618df11349dcede
5
5
  SHA512:
6
- metadata.gz: 4c2eaf481b20f662ecac532f950c866ca7fc11d966e4a8b067ad67faca035e08d305923c6ad3a5c85025f3da7d3afc247b91461d4cbb2590cc126f26f28034b2
7
- data.tar.gz: f639fd08740c4df9bcece0443a4b802d9d8df01de17c5136abe4c9fdf4b1a5b6bb09e7c6f04c3c4bd9ddd6127df39ff5aa67e98de72d550f7cf4aefc81193028
6
+ metadata.gz: d758ac844158fb49512e24c36587c4ff22562c5ddf33d7f5fa028d383b2dcc8d79262937917cdafe56b6481273857d98129a8ede3335072dadf04e0e494127da
7
+ data.tar.gz: 935ca8c4e45adf3835057f0a6bda9050e9049686ec7971de51b90e9a5e76e95207b529d299c5177b282268695c6a9b8baf97013c8a1052b4bf2183224d8dd72f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fofa (0.3.11)
4
+ fofa (0.3.12)
5
5
  colorize
6
6
  concurrent-ruby
7
7
 
@@ -90,6 +90,7 @@ ARGV.options do |opts|
90
90
  opts.separator "\t fofacli -e aaa@bbb.com -a xxx -s 100 domain=\"baidu.com\""
91
91
  opts.separator "\t fofacli -e aaa@bbb.com -a xxx --query_file /tmp/fofaquery"
92
92
  opts.separator "\t fofacli -e aaa@bbb.com -a xxx -d ip,domain,title,port,protocol -m query_ip_list -f ip.txt"
93
+ opts.separator %Q@\t cat vapps.txt | xargs -I{} -n 1 sh -c 'fofacli "app=$1" -d host,ip,port,country,province,city -s 1000 -o json -v > "$1.txt"' -- {}@
93
94
 
94
95
  begin
95
96
  opts.parse!
@@ -125,8 +126,13 @@ def log_record(options, r)
125
126
  else
126
127
  puts %Q|{"id":"#{r}"}|
127
128
  end
128
- when 'csv'
129
- puts r.map{|v| v}.join("\t")
129
+ when 'csv'
130
+ if r.kind_of?(Array)
131
+ puts r.map{|v| v}.join("\t")
132
+ else
133
+ puts r
134
+ end
135
+
130
136
  end
131
137
  end
132
138
 
@@ -74,7 +74,7 @@ module Fofa
74
74
  res = search(query, {page:page}.merge(options))
75
75
  if !res['error'] && res['results'].size > 0
76
76
  all_res += res['results']
77
- yield(res['results'], page) if block_given?
77
+ yield(res['results'], page, res['size'].to_i) if block_given?
78
78
 
79
79
  if all_size && all_res.size > all_size.to_i
80
80
  all_res = all_res[0..all_size-1]
@@ -1,3 +1,6 @@
1
+ # 0.3.13
2
+ # search_all yield with all size
3
+ #
1
4
  # 0.3.12
2
5
  # fofacli add -o --output-format option, support csv(defualt) and json
3
6
  #
@@ -16,5 +19,5 @@
16
19
  # 0.3.6
17
20
  # add fields
18
21
  module Fofa
19
- VERSION = "0.3.12"
22
+ VERSION = "0.3.13"
20
23
  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.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - fofa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler