Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.1.0 #158

Merged
merged 24 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,4 @@ $RECYCLE.BIN/
*.pyc
/CODE/SysInternal_Suite/.sys.ignore
/ACCESS/
/CODE/VulnScan/tools/NN features/
3 changes: 3 additions & 0 deletions .idea/Logicytics.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions CODE/Logicytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
# Initialization
FileManagement.mkdir()
log = Log({"log_level": DEBUG, "delete_log": DELETE_LOGS})
ACTION = None
SUB_ACTION = None


class Health:
@staticmethod
@log.function
def backup(directory: str, name: str):
"""
Creates a backup of a specified directory by zipping its contents and moving it to a designated backup location.
Expand All @@ -47,7 +48,6 @@ def backup(directory: str, name: str):
shutil.move(f"{name}.zip", "../ACCESS/BACKUP")

@staticmethod
@log.function
def update() -> tuple[str, str]:
"""
Updates the repository by pulling the latest changes from the remote repository.
Expand Down Expand Up @@ -325,9 +325,13 @@ def threaded_execution(execution_list_thread, index_thread):

def zip_generated_files():
"""Zips generated files based on the action."""

def zip_and_log(directory, name):
zip_values = FileManagement.Zip.and_hash(directory, name, ACTION)
def zip_and_log(directory: str, name: str):
log.debug(f"Zipping directory '{directory}' with name '{name}' under action '{ACTION}'")
zip_values = FileManagement.Zip.and_hash(
directory,
name,
ACTION if ACTION is not None else f"ERROR_NO_ACTION_SPECIFIED_{datetime.now().isoformat()}"
)
if isinstance(zip_values, str):
log.error(zip_values)
else:
Expand Down
29 changes: 29 additions & 0 deletions CODE/VulnScan/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,32 @@ VulnScan is designed to detect sensitive data across various file formats. It of
- **Progress Tracking**: Visualizes accuracy and loss per epoch with graphs.
- **Error Handling**: Logs errors for missing files, attribute issues, or unexpected conditions.
- **Extensibility**: Supports plug-and-play integration for new algorithms or datasets.


# More files

There is a repository that archived all the data used to make the model,
as well as previously trained models for you to test out
(loading scripts and vectorizers are not included).

The repository is located [here](https://github.com/DefinetlyNotAI/VulnScan_TrainingData).

The repository contains the following directories:
- `Training Data`: Contains the data used to train the models. Is organized by the file size and amount, unless its Tests, where they explicitly say text.
- `Archived Models`: Contains the previously trained models. Is organized by the model type then version.
- `NN features`: Contains information about the model `.3n3` and the vectorizer used. Information include:
- `Documentation_Study_Network.md`: A markdown file that contains more info.
- `Neural Network Nodes Graph.gexf`: A Gephi file that contains the model nodes and edges.
- `Nodes and edges (GEPHI).csv`: A CSV file that contains the model nodes and edges.
- `Statistics`: Directories made by Gephi, containing the statistics of the model nodes and edges.
- `Feature_Importance.svg`: A SVG file that contains the feature importance of the model.
- `Loss_Landscape_3D.html`: A HTML file that contains the 3D loss landscape of the model.
- `Model Accuracy Over Epochs.png` and `Model Loss Over Epochs.png`: PNG files that contain the model accuracy and loss over epochs.
- `Model state dictionary.txt`: A text file that contains the model state dictionary.
- `Model Summary.txt`: A text file that contains the model summary.
- `Model Visualization.png`: A PNG file that contains the model visualization.
- `Top_90_Features.svg`: A SVG file that contains the top 90 features of the model.
- `Vectorizer features.txt`: A text file that contains the vectorizer features.
- `Visualize Activation.png`: A PNG file that contains the visualization of the model activation.
- `Visualize t-SNE.png`: A PNG file that contains the visualization of the model t-SNE.
- `Weight Distribution.png`: A PNG file that contains the weight distribution of the model.
Loading
Loading