Skip to content

a-mashhoor/npp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ฅ NPP: NEW PENTEST PROJECT

Stop wasting time on folder structures, start pwning boxes


๐Ÿ“Œ WHAT THE F IS THIS?

npp (new pentest project) is your personal project manager that automates the boring shit you always do at the start of an engagement. No more manually creating 47 folders, no more losing notes in random directories, no more "where did I save that screenshot?"

It handles:

  • Project metadata (client, type, rules of engagement, bounty platforms, etc.)
  • Directory structure (organized by apex domains, subdomains, reports, evidences)
  • Scope processing (domains, URLs, wildcards โ€“ from file or stdin)
  • DNS resolution (basic A record checks with retries, custom resolvers)
  • JSON databases (global project index + perโ€‘project detailed data)
  • Updates (add scope, reports, notes, users)
  • Status tracking (project state, domain/subdomain alive/working/inscope)
  • Listing (filtered by alive/inscope, show stats, current work)
  • Archiving (tar, tar.gz, tar.bz2, 7z, zip, rar โ€“ with password support)
  • Removal (project, apex, subdomain, user โ€“ with confirmation)
  • Trilium integration (create notes in your favourite noteโ€‘taking app)
  • Config file support (for those who hate typing)

๐Ÿš€ INSTALLATION (IT'S NOT ROCKET SCIENCE)

# Clone the repo
git clone https://github.com/a-mashhoor/npp.git npp && cd npp/src

# Make it executable
chmod +x npp.zsh

# Move it to your PATH (pick one)
sudo ln -sf  `pwd`/npp.zsh /usr/local/bin/npp           # system-wide
ln -sf  `pwd`/npp.zsh  $HOME/.local/bin/npp             # user only (add to PATH if needed)

๐Ÿ’€ USAGE: STOP WASTING TIME

Initialize a new project

npp init -n myproject -t bounty -bp "hacker1:https://hackerone.com/foo" -d "Critical API testing" --note t --trilium-server http://localhost:8080 --trilium-api-key your-key

This only creates a global entry (no directories yet). The real structure comes later with new.

Create directories for an existing project

npp new -p myproject -s @scope.txt -rc 30 -t
  • -p project name (must already exist)
  • -s scope (file with @ prefix, or spaceโ€‘separated list)
  • -rc number of report folders (default 20)
  • -t show directory tree

Add more stuff to an existing project

npp add -p myproject -as -s newdomain.com -dr --resolver 8.8.8.8
npp add -p myproject -ar 5
npp add -p myproject -an "quick_notes"
npp add -p myproject -au admin:password123

Update status

npp update -p myproject --status completed
npp update -p myproject -ux example.com --alive false --workingon true
npp update -p myproject -us sub.example.com --auto-alive -dr

List stuff

npp list -P                               # all project names
npp list -p myproject -a                  # all domains & subdomains
npp list -p myproject -ax                 # only apex domains
npp list -p myproject -sd                 # only subdomains
npp list -p myproject -cs                 # statistics
npp list -p myproject -c                  # currently working on
npp list -p myproject -a -f alive         # only alive entries

Change to project directory (prints path)

cd $(npp cd -p myproject)

Archive a project

npp archive -p myproject -f 7z -s         # passwordโ€‘protected 7z
npp archive -p myproject -f tar.bz2       # good ol' tarball

Remove stuff (with confirmation)

npp rm -p myproject                        # delete entire project
npp rm -p myproject -ax example.com        # remove apex + all subs
npp rm -p myproject -su sub.example.com    # remove single subdomain
npp rm -p myproject -u admin:password123   # remove user line
npp rm -p myproject -y                     # skip confirmation

๐Ÿ“ DIRECTORY STRUCTURE (WHAT YOU GET)

myproject/
โ”œโ”€โ”€ burp_project/               # Burp session files
โ”œโ”€โ”€ target_data/
โ”‚   โ”œโ”€โ”€ scope/                   # original scope files
โ”‚   โ”œโ”€โ”€ credentials/             # users.txt (passwords optional)
โ”‚   โ”œโ”€โ”€ api_documents/           # API docs from client
โ”‚   โ””โ”€โ”€ general_data/            # general description, etc.
โ”œโ”€โ”€ reports/
โ”‚   โ”œโ”€โ”€ templates/                # report templates (you'll never use them)
โ”‚   โ””โ”€โ”€ all_reports/
โ”‚       โ”œโ”€โ”€ No.01/                 # first attempt
โ”‚       โ”‚   โ”œโ”€โ”€ evidences/
โ”‚       โ”‚   โ”œโ”€โ”€ edited_media/
โ”‚       โ”‚   โ””โ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ No.02/                 # second attempt
โ”‚       โ””โ”€โ”€ ...
โ”œโ”€โ”€ my_evaluation/                 # your personal notes
โ”œโ”€โ”€ gathered_info/
โ”‚   โ”œโ”€โ”€ network/                    # ASNs, CIDRs, CDN, whois
โ”‚   โ”œโ”€โ”€ screen_shots/                # pictures of your pwns
โ”‚   โ”œโ”€โ”€ crawlers_results/             # katana, etc.
โ”‚   โ”œโ”€โ”€ dns_results/                   # raw DNS output
โ”‚   โ”œโ”€โ”€ fuzzing_results/                # ffuf, feroxbuster
โ”‚   โ”œโ”€โ”€ RBAC/                           # roleโ€‘based access control stuff
โ”‚   โ””โ”€โ”€ apex_domains/
โ”‚       โ””โ”€โ”€ example-com/                 # apex domain dir
โ”‚           โ”œโ”€โ”€ apex_domain.txt
โ”‚           โ””โ”€โ”€ subdomains/
โ”‚               โ”œโ”€โ”€ www-example-com/
โ”‚               โ”‚   โ”œโ”€โ”€ subdomain.txt
โ”‚               โ”‚   โ”œโ”€โ”€ tech_stack/       # technologies.json
โ”‚               โ”‚   โ””โ”€โ”€ URLs/              # wayback/gathered URLs
โ”‚               โ””โ”€โ”€ api-example-com/
โ”œโ”€โ”€ tmp_exploits/                    # your 0โ€‘days (keep them safe)
โ”‚   โ”œโ”€โ”€ custom_src/
โ”‚   โ”œโ”€โ”€ payloads/
โ”‚   โ”œโ”€โ”€ bin/
โ”‚   โ””โ”€โ”€ files2u/
โ”œโ”€โ”€ myproject_local_notes/            # local markdown notes (if --note l)
โ”‚   โ”œโ”€โ”€ observations.md
โ”‚   โ””โ”€โ”€ tmp.md
โ””โ”€โ”€ .local.data.json                  # perโ€‘project JSON (don't touch if you do you will f up the tool)

โš™๏ธ OPTIONS (READ THE FINE PRINT)

Global

Option Description
-h, --help Show this help
--version Show version
--check-config FILE Validate a config file

Commands

Command Description
init Initialize project (metadata only)
new Create directory structure
add Add scope/reports/notes/users
update Update status (project/apex/subdomain)
rm Remove project/apex/subdomain/user
list List projects/domains/subdomains
cd Print project path
archive Archive project

Run npp <command> --help for commandโ€‘specific options.


๐Ÿง  PRO TIPS

  • Use config files for repetitive options. Example ~/.npprc:

    type=bounty
    note=t
    trilium-server=http://localhost:8080
    trilium-api-key=your-key
    trilium-parent=team-projects
    

    Then: npp init -n myproject -c ~/.npprc

  • DNS resolution with -dr is reliable (5 retries). Use --resolver to specify a custom DNS server.

  • Autoโ€‘alive in update reโ€‘resolves the domain and updates is_alive and IPs.

  • Wildcard domains (*.example.com) are handled properly: directory wildcard-subdomain, files indicate wildcard.

  • Trilium integration creates a book note for the project and child notes notes_tmp and observations. Make sure the parent note exists.

  • Global JSON lives in ~/.local/share/npp/global.json. Back it up if you care.


๐Ÿ”ฎ ROADMAP (COMING SOONโ„ข)

  • GPG encryption for sensitive reports
  • Backup/restore projects (export/import)
  • More recon integrations (subfinder, httpx, nuclei)
  • Template system for custom directory layouts
  • Web UI (maybe, if I get bored)

๐Ÿšจ WARNINGS (READ THIS, ID**T)

  1. ZSH ONLY โ€“ This script uses zshโ€‘isms. Don't try with bash.
  2. No spaces in project names โ€“ npp init -n "my project" will break. Use underscores or hyphens.
  3. Always validate your scope โ€“ process_scope does its best, but garbage in = garbage out.
  4. Backup your global JSON โ€“ It's the brain of the tool. Lose it, lose your project index.
  5. rm is destructive โ€“ Confirmation is there for a reason. Don't -y unless you're sure.

๐Ÿ‘จโ€๐Ÿ’ป AUTHOR

Arshia Mashhoor โ€“ "I made this because I kept losing my screenshots."

GitHub: @a-mashhoor


๐Ÿ“„ LICENSE

WTFPL โ€“ Do whatever the f..k you want with it. No warranties, no liabilities, just code.


๐ŸŽฏ FINAL WORDS

Stop being a disorganized mess. Use this tool. Save your time for actual hacking.

# This is the way
npp init -n "$(whoami)_is_organized" -t bounty -bp "hacker1:https://hackerone.com/foo"
npp new -p "$(whoami)_is_organized" -s @scope.txt -rc 30 -t

Happy hacking, you beautiful chaotic bastard. ๐Ÿดโ€โ˜ ๏ธ


Found a bug? Open an issue. Want a feature? Submit a PR. Don't just complain.

About

zsh script to create an manage PT projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages