### Sample Weapon Definition Source: https://github.com/hahwul/webhackersweapons/blob/main/CONTRIBUTING.md An example of a completed YAML entry for a weapon. This demonstrates how to fill in the fields. ```yaml --- name: HUNT description: Identifies common parameters vulnerable to certain vulnerability classes url: https://github.com/bugcrowd/HUNT category: tool-addon type: Recon platform: [linux, macos, windows, zap, burpsuite] lang: Kotlin tags: [param] ``` -------------------------------- ### Get Process Information (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Lists running processes. Use 'grep' to filter for specific processes. ```Shell ps aux ``` -------------------------------- ### Build Documentation Command Source: https://github.com/hahwul/webhackersweapons/blob/main/AGENTS.md Command to regenerate the README.md and categorize/* files using the build script. ```bash ruby ./scripts/erb.rb ``` -------------------------------- ### Create Tar Archive (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Creates a .tar.gz archive. Use 'c' for create, 'v' for verbose, 'f' for file, 'z' for gzip. ```Shell tar -czvf archive.tar.gz directory_to_archive/ ``` -------------------------------- ### Add New Weapon YAML File Source: https://github.com/hahwul/webhackersweapons/blob/main/AGENTS.md Steps to create a new weapon definition file in YAML format. Includes creating the file, validating its syntax, building documentation, verifying its appearance in README, and checking validation warnings. ```bash # 1. Create weapon file cat > weapons/newtool.yaml << EOF --- name: New Tool description: Description of the tool url: https://github.com/owner/repo category: tool type: Scanner platform: [linux, macos, windows] lang: Python tags: [xss] EOF # 2. Validate YAML syntax yamllint weapons/newtool.yaml # 3. Build documentation ruby ./scripts/erb.rb # 4. Verify tool appears in README grep "New Tool" README.md # 5. Check validation warnings ruby ./scripts/validate_weapons.rb ``` -------------------------------- ### Get Current Directory (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Prints the name of the current working directory. Essential for scripting path operations. ```Shell pwd ``` -------------------------------- ### Create a Directory (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Creates a new directory. Ensure the path is correct to avoid errors. ```Shell mkdir new_directory ``` -------------------------------- ### Fix Missing Newline Error Source: https://github.com/hahwul/webhackersweapons/blob/main/AGENTS.md Example of how to fix the 'no new line character at the end of file' error by appending a newline character to the specified file. ```bash # Missing newline error: ::error file=weapons/tool.yaml,line=9,col=13::9:13 [new-line-at-end-of-file] no new line character at the end of file # Fix by adding blank line at end of file: echo "" >> weapons/tool.yaml ``` -------------------------------- ### View System Uptime (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Shows how long the system has been running. Displays days, hours, and minutes. ```Shell uptime ``` -------------------------------- ### List Files in Directory (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Lists all files and directories in the current directory. Use this for basic file system navigation. ```Shell ls -al ``` -------------------------------- ### Build and Validate Repository Scripts Source: https://github.com/hahwul/webhackersweapons/blob/main/AGENTS.md Commands to bootstrap and validate the repository. These scripts ensure the integrity of weapon definitions and documentation. ```bash ruby ./scripts/erb.rb ruby ./scripts/validate_weapons.rb yamllint weapons/*.yaml ``` -------------------------------- ### Download a File (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Downloads a file from a URL using wget. Specify output filename with -O. ```Shell wget -O output.file http://example.com/file.zip ``` -------------------------------- ### Manual YAML Syntax Check Source: https://github.com/hahwul/webhackersweapons/blob/main/AGENTS.md Command to check the YAML syntax of a specific weapon file. Should return no errors. ```bash yamllint weapons/yourfile.yaml ``` -------------------------------- ### View File Content (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Displays the content of a file. Use 'less' for large files to navigate. ```Shell cat file.txt ``` -------------------------------- ### Check Disk Usage (Shell) Source: https://github.com/hahwul/webhackersweapons/blob/main/categorize/langs/Shell.md Displays disk space usage for file systems. Use 'h' for human-readable format. ```Shell df -h ```