Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
azi-acceis committed Feb 27, 2023
1 parent 0c4a9a2 commit 2a29176
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ Layout/HashAlignment:
EnforcedHashRocketStyle: table
Layout/LineLength:
Exclude:
- '*.gemspec'
- '*.gemspec'
Metrics/BlockNesting:
Enabled: false
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bqm (1.2.0)
bqm (1.3.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -38,4 +38,4 @@ DEPENDENCIES
rubocop (~> 1.46)

BUNDLED WITH
2.3.7
2.4.7
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Datasets used by BQM are referenced in `data/query-sets.json`. They are coming f
- [egypt/customqueries](https://github.com/egypt/customqueries)
- [trustedsec/CrackHound](https://github.com/trustedsec/CrackHound)
- [aress31/bloodhound-utils](https://github.com/aress31/bloodhound-utils)
- [ThePorgs/Exegol-images](https://github.com/ThePorgs/Exegol-images/blob/main/sources/bloodhound/customqueries.json)

## Author

Expand Down
16 changes: 16 additions & 0 deletions bin/bqm
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,24 @@ if __FILE__ == $PROGRAM_NAME
puts l
end
elsif out
flags = {}
flags[:merge_actual] = false
if File.file?(out) && File.readable?(out)
puts "[+] The output path #{out} already exists"
puts '[?] Do you want to overwrite it? [y/n]'
if gets.chomp == 'y'
puts '[?] What to do with the existing queries? (merge / discard) [m/d]'
flags[:merge_actual] = true if gets.chomp == 'm'
else
exit
end
end
puts '[+] Fetching and merging datasets'
data = merge(source)
if flags[:merge_actual]
puts '[+] Merging your existing queries'
data += JSON.parse(File.read(out))['queries']
end
puts '[+] Removing duplicates'
queries = deduplicate(data).map(&:data)

Expand Down
4 changes: 2 additions & 2 deletions bqm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |s|
s.name = 'bqm'
s.version = '1.2.0'
s.version = '1.3.0'
s.platform = Gem::Platform::RUBY
s.summary = 'Download BloudHound query lists, deduplicate entries and merge them in one file.'
s.description = 'Deduplicate custom BloudHound queries from different datasets and merge them in one customqueries.json file.'
Expand All @@ -24,5 +24,5 @@ Gem::Specification.new do |s|
'rubygems_mfa_required' => 'true'
}

s.required_ruby_version = ['>= 2.6.0', '< 3.3']
s.required_ruby_version = ['>= 2.6.0', '< 4.0']
end
3 changes: 2 additions & 1 deletion data/query-sets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"https://raw.githubusercontent.com/zeronetworks/BloodHound-Tools/main/CustomQueries/customqueries.json",
"https://raw.githubusercontent.com/egypt/customqueries/master/customqueries.json",
"https://raw.githubusercontent.com/trustedsec/CrackHound/main/customqueries.json",
"https://raw.githubusercontent.com/aress31/bloodhound-utils/main/customqueries.json"
"https://raw.githubusercontent.com/aress31/bloodhound-utils/main/customqueries.json",
"https://raw.githubusercontent.com/ThePorgs/Exegol-images/main/sources/bloodhound/customqueries.json"
]
}
8 changes: 4 additions & 4 deletions packages/aur/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
pkgbase = bqm
pkgdesc = Download BloudHound query lists, deduplicate entries and merge them in one file.
pkgver = 1.2.0
pkgver = 1.3.0
pkgrel = 1
url = https://github.com/Acceis/bqm
arch = any
license = MIT
depends = ruby
noextract = bqm-1.2.0.gem
noextract = bqm-1.3.0.gem
options = !emptydirs
source = https://rubygems.org/downloads/bqm-1.2.0.gem
b2sums = 8f7b235d33e07d12a9c063a07f8706400bbe4f007e1d27558641dd0f8ed254e9e5e91442bd48ed1f3e6d83c669b466224f5bfd8e4b4b01b332a2fc8bc28caa06
source = https://rubygems.org/downloads/bqm-1.3.0.gem
b2sums = 3ab24d78d049b9c6100816a654f8194102b4722910b73adb495b351ae6fc2728a8533be2e7167d5d6e64ecb402542e9750e174fa2e743b943f9ba3258c9309ec

pkgname = bqm
4 changes: 2 additions & 2 deletions packages/aur/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgname=bqm
_gemname=$pkgname
pkgver=1.2.0
pkgver=1.3.0
pkgrel=1
pkgdesc='Download BloudHound query lists, deduplicate entries and merge them in one file.'
arch=('any')
Expand All @@ -13,7 +13,7 @@ options=(!emptydirs)
source=("https://rubygems.org/downloads/$_gemname-$pkgver.gem")
#source=("https://github.com/Acceis/$pkgname/archive/v$pkgver.tar.gz")
noextract=("$_gemname-$pkgver.gem")
b2sums=('8f7b235d33e07d12a9c063a07f8706400bbe4f007e1d27558641dd0f8ed254e9e5e91442bd48ed1f3e6d83c669b466224f5bfd8e4b4b01b332a2fc8bc28caa06')
b2sums=('3ab24d78d049b9c6100816a654f8194102b4722910b73adb495b351ae6fc2728a8533be2e7167d5d6e64ecb402542e9750e174fa2e743b943f9ba3258c9309ec')

package() {
_gemdir="$(ruby -e'puts Gem.default_dir')"
Expand Down

0 comments on commit 2a29176

Please sign in to comment.