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
from nemesys.utils.logger import nemesysLogger | |
from langchain_groq import ChatGroq | |
from langchain.text_splitter import CharacterTextSplitter | |
from langchain_huggingface.embeddings import HuggingFaceEmbeddings | |
from langchain_community.vectorstores import FAISS | |
from langchain.chains import RetrievalQA | |
from fpdf import FPDF | |
import json | |
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
from nemesys.utils.logger import nemesysLogger | |
import time | |
class ShellInterface: | |
""" | |
Interacts with an open shell session in Metasploit. | |
This class allows for interacting with an active shell session, | |
waiting for it to become active, and providing an interface for command execution. |
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
import re | |
import shlex | |
import subprocess | |
import time | |
from nemesys.utils.logger import nemesysLogger | |
import datetime | |
class SystemEnumerator: | |
""" | |
A class responsible for enumerating and gathering system information from a compromised machine. |
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
import re | |
import time | |
from nemesys.utils.logger import nemesysLogger | |
class PrivilegeEscalationManager: | |
""" | |
Manages local privilege escalation exploits in an active Meterpreter session. | |
Handles the automation of executing a local privilege escalation module, monitors output, | |
and attempts to grab a new session ID upon successful exploitation. |
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
from nemesys.utils.logger import nemesysLogger | |
import re | |
import time | |
class SessionManager: | |
""" | |
Manages the retrieval and upgrade of system sessions through the Metasploit framework. | |
Handles waiting for a session to become active and upgrading it to Meterpreter. | |
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
from nemesys.utils.logger import nemesysLogger | |
class ExploitManager: | |
def __init__(self, client): | |
""" | |
Initializes the ExploitManager with the given client to execute an exploit. | |
Args: | |
client (MetasploitClient): The Metasploit RPC client instance for interacting with Metasploit. | |
""" |
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
from nemesys.utils.logger import nemesysLogger | |
from pymetasploit3.msfrpc import MsfRpcClient | |
class MetasploitClient: | |
def __init__(self, password, ssl=True): | |
""" | |
Initializes the connection to Metasploit RPC client. | |
Args: | |
password (str): The password for authenticating with the Metasploit RPC service. |
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
import numpy as np | |
import tensorflow as tf | |
from tensorflow import keras | |
import TokenAndPositionEmbedding | |
import TransformerBlock | |
class TransformersHeadlineGenerator: | |
def __init__(self, model_path='trained_model.model.h5', weights_path='trained_model.weights.h5', vocab='vocabulary.txt', maxlen=80, top_k=10): | |
""" | |
Initializes the TransformersHeadlineGenerator class. |
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
import string | |
import unicodedata | |
import pickle | |
import numpy as np | |
from tensorflow.keras.preprocessing.sequence import pad_sequences | |
from tensorflow.keras.models import load_model | |
class LSTMHeadlineGenerator: | |
""" | |
A wrapper class for generating text using a pre-trained LSTM model. |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.9; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "./DeFiPlexGovernanceTokenContract.sol"; | |
import "./IDeFiPlexGovernanceContract.sol"; | |
/** | |
* @title DeFiPlexGovernanceContract | |
* @dev This contract manages governance proposals for DeFiPlex platform. |
NewerOlder