bqm 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bqm +22 -1
  3. data/data/query-sets.json +4 -3
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f38e89871f7a22fe4917e8a66011a93b11bfa2557fa51035062b8fe06b9b6b4
4
- data.tar.gz: a37b68ffe558b5e387ee9253d7ca01f25a2bdb5a2e39fa63997577a2d9979c08
3
+ metadata.gz: 0d78da6d030479d62b8fc734bde08fddc8ff97ca4502855287cb543b1d5f50fd
4
+ data.tar.gz: 836675f08cab5fe97744eae3c4f53182e2bbc9928f099540e94c36af576f3b56
5
5
  SHA512:
6
- metadata.gz: bc2f3b83876b97cb41002d5508f745becdffdb3953d0fcefa721017acefb06e9026ecb0a4c5f27f5f5f503d87b78a53ff45cdf1ffd2e240c748c4518627430e5
7
- data.tar.gz: f0d0bee9d057c113bcfa7c92897896166cd05df20a392e1941dc6f4f6f2f2f8fa39f31fe106ce1b7f0fbd2832df25ef776c5534ab8f876ac4f75f26c8df355df
6
+ metadata.gz: 8d3f43f194866b90855ec27c36dfecdd3ba5131b424616f08eaf7ac0f75c02975d92553ae02f0f807246cfe61fd198ee2da06f6068b0e3d0e9c284f57ec41eca
7
+ data.tar.gz: fa5e9708365a8ac529c0a67b8c46bbc3aa901c91dac6d01b706d390c1211a534887eedcfaf31cfcbe0fd3350e4f5d9b1d1047fb6303e1543c7a4ec38d9b9079b
data/bin/bqm CHANGED
@@ -59,7 +59,12 @@ def pretty_link(lst)
59
59
  end
60
60
 
61
61
  def get_datasets(source)
62
- src = JSON.load_file(source)
62
+ # ruby 3.0+
63
+ begin
64
+ src = JSON.load_file(source)
65
+ rescue NoMethodError # ruby 2.7 retro-compatibility
66
+ src = JSON.parse(File.read(source))
67
+ end
63
68
  src['sets']
64
69
  end
65
70
 
@@ -85,8 +90,24 @@ if __FILE__ == $PROGRAM_NAME
85
90
  puts l
86
91
  end
87
92
  elsif out
93
+ flags = {}
94
+ flags[:merge_actual] = false
95
+ if File.file?(out) && File.readable?(out)
96
+ puts "[+] The output path #{out} already exists"
97
+ puts '[?] Do you want to overwrite it? [y/n]'
98
+ if gets.chomp == 'y'
99
+ puts '[?] What to do with the existing queries? (merge / discard) [m/d]'
100
+ flags[:merge_actual] = true if gets.chomp == 'm'
101
+ else
102
+ exit
103
+ end
104
+ end
88
105
  puts '[+] Fetching and merging datasets'
89
106
  data = merge(source)
107
+ if flags[:merge_actual]
108
+ puts '[+] Merging your existing queries'
109
+ data += JSON.parse(File.read(out))['queries']
110
+ end
90
111
  puts '[+] Removing duplicates'
91
112
  queries = deduplicate(data).map(&:data)
92
113
 
data/data/query-sets.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sets": [
3
3
  "https://raw.githubusercontent.com/ly4k/Certipy/main/customqueries.json",
4
- "https://raw.githubusercontent.com/CompassSecurity/BloodHoundQueries/master/customqueries.json",
4
+ "https://raw.githubusercontent.com/CompassSecurity/BloodHoundQueries/master/BloodHound_Custom_Queries/customqueries.json",
5
5
  "https://raw.githubusercontent.com/hausec/Bloodhound-Custom-Queries/master/customqueries.json",
6
6
  "https://raw.githubusercontent.com/awsmhacks/awsmBloodhoundCustomQueries/master/customqueries.json",
7
7
  "https://raw.githubusercontent.com/porterhau5/BloodHound-Owned/master/customqueries.json",
@@ -11,6 +11,7 @@
11
11
  "https://raw.githubusercontent.com/zeronetworks/BloodHound-Tools/main/CustomQueries/customqueries.json",
12
12
  "https://raw.githubusercontent.com/egypt/customqueries/master/customqueries.json",
13
13
  "https://raw.githubusercontent.com/trustedsec/CrackHound/main/customqueries.json",
14
- "https://raw.githubusercontent.com/aress31/bloodhound-utils/main/customqueries.json"
14
+ "https://raw.githubusercontent.com/aress31/bloodhound-utils/main/customqueries.json",
15
+ "https://raw.githubusercontent.com/ThePorgs/Exegol-images/main/sources/bloodhound/customqueries.json"
15
16
  ]
16
- }
17
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bqm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-04 00:00:00.000000000 Z
11
+ date: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Deduplicate custom BloudHound queries from different datasets and merge
14
14
  them in one customqueries.json file.
@@ -40,14 +40,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
40
40
  version: 2.6.0
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '3.2'
43
+ version: '4.0'
44
44
  required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  requirements: []
50
- rubygems_version: 3.3.7
50
+ rubygems_version: 3.4.1
51
51
  signing_key:
52
52
  specification_version: 4
53
53
  summary: Download BloudHound query lists, deduplicate entries and merge them in one