Skip to content

Commit

Permalink
Fix 404 and add json parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
godylockz authored and noraj committed Sep 6, 2023
1 parent 5068055 commit 55768a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions bin/bqm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ def merge_remote(source, verbose: false)
sets = get_datasets(source)
queries = []
sets.each do |s|
customqueries = Net::HTTP.get(URI(s))
data = JSON.parse(customqueries)
queries += data['queries']
puts " [*] File merged: #{s}" if verbose
begin
customqueries = Net::HTTP.get(URI(s))
data = JSON.parse(customqueries)
queries += data['queries']
puts " [*] File merged: #{s}" if verbose
rescue JSON::ParserError => e
# Handle the JSON parsing error
puts " [!] JSON parsing error for #{s}"
end
end
queries
end
Expand Down
3 changes: 2 additions & 1 deletion data/query-sets.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"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/ThePorgs/Exegol-images/main/sources/bloodhound/customqueries.json"
"https://raw.githubusercontent.com/ThePorgs/Exegol-images/main/sources/assets/bloodhound/customqueries.json"
]
}

0 comments on commit 55768a1

Please sign in to comment.