mirror of
https://github.com/laramies/theHarvester.git
synced 2024-11-10 09:02:37 +08:00
add orjson and *.json to gitignore
This commit is contained in:
parent
2a9e0a11dd
commit
59686d3dd5
2 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
|||
*.htm
|
||||
*.vscode
|
||||
*.xml
|
||||
*.json
|
||||
debug_results.txt
|
||||
venv
|
||||
.mypy_cache
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
from theHarvester.lib.core import *
|
||||
import argparse
|
||||
import asyncio
|
||||
import json
|
||||
import orjson
|
||||
import netaddr
|
||||
import re
|
||||
import sys
|
||||
|
@ -828,8 +828,8 @@ async def handler(lst):
|
|||
shodanalysis = sorted(set(shodanalysis))
|
||||
shodan_dict["servers"] = [server for server in shodanalysis]
|
||||
json_dict["shodan"] = shodan_dict
|
||||
with open(filename, 'w+') as json_file:
|
||||
json.dump(json_dict, json_file, indent=4)
|
||||
with open(filename, 'wb+') as fp:
|
||||
fp.write(orjson.dumps(json_dict, option=orjson.OPT_SORT_KEYS))
|
||||
print('[*] JSON File saved.')
|
||||
except Exception as error:
|
||||
print(f'\033[93m[!] An error occurred while saving the JSON file: {error} \033[0m')
|
||||
|
|
Loading…
Reference in a new issue