Skip to content

Commit 4a85d62

Browse files
authored
Merge pull request #58 from opsdisk/ghdb_scapery.py-updates
Replaced total_records with total_dorks
2 parents 1a3115c + aa696cb commit 4a85d62

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The `ghdb_scraper.retrieve_google_dorks()` returns a dictionary with the followi
8383

8484
```python
8585
ghdb_dict = {
86-
"total_records": total_records,
86+
"total_dorks": total_dorks,
8787
"extracted_dorks": extracted_dorks,
8888
"category_dict": category_dict,
8989
}
@@ -96,7 +96,7 @@ import ghdb_scraper
9696

9797
dorks = ghdb_scraper.retrieve_google_dorks(save_all_dorks_to_file=True)
9898
dorks.keys()
99-
dorks["total_records"]
99+
dorks["total_dorks"]
100100

101101
dorks["extracted_dorks"]
102102

ghdb_scraper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def retrieve_google_dorks(
4646
):
4747
"""Retrieves all google dorks from https://www.exploit-db.com/google-hacking-database and optionally, writes the
4848
entire json response to a .json file, all the dorks to a file, and/or the individual dork categories to a file. A
49-
dictionary is returned containing the total_records, a list of extracteddorks, and a category dictionary.
49+
dictionary is returned containing the total_dorks, a list of extracteddorks, and a category dictionary.
5050
"""
5151

5252
url = "https://www.exploit-db.com/google-hacking-database"
@@ -70,7 +70,7 @@ def retrieve_google_dorks(
7070
json_response = response.json()
7171

7272
# Extract recordsTotal and data.
73-
total_records = json_response["recordsTotal"]
73+
total_dorks = json_response["recordsTotal"]
7474
json_dorks = json_response["data"]
7575

7676
# List to track all the dorks.
@@ -139,12 +139,12 @@ def retrieve_google_dorks(
139139
for dork in extracted_dorks:
140140
fh.write(f"{dork}\n")
141141

142-
print(f"[*] Total Google dorks retrieved: {total_records}")
142+
print(f"[*] Total Google dorks retrieved: {total_dorks}")
143143

144144
# Package up a nice dictionary to return.
145145
# fmt: off
146146
ghdb_dict = {
147-
"total_records": total_records,
147+
"total_dorks": total_dorks,
148148
"extracted_dorks": extracted_dorks,
149149
"category_dict": category_dict,
150150
}

0 commit comments

Comments
 (0)