Releases: grisuno/LazyOwn
release/0.1.57
Full Changelog: release/0.1.56...release/0.1.57
release/0.1.56
Full Changelog: release/0.1.55...release/0.1.56
createjsonmachine
Create a new JSON payload file based on the template provided in payload.json.
This function reads an existing JSON file named 'payload.json' and
allows the user to update specific fields. The following fields can
be modified:
- 'url': The new URL to connect to, which can be entered manually
or automatically generated based on the input parameter 'line'. - 'domain': The new domain associated with the URL, similarly
generated or entered. - 'rhost': The new remote host IP address that needs to be specified
by the user.
All other fields from the original payload are preserved in the new
JSON file, ensuring that no other data is lost or altered.
The newly created JSON payload will be saved in a new file with the
format 'payload_<new_name>.json', where <new_name> is derived
from the domain name's subpart.
Parameters:
line (str): An optional string parameter that, if provided, is used
to generate the new 'url' and 'domain'. If empty,
the user will be prompted to enter values for 'url'
and 'domain'.
Returns:
None
xss
Executes the XSS (Cross-Site Scripting) vulnerability testing procedure
using user-defined parameters and configurations.
This method guides the user through the process of setting up and
executing XSS payload injections against a specified target domain.
It prompts the user for necessary input, including the XSS payload
URL, the target domain, and the request timeout settings. The
function ensures that all required inputs are provided and valid
before proceeding with the injection process.
Parameters:
line (str): A line of input that may contain additional parameters
or commands (not utilized within this method).
Raises:
ValueError: If the provided payload URL or target domain is empty,
indicating that these are required for the injection
process.
This method leverages user input for flexibility, allowing
customized testing scenarios for XSS vulnerabilities.
arjun
Executes an Arjun scan on the specified URL for parameter discovery.
This function checks if Arjun is installed on the system, installs it if necessary, and then constructs
a command to run Arjun against the provided URL with user-defined options.
Parameters:
line (str): Input line, not currently used.
release/0.1.55
Full Changelog: release/0.1.54...release/0.1.55
evidence
Compresses the 'sessions' folder and encodes it into a video using the lazyown_infinitestorage.py script.
If a filename is provided as an argument, it decodes the specified video instead.
This function operates in two modes depending on the input:
- Encode Mode (default):
- Compresses the contents of the 'sessions' directory into a ZIP file named 'sessions.zip'.
- Utilizes the lazyown_infinitestorage.py script to convert the ZIP file into a high-definition video file named 'encoded_output.avi' with a frame size of 1920x1080 and a frame rate of 25 FPS.
- Decode Mode:
- When the 'line' parameter contains the string "decode", it lists all available video files in the 'sessions' directory (files with .mp4, .mkv, or .avi extensions).
- If there are no video files present, it prints an error message and exits.
- Prompts the user to select a video by entering its corresponding number.
- Constructs a command to decode the selected video file using the lazyown_infinitestorage.py script, outputting the decoded result to a specified directory.
:param line: An optional parameter that, when provided, indicates that the user wants to decode a video. If not provided, the function operates in encode mode.
:type line: str
:returns: None
Example usage:
- To compress and encode: do_evidence()
- To decode a video: do_evidence('decode')
Notes:
- The 'sessions' directory must exist and contain files for encoding.
- The lazyown_infinitestorage.py script must be present in the specified directory.
- Ensure that the output paths for both encoding and decoding do not conflict with existing files.
rejetto_hfs_exec
HttpFileServer version 2.3. Vulnerable using the module rejetto_hfs_exec of metasploit
:param line: Command line input that provides the LHOST and RHOST.
:type line: str
:returns: None
ms08_067_netapi
SMB CVE-2008-4250. Vulnerable using the module ms08_067_netapi of metasploit
:param line: Command line input that provides the LHOST and RHOST.
:type line: str
:returns: None
automsf
Try to check if Vulnerable using the module passed by argument of lazyown example automsf exploit/windows/iis/iis_webdav_upload_asp to use in metasploit
:param line: Command line input that provides the LHOST and RHOST.
:type line: str
:returns: None
iis_webdav_upload_asp
(CVE-2017-7269). Vulnerable using the module iis_webdav_upload_asp of metasploit
:param line: Command line input that provides the LHOST and RHOST.
:type line: str
:returns: None
nano
Opens or creates the file using line in the sessions directory for editing using nano.
:param line: name of the file to use in nano in session directory.
:returns: None
nc
Runs nc
with the specified port for listening.
This function starts a nc
listener on the specified local port. It can use a port defined in the lport
parameter or a port provided as an argument.
Usage:
pwncatcs
:param line: The port number to use for the nc
listener. If not provided, it defaults to the lport
parameter.
:type line: str
:returns: None
Manual execution:
- Ensure that
nc
is installed and accessible from your command line. - The port number can either be provided as an argument or be set in the
lport
parameter of the function. - Run the function to start
nc
on the specified port.
If no port is provided as an argument, the function will use the port specified in the lport
parameter. If a port is provided, it overrides the lport
value.
After starting the listener, the function prints a message indicating that nc
is running on the specified port and another message when the session is closed.
Dependencies:
nc
: A tool used for creating reverse shells or bind shells.
release/0.1.54
Full Changelog: release/0.1.53...release/0.1.54
waybackmachine
Fetch URLs from the Wayback Machine for a given website.
The URL is taken from line. If the URL is not provided, an error is printed.
The limit of results is taken from self.params["limit"] if provided; otherwise, defaults to 10.
Results are printed directly to the console.
c2
Handles the execution of a C2 (Command and Control) server setup command.
This function performs the following tasks:
- Retrieves and validates the local host (lhost) and local port (lport) parameters.
- Checks if the required file
modules/run
exists. - Reads the content of the
modules/run
file, replaces placeholders with actual values (lport, line, lhost),
and copies the updated content to the clipboard. - Prompts the user to start the C2 server, and if confirmed, executes the server command.
- Provides a warning about shutting down the server.
Args:
line (str): The victim ID or command line to be used by the C2 server.
Returns:
None
Raises:
None
Example:
c2 victim-1
Notes:
- Ensure that the lhost
and lport
parameters are valid before calling this function.
- The modules/run
file must exist and be correctly formatted.
- The server command is executed using os.system
, which may require additional handling for security.
kick
Handles the process of sending a spoofed ARP packet to a specified IP address with a given MAC address.
This function performs the following steps:
- Executes a command to list current ARP entries and prints the IP and MAC addresses.
- Prompts the user to input the target IP and MAC address in a specified format.
- Parses the provided input to extract the IP and MAC addresses.
- Sets up default values for the gateway IP, local MAC address, and network interface.
- Creates an ARP packet with the specified target IP and MAC address.
- Sends the ARP packet using the specified network interface.
- Prints a confirmation message indicating that the spoofing packet has been sent.
Args:
line (str): Input line for the command, which is not used directly in this function.
Raises:
Exception: If any error occurs during the execution of the function.
sqli
Asks the user for the URL, database, table, and columns, and then executes the Python script
'modules/lazybsqli.py' with the provided parameters.
Parameters:
- def_func: Function to execute (not used in this example).
- line: Command line or additional input (not used in this example).
Example:
- do_bsqli(None, None)
sshkey
Generates an SSH key pair with RSA 4096-bit encryption. If no name is provided, it uses 'lazyown' by default.
The keys are stored in the 'sessions/' directory.
Parameters:
- line: The name of the key file. If empty, 'lazyown' is used as the default.
Example:
- do_sshkey(None) # Generates 'lazyown' key
- do_sshkey("custom_key") # Generates 'custom_key' key
crunch
Generate a custom dictionary using the crunch
tool.
This function creates a wordlist with a specified length using the crunch
command.
It allows the user to specify a custom character pattern for the wordlist.
:param line: The length of the strings to be generated (e.g., '6' for 6-character strings).
If not provided, the function will prompt an error message.
:returns: None
Example usage:
crunch 6
This will generate a wordlist with all possible combinations of 6-character strings using the default pattern.
Additional notes:
- If no custom pattern is provided, the function uses a default pattern: "0123456789abcdefghijklmnñopqrstuvxyz,.-#$%@"
- The output is saved in the
sessions/
directory with the filename formatdict_<length>.txt
malwarebazar
Fetches and displays malware information from the MalwareBazaar API based on the given tag.
Args:
line (str): The tag used to query the MalwareBazaar API.
This function performs the following steps:
- Constructs a URL to query the MalwareBazaar API with the provided tag.
- Uses
curl
to send a POST request to the API and saves the response in a JSON file. - Checks if the file was successfully created and exists.
- Loads the JSON data from the file.
- Checks the
query_status
field to determine if there are results.- If
no_results
, prints a warning message and exits the function.
- If
- Iterates through the list of file information provided in the response.
- Prints detailed information about each file, including:
- File name
- File type
- File size
- Hashes (SHA-256, SHA-1, MD5)
- First seen date
- Signature
- Tags
- ClamAV results (if any)
- Downloads and uploads count
- Prints detailed information about each file, including:
- Deletes the temporary file used to store the API response.
Returns:
None
download_malwarebazar
Download a malware sample from MalwareBazaar using its SHA256 hash.
This function allows the user to download a malware sample from MalwareBazaar by providing
the SHA256 hash of the desired file. If the hash is not provided as an argument, the function
will prompt an error message indicating the correct usage. The downloaded malware sample
will be saved as a zipped file (malware.zip
) and will be password protected.
Arguments:
line (str): The SHA256 hash of the malware sample to be downloaded.
Returns:
None
Example:
download_malwarebazar 094fd325049b8a9cf6d3e5ef2a6d4cc6a567d7d49c35f8bb8dd9e3c6acf3d78d
Notes:
- Ensure that the SHA256 hash provided is correct and that it corresponds to a file available
on MalwareBazaar. - The downloaded file will be password protected using the password "infected".
- To obtain the SHA256 hash of malware samples, refer to the
help malwarebazar
command.
See Also:
run(command)
: Utility function used to execute the command for downloading the malware.
sslscan
Run an SSL scan on the specified remote host.
This function initiates an SSL scan on a specified remote host (rhost
)
using the sslscan-singleip.sh
script. If a specific port is provided in the
line
argument, the scan will target that port; otherwise, it will scan
all available ports.
Parameters:
line (str): The port number to scan (optional). If omitted, the scan will target all ports.
Internal Variables:
rhost (str): The remote host IP address or hostname extracted from the params
attribute.
Returns:
None
Example Usage:
- To scan all ports on the specified
rhost
:sslscan
- To scan a specific port (e.g., port 443) on
rhost
:sslscan 443
Note:
- The
check_rhost()
function is used to validate therhost
before running the scan. - The
sslscan-singleip.sh
script must be present in thesessions
directory.
cewl
This function constructs and executes a command for the 'cewl' tool.
It first checks if the 'url' parameter is set. If not, it prints an error message.
If the 'url' is set, it extracts the domain from the URL using the get_domain function.
Then, it constructs a 'cewl' command with the specified parameters and prepares it for execution.
Scan to a depth of 2 (-d 2) and use a minimum word length of 5 (-m 5), save the words to a file (-w docswords.txt), targeting the given URL (https://example.com):
Parameters:
line (str): The command line input for this function.
Expected self.params keys:
- url (str): The URL to be used for the 'cewl' command.
Example usage:
- set url http://example.com
- do_cewl
dmitry
This function constructs and executes a command for the 'dmitry' tool.
It first checks if the 'url' parameter is set. If not, it prints an error message.
If the 'url' is set, it extracts the domain from the URL using the get_domain function.
Then, it constructs a 'dmitry' command with the specified parameters and prepares it for execution.
Run a domain whois lookup (w), an IP whois lookup (i), retrieve Netcraft info (n), search for subdomains (s), search for email addresses (e), do a TCP port scan (p), and save the output to example.txt (o) for the domain example.com:
Parameters:
line (str): The command line input for this function.
Expected self.params keys:
- url (str): The URL to be used for the 'dmitry' command.
Example usage:
- set url http://example.com
- do_dmitry
graudit
Executes the graudit command to perform a static code analysis with the specified options.
This function runs the 'graudit' tool with the '-A' option for an advanced scan and
the '-i sessions' option to include session files. The results will be displayed
directly in the terminal.
Args:
line (str): Input line from the command interface. This argument is currently
not used within the function but is required for the command
interface structure.
Example:
To run this function from the command interface, simply type 'graudit' and press enter.
The function will execute the 'graudit -A -i sessions' command.
Note:
Ensure that 'graudit' is installed and properly configured in your system's PATH
for this function to work correctly.
msfrpc
Connects to the msfrpcd daemon and allows remote control of Metasploit.
Usage:
msfrpc -a -p -U -P [-S]
This command will prompt the user for necessary information to connect to msfrpcd.
nuclei
Executes a Nuclei scan on a specified target URL or host.
Usage:
nuclei -u [-o ] [other options]
If a URL is provided as an argument, it will be used as the target for the scan.
Otherwise, it will use the target specified in self.params["rhost"].
parsero
Executes a parsero scan on a specified target URL or host.
Usage:
parsero -u [-o ] [other options]
If a URL is provided as an argume...
release/0.1.53
Full Changelog: release/0.1.52...release/0.1.53
release/0.1.52
Full Changelog: release/0.1.51...release/0.1.52
release/0.1.51
Full Changelog: release/0.1.50...release/0.1.51
release/0.1.50
Full Changelog: release/0.1.49...release/0.1.50
alterx
Executes the 'alterx' command for subdomain enumeration on the provided domain. If 'alterx'
is not installed, the function automatically downloads, installs, and configures it. The result
of the subdomain enumeration is saved in a session-specific text file.
Steps performed by the function:
- Check if 'alterx' is installed:
- Uses
is_binary_present("alterx")
to verify if the 'alterx' binary is available in the system. - If the binary is not found, the function prints a warning and proceeds to download and install 'alterx'.
- Installation of 'alterx':
- Executes a system command to create a directory named 'alterx' in the user's home directory.
- Downloads the 'alterx' version 0.0.4 (Linux 64-bit) from GitHub and extracts it into the 'alterx' directory.
- Add 'alterx' to system PATH:
- Depending on the user's shell (
bash
orzsh
), it appends the 'alterx' directory to the system PATH
by modifying the appropriate shell configuration file (~/.bashrc
or~/.zshrc
). This ensures 'alterx'
can be executed from any directory.
- Obtain the domain:
- Retrieves the URL from the class parameter
self.params["url"]
. - Extracts the domain from the URL using
get_domain(url)
. - If no domain is provided as an argument in
line
, prompts the user to input a domain, defaulting to
the previously extracted domain.
- Execute 'alterx' on the domain:
- Executes the 'alterx' tool on the specified domain via a system command.
- The subdomain enumeration results are saved to a file in the 'sessions' directory, with the filename
subdomain_dic_<domain>.txt
.
Parameters:
- line (str): The domain on which to run 'alterx'. If empty, the function prompts the user for input.
Returns:
- None: The function performs its operations but does not return any value.
Dependencies:
- The function relies on the external tool 'alterx' and assumes the presence of the
is_binary_present()
andget_domain()
helper functions.
allin
Execute the AlliN.py tool with various scan modes and parameters.
This function prompts the user to choose a scan type (e.g., pscan, sfscan, bakscan),
and then asks for the necessary parameters (host, ports, project name, etc.).
Based on the user's input, it generates the corresponding command and executes it.
:param line: Not used in this implementation.
:returns: None
dr0p1t
Execute the Dr0p1t tool to create a stealthy malware dropper.
This function prompts the user to input the necessary parameters for
generating a dropper, including the malware URL, persistence options,
and additional configurations. Based on the user's input, it constructs
the command and executes it.
:param line: Not used in this implementation.
:returns: None
gitdumper
Install and execute the git-dumper tool to download Git repository content.
This function checks if git-dumper is installed, and if not, installs it using pip.
Then, it prompts the user to input the necessary parameters to run git-dumper, constructs
the command, and executes it.
:param line: Not used in this implementation.
:returns: None
powershell_cmd_stager
Generate and execute a PowerShell command stager to run a .ps1 script.
This function takes the name of a PowerShell script (.ps1), encodes its content in base64,
and constructs a command to execute the script using PowerShell in a hidden and elevated manner.
The function then prints the generated command.
:param line: The name of the PowerShell script file to encode and execute.
:returns: None
shellcode_search
Search the shell-storm API for shellcodes using the provided keywords.
This function sends a GET request to the shell-storm API with the specified keywords.
It then prints the results.
:param line: A string containing the keywords to search for.
:returns: None
ligolo
Automates the setup and execution of Ligolo server and client for tunneling and port forwarding.
:param line: The command line input containing the port number for Ligolo setup.
:type line: str
:returns: None
addusers
Opens or creates the users.txt file in the sessions directory for editing using nano.
:param line: Not used directly but reserved for future use.
:returns: None
windapsearch
Execute the windapsearch tool to perform Active Directory Domain enumeration through LDAP queries.
This function allows the user to specify various parameters for executing different LDAP query modules
using windapsearch. It handles user input for domain, username, password, and other options, constructs
the command, and executes it.
:param line: Not used in this implementation.
:returns: None
passtightvnc
Decrypts TightVNC passwords using Metasploit.
This function demonstrates how TightVNC passwords can be decrypted using the known hardcoded DES key
from the program and Metasploit's Rex::Proto::RFB::Cipher.decrypt
function.
Steps:
- Receives the password in hexadecimal format from the command line input.
- Creates a Metasploit resource script that includes commands to decrypt the TightVNC password.
- Executes Metasploit with the created resource script and then deletes the temporary file.
- Prints the decrypted password.
:param line: The TightVNC password in hexadecimal format.
:type line: str
:returns: None
Manual execution:
To manually decrypt a TightVNC password, you would need to:
- Use Metasploit's
Rex::Proto::RFB::Cipher.decrypt
function with the hardcoded DES key and the hexadecimal password.
Example:
passtightvnc D7A514D8C556AADE
shadowsocks
Execute the Shadowsocks tool to create a secure tunnel for network traffic.
This function allows the user to specify various parameters for configuring and running the Shadowsocks client
or server. It handles user input for server address, port, password, encryption method, and other options,
constructs the command, and executes it.
:param line: Not used in this implementation.
:returns: None
release/0.1.49
Full Changelog: release/0.1.48...release/0.1.49
COMMANDS.md Documentation by readmeneitor.py
py3ttyup
Copies a Python reverse shell command to the clipboard.
This function generates a Python command that uses the pty
module to spawn a new shell and copies it to the clipboard. This is typically used for creating a TTY shell in a reverse shell situation.
Usage:
py3ttyup
:param line: This parameter is not used in the function.
:type line: str
:returns: None
Manual execution:
- The function creates a Python command with
pty.spawn
to open a shell. - The command is copied to the clipboard using
xclip
. - A message is printed to inform the user that the command has been copied.
Dependencies:
- The script uses
xclip
to copy the command to the clipboard.
Example:
py3ttyup
# This will copy the Python command python3 -c 'import pty; pty.spawn("/bin/bash")'
to the clipboard.
Note:
This command is often used in scenarios where you need a more interactive shell from a reverse shell connection.
rev
Copies a reverse shell payload to the clipboard.
This function generates a reverse shell command that connects back to the specified host and port, and copies it to the clipboard. It also provides a way to execute the payload via a PHP-based web shell.
Usage:
rev
:param line: This parameter is not used in the function.
:type line: str
:returns: None
Manual execution:
- Ensure that
lhost
,lport
, andrhost
parameters are set. - The function generates a reverse shell command in Bash and prints instructions for using the payload.
- It also provides an example URL and PHP code snippet that decodes and executes the base64-encoded payload.
- The reverse shell command is copied to the clipboard using
xclip
.
Dependencies:
- The script uses
xclip
to copy the command to the clipboard. - Base64 encoding is used to obfuscate the payload.
Example:
rev
# This will copy a reverse shell command to the clipboard and display instructions for its use.
img2cookie
Copies a malicious image tag payload to the clipboard.
This function crafts and copies two different image tag payloads designed to steal cookies from a target's browser. The payloads use JavaScript to send cookies to a specified host and port. The user is prompted to select which payload to copy to the clipboard.
Usage:
img2cookie
:param line: This parameter is not used in the function.
:type line: str
:returns: None
Manual execution:
- Ensure that
lhost
,lport
, andrhost
parameters are set. - The function generates two payloads:
- Payload 1: A script that sends cookies to the specified host and port.
- Payload 2: An image tag with an
onerror
event that fetches cookies and sends them to the specified host and port using Base64 encoding.
- The user is prompted to choose between the two payloads, which are then copied to the clipboard.
Dependencies:
- The script uses
xclip
to copy the payloads to the clipboard. - Ensure that
lhost
,lport
, andrhost
parameters are set with appropriate values.
Example:
img2cookie
# This will prompt you to select between two payloads. The chosen payload will be copied to the clipboard.
disableav
Creates a Visual Basic Script (VBS) to attempt to disable antivirus settings.
This function generates a VBS script designed to modify Windows Registry settings and run PowerShell commands to disable various Windows Defender antivirus features.
Usage:
disableav
:param line: This parameter is not used in the function.
:type line: str
:returns: None
Manual execution:
- The function writes a VBS script to a file named
aav.vbs
in thesessions
directory. - The script:
- Elevates its privileges if not already running as an administrator.
- Modifies Windows Registry settings to disable various Windows Defender features.
- Outputs PowerShell commands to disable additional Windows Defender settings.
The VBS script:
- Uses
WScript.Shell
to modify the Windows Registry for disabling Windows Defender. - Calls PowerShell commands to further disable antivirus features.
Dependencies:
- The script must be executed on a Windows system where you have administrative privileges.
- Ensure you have appropriate permissions to modify Windows Registry settings.
Example:
disableav
# This will create the aav.vbs
file with the specified content in the sessions
directory.
conptyshell
Downloads ConPtyShell and prepares a PowerShell command for remote access.
This function downloads the ConPtyShell PowerShell script and ZIP archive to the sessions
directory and copies a PowerShell command to the clipboard for easy execution.
Usage:
conptyshell
:param line: This parameter is not used in the function. The required host and port are retrieved from the params
dictionary.
:type line: str
:returns: None
Manual execution:
- Ensure that the
lhost
andlport
parameters are set with the local host and port for the reverse shell. - The function downloads
Invoke-ConPtyShell.ps1
andConPtyShell.zip
to thesessions
directory. - Constructs a PowerShell command to run
Invoke-ConPtyShell.ps1
with the specified local IP and port. - Copies the constructed command to the clipboard using
xclip
.
The constructed PowerShell command:
- Uses
Invoke-ConPtyShell.ps1
to establish a reverse shell connection to the specifiedlhost
andlport
. - Sets the PowerShell execution policy to bypass and specifies the dimensions of the terminal window.
Dependencies:
wget
: For downloading files from the internet.xclip
: For copying commands to the clipboard.- Ensure
ConPtyShell
script and ZIP are compatible with your environment.
Example:
conptyshell
# This will download the required files and copy the PowerShell command to the clipboard.
pwncatcs
Runs pwncat-cs
with the specified port for listening.
This function starts a pwncat-cs
listener on the specified local port. It can use a port defined in the lport
parameter or a port provided as an argument.
Usage:
pwncatcs
:param line: The port number to use for the pwncat-cs
listener. If not provided, it defaults to the lport
parameter.
:type line: str
:returns: None
Manual execution:
- Ensure that
pwncat-cs
is installed and accessible from your command line. - The port number can either be provided as an argument or be set in the
lport
parameter of the function. - Run the function to start
pwncat-cs
on the specified port.
If no port is provided as an argument, the function will use the port specified in the lport
parameter. If a port is provided, it overrides the lport
value.
After starting the listener, the function prints a message indicating that pwncat-cs
is running on the specified port and another message when the session is closed.
Dependencies:
pwncat-cs
: A tool used for creating reverse shells or bind shells.
find
Automates command execution based on a list of aliases and commands.
- Displays available aliases and their commands.
- Asks the user if they want to execute a specific command.
- If confirmed, displays the alias and command with a number.
- Executes the command and copies it to the clipboard.
:param line: The command line input containing the list of alias and command pairs.
:type line: str
:returns: None
Manual execution:
To manually run these tasks, you would need to:
- Prepare the list of alias and command pairs in the format: "alias command".
- Provide this list as input to the function.
- Confirm the execution of the desired command when prompted.
- Manually copy the command to the clipboard if needed.
Note: Ensure xclip
is installed and properly configured to use clipboard functionalities.
sh
Executes a shell command directly from the LazyOwn interface.
This function allows the user to execute arbitrary shell commands without exiting the LazyOwn shell.
It checks if a command is provided, prints a message indicating the command being executed, and then
runs the command using os.system
.
Usage:
sh
:param line: The shell command to be executed.
:type line: str
:raises ValueError: If no command is provided, an error message is printed indicating that a command is required.
:returns: None
Example:
sh ls -la
# This will execute 'ls -la' in the shell without exiting LazyOwn.
Note:
Ensure that the command provided is safe to execute and does not include potentially harmful operations.
pwd
Displays the current working directory and lists files, and copies the current directory path to the clipboard.
This function performs the following tasks:
- Displays the current working directory with
pwd
and lists files in the directory usingls
. - Copies the current directory path to the clipboard using
xclip
.
Usage:
pwd
:param line: This parameter is not used in the function but is included for consistency with other command methods.
:type line: str
:returns: None
Manual execution:
1. The command echo -e "[\e[96m\
pwd`\e[0m]\e[34m" && ls && echo -en "\e[0m"is executed to display the current working directory and list files in it. 2. The current directory path is copied to the clipboard using the command
pwd | xclip -sel clip`.
Dependencies:
- The function relies on echo
, pwd
, ls
, and xclip
to display the directory and copy the path to the clipboard.
Example:
pwd
# This will display the current working directory, list files, and copy the current directory path to the clipboard.
Note:
Ensure that xclip
is installed on your system for copying to the clipboard to work.
qa
Exits the application quickly without confirmation.
This ...
release/0.1.48
Full Changelog: release/0.1.47...release/0.1.48
COMMANDS.md Documentation by readmeneitor.py
init
Initializer for the LazyOwnShell class.
This method sets up the initial parameters and scripts for an instance of
the LazyOwnShell class. It initializes a dictionary of parameters with default
values and a list of script names that are part of the LazyOwnShell toolkit.
Attributes:
params (dict): A dictionary of parameters with their default values.
scripts (list): A list of script names included in the toolkit.
output (str): An empty string to store output or results.
default
Handles undefined commands, including aliases.
This method checks if a given command (or its alias) exists within the class
by attempting to find a corresponding method. If the command or alias is not
found, it prints an error message.
:param line: The command or alias to be handled.
:type line: str
:return: None
one_cmd
Internal function to execute commands.
This method attempts to execute a given command using onecmd
and captures
the output. It sets the output
attribute based on whether the command was
executed successfully or an exception occurred.
:param command: The command to be executed.
:type command: str
:return: A message indicating the result of the command execution.
:rtype: str
emptyline
Handle the case where the user enters an empty line.
This method is called when the user submits an empty line of input in
the command-line interface. By default, it provides feedback indicating
that no command was entered.
It is useful for providing user-friendly messages or handling empty input
cases in a custom manner.
License: This function is part of a program released under the GNU General
Public License v3.0 (GPLv3). You can redistribute it and/or modify it
under the terms of the GPLv3, as published by the Free Software Foundation.
Note: This method is called by the cmd library when an empty line is
entered. You can override it in a subclass to change its behavior.
Example:
>>> shell = LazyOwnShell()
>>> shell.emptyline()
You didn't enter any command.
EOF
Handle the end-of-file (EOF) condition.
This method is called when the user sends an end-of-file (EOF) signal
by pressing Ctrl+D. It is typically used to handle cleanup or exit
operations when the user terminates input.
In this implementation, it prints a farewell message and returns True
to indicate that the shell should exit.
License: This function is part of a program released under the GNU General
Public License v3.0 (GPLv3). You can redistribute it and/or modify it
under the terms of the GPLv3, as published by the Free Software Foundation.
Note: This method is a part of the cmd
library's command handling
system. You can override it in a subclass to customize its behavior.
Example:
>>> shell = LazyOwnShell()
>>> shell.do_EOF(None)
LazyOwn say Goodbye!
(shell exits)
postloop
Handle operations to perform after exiting the command loop.
This method is called after the command loop terminates, typically used
for performing any final cleanup or displaying messages before the program
exits.
In this implementation, it prints a message indicating that the custom
shell is exiting.
License: This function is part of a program released under the GNU General
Public License v3.0 (GPLv3). You can redistribute it and/or modify it
under the terms of the GPLv3, as published by the Free Software Foundation.
Note: This method is called automatically by the cmd
library's command
loop after the loop terminates. You can override it in a subclass to
customize its behavior.
Example:
>>> shell = LazyOwnShell()
>>> shell.cmdloop() # Exits the command loop
Exiting custom LazyOwnShell.
set
Set a parameter value.
This function takes a line of input, splits it into a parameter and a value,
and sets the specified parameter to the given value if the parameter exists.
:param line: A string containing the parameter and value to be set.
Expected format: ' '.
:type line: str
:return: None
:raises: ValueError if the input line does not contain exactly two elements.
show
Show the current parameter values.
This function iterates through the current parameters and their values,
printing each parameter and its associated value.
:param line: This parameter is not used in the function.
:type line: str
:return: None
list
Lists all available scripts in the modules directory.
This method prints a list of available scripts in a formatted manner, arranging
them into columns. It shows each script with sufficient spacing for readability.
:param line: This parameter is not used in the method.
:type line: str
:return: None
run
Runs a specific LazyOwn script.
This method executes a script from the LazyOwn toolkit based on the provided
script name. If the script is not recognized, it prints an error message.
To see available scripts, use the list
or help list
commands.
:param line: The command line input containing the script name.
:type line: str
:return: None
lazysearch
Runs the internal module modules/lazysearch.py
.
This method executes the lazysearch
script from the specified path, using
the binary_name
parameter from the self.params
dictionary. If binary_name
is not set, it prints an error message.
:return: None
lazysearch_gui
Run the internal module located at modules/LazyOwnExplorer.py
.
This method executes the LazyOwnExplorer.py
script, which is used for graphical user interface (GUI) functionality within the LazyOwn framework.
The function performs the following steps:
- Calls
self.run_script
withLazyOwnExplorer.py
to execute the GUI module.
:returns: None
Manual execution:
- Ensure that the
modules/LazyOwnExplorer.py
script is present in themodules
directory. - Run the script with:
python3 modules/LazyOwnExplorer.py
Example:
To run LazyOwnExplorer.py
directly, execute:
python3 modules/LazyOwnExplorer.py
Note:
- Ensure that the script has the appropriate permissions and dependencies to run.
- Verify that your environment supports GUI operations if using this script in a non-graphical environment.
lazyown
Run the internal module located at modules/lazyown.py
.
This method executes the lazyown.py
script, which is a core component of the LazyOwn framework.
The function performs the following steps:
- Calls
self.run_script
withlazyown.py
to execute the script.
:returns: None
Manual execution:
- Ensure that the
modules/lazyown.py
script is present in themodules
directory. - Run the script with:
python3 modules/lazyown.py
Example:
To run lazyown.py
directly, execute:
python3 modules/lazyown.py
Note:
- Ensure that the script has the appropriate permissions and dependencies to run.
update_db
Run the internal module located at modules/update_db.sh
.
This method executes the update_db.sh
script to update the database of binary exploitables from gtofbins
.
The function performs the following steps:
- Executes the
update_db.sh
script located in themodules
directory usingos.system
.
:returns: None
Manual execution:
- Ensure that the
modules/update_db.sh
script is present in themodules
directory. - Run the script with:
./modules/update_db.sh
Example:
To manually update the database, execute:
./modules/update_db.sh
Note:
- Ensure that the script has execute permissions.
- The script should be run with the necessary privileges if required.
lazynmap
Runs the internal module modules/lazynmap.sh
for multiple Nmap scans.
This method executes the lazynmap
script, using the current working directory
and the rhost
parameter from the self.params
dictionary as the target IP.
If rhost
is not set, it prints an error message.
:return: None
lazywerkzeugdebug
Run the internal module located at modules/lazywerkzeug.py
in debug mode.
This method executes the lazywerkzeug.py
script with the specified parameters for remote and local hosts and ports. It is used to test Werkzeug in debug mode.
The function performs the following steps:
- Retrieves the
rhost
,lhost
,rport
, andlport
values fromself.params
. - Checks if all required parameters are set. If not, prints an error message and returns.
- Calls
self.run_script
withlazywerkzeug.py
and the specified parameters.
:param rhost: The remote host address.
:type rhost: str
:param lhost: The local host address.
:type lhost: str
:param rport: The remote port number.
:type rport: int
:param lport: The local port number.
:type lport: int
:returns: None
Manual execution:
- Ensure that
rhost
,lhost
,rport
, andlport
are set inself.params
. - The script
modules/lazywerkzeug.py
should be present in themodules
directory. - Run the script with:
python3 modules/lazywerkzeug.py <rhost> <rport> <lhost> <lport>
Example:
To run lazywerkzeug.py
with rhost
set to "127.0.0.1"
, rport
to 5000
, lhost
to "localhost"
, and lport
to 8000
, set:
self.params["rhost"] = "127.0.0.1"
self.params["rport"] = 5000
self.params["lhost"] = "localhost"
self.params["lport"] = 8000
Then call:
run_lazywerkzeugdebug()
Note:
- Ensure that modules/lazywerkzeug.py
has the appropriate permissions and dependencies to run.
- Verify that the specified hosts and ports are correct and available.
lazygath
Run the internal module located at modules/lazygat.sh
. to gathering the sistem :)
This method executes the lazygat.sh
script located in the `modul...