Reverting Back to Working Branch
This commit is contained in:
@@ -20,7 +20,10 @@ import utils.allowlist
|
||||
import utils.hashfunctions
|
||||
import utils.pathfunctions
|
||||
import utils.allowfunctions
|
||||
<<<<<<< HEAD
|
||||
import utils.colortext as ct
|
||||
=======
|
||||
>>>>>>> ccbf716 (Zar-Branch (#6))
|
||||
import urllib3
|
||||
import pandas as pd
|
||||
|
||||
@@ -77,6 +80,7 @@ def menu_main():
|
||||
else:
|
||||
print(ct.colorText("Invalid choice. Please try again.","red"))
|
||||
|
||||
<<<<<<< HEAD
|
||||
def menu_local_approve():
|
||||
while True:
|
||||
print("\n--- Submenu ---")
|
||||
@@ -158,6 +162,59 @@ def menu_prepare_to_enforce():
|
||||
print(ct.colorText(" [✗] This step has not been completed","red"))
|
||||
|
||||
print(ct.colorText("4. Add hash threat information to list of executions", "cyan"))
|
||||
=======
|
||||
augmented.to_html("z_augmented_list.html", index=False)
|
||||
|
||||
badpublisherlist = []
|
||||
categorized = utils.hashfunctions.categorizeHashes(augmented, 5, badpublisherlist)
|
||||
categorized[0].to_html("z_needs_review.html", index=False)
|
||||
categorized[1].to_html("z_approved_hashes.html", index=False)
|
||||
categorized[2].to_html("z_remaining.html", index=False)
|
||||
|
||||
if choice == '4':
|
||||
html_file = "z_augmented_list.html"
|
||||
augmented_df = pd.read_html(html_file)
|
||||
print(augmented_df)
|
||||
combined_df = pd.concat(augmented_df, ignore_index=True)
|
||||
|
||||
path_eligible, path_ineligible = utils.pathfunctions.filepathInitialGroup(combined_df)
|
||||
path_eligible.to_html("z_eligble_paths.html", index=False)
|
||||
path_ineligible.to_html("z_ineligible_paths.html",index=False)
|
||||
|
||||
if choice == '5':
|
||||
|
||||
executionhist = utils.allowlist.allowlistexechistories(url,True)
|
||||
#print(executionhist)
|
||||
|
||||
aggregated = utils.hashfunctions.aggregateHashes(executionhist)
|
||||
print(aggregated)
|
||||
|
||||
augmented = utils.hashfunctions.augmentAggregatedHashes(url,aggregated)
|
||||
print(augmented)
|
||||
|
||||
augmented.to_html("z_augmented_list.html", index=False)
|
||||
html_file = "z_augmented_list.html"
|
||||
augmented_df = pd.read_html(html_file)
|
||||
combined_df = pd.concat(augmented_df, ignore_index=True)
|
||||
|
||||
path_eligible, path_ineligible = utils.pathfunctions.filepathInitialGroup(combined_df)
|
||||
path_eligible.to_html("z_eligble_paths.html", index=False)
|
||||
path_ineligible.to_html("z_ineligible_paths.html",index=False)
|
||||
|
||||
badpublisherlist = ["Brave Software, Inc.", "Zoom Video Communications, Inc."]
|
||||
categorized = utils.hashfunctions.categorizeHashes(augmented, 5, badpublisherlist)
|
||||
categorized[0].to_html("z_needs_review.html", index=False)
|
||||
categorized[1].to_html("z_approved_hashes.html", index=False)
|
||||
categorized[2].to_html("z_remaining.html", index=False)
|
||||
|
||||
allowpaths = utils.allowfunctions.filter_and_drop(categorized[1],path_eligible,4)
|
||||
allowpaths.to_html("z_allowed_paths.html", index=False)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
>>>>>>> ccbf716 (Zar-Branch (#6))
|
||||
|
||||
if os.path.exists(f"dataframe_csv\\df_augmented_combo_{first_policy}_{second_policy}.csv") == True:
|
||||
print(ct.colorText(" [✓] This step has been completed","green"))
|
||||
|
||||
Reference in New Issue
Block a user