-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import datetime | ||
import logging | ||
import os | ||
|
||
# Notes: Ross, thank you for this idea! | ||
|
||
# MalwareBazaar API URL | ||
mb_url = 'https://mb-api.abuse.ch/api/v1' | ||
|
||
# Create datetime for log file | ||
today_ = datetime.datetime.today() | ||
today = today_.strftime('%Y-%m-%d_%H_%M_%S') | ||
|
||
# Create log file with datetime value | ||
logfile = os.path.join(os.environ['USERPROFILE'], 'Desktop', | ||
'Python_Manipulated_Files', 'Python_Script_Logs', 'MalwareBazaar_AMP_' + str(today) + '.log') | ||
|
||
# Set up logger file | ||
logger = logging.getLogger(__name__) | ||
logger.setLevel(logging.INFO) | ||
formatter = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s') | ||
file_handler = logging.FileHandler(logfile) | ||
file_handler.setFormatter(formatter) | ||
logger.addHandler(file_handler) | ||
|
||
# MalwareBazaar output directory | ||
sha_output_files = os.path.join(os.environ['USERPROFILE'], 'Desktop', | ||
'Python_Manipulated_Files', 'MalwareBazaar') | ||
|
||
# All MalwareBazaar hashes in one text file | ||
main_mb_df_file = os.path.join(os.environ['USERPROFILE'], 'Desktop', | ||
'Python_Manipulated_Files', 'MalwareBazaar', 'AA_Quarantine_&_Prevent_Install.txt') | ||
|
||
# All AMP hashes in one text file | ||
amp_main_file = os.path.join(os.environ['USERPROFILE'], 'Desktop', | ||
'Python_Manipulated_Files', 'MalwareBazaar_Comparison_File', 'comparison.txt') | ||
|
||
# URL for dominant Simple Custom Detection List. *** Modify main GUID here*** | ||
main_simple_custom_detections_url = 'https://api.amp.cisco.com/v1/file_lists/modify_main_guid_here/files' | ||
|
||
|
||
# URL for all Simple Custom Detections Lists | ||
all_simple_custom_detections_url = 'https://api.amp.cisco.com/v1/file_lists/simple_custom_detections' |