From 55768a1384b4357d609226b846adefd971a8ca12 Mon Sep 17 00:00:00 2001 From: godylockz <81207744+godylockz@users.noreply.github.com> Date: Wed, 6 Sep 2023 00:10:40 -0400 Subject: [PATCH] Fix 404 and add json parsing --- bin/bqm | 13 +++++++++---- data/query-sets.json | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/bqm b/bin/bqm index 4f9680c..537cce1 100755 --- a/bin/bqm +++ b/bin/bqm @@ -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 diff --git a/data/query-sets.json b/data/query-sets.json index 332b284..289f445 100644 --- a/data/query-sets.json +++ b/data/query-sets.json @@ -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" ] } +