Git Product home page Git Product logo

pdtm's Introduction


ProjectDiscovery's Open Source Tool Manager

FeaturesInstallationUsageRunning pdtmJoin Discord

pdtm is a simple and easy-to-use golang based tool for managing open source projects from ProjectDiscovery.

Installation

pdtm requires go1.19 to install successfully. Run the following command to install the latest version:

  1. Install using go install -
go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
  1. Install by downloading binary from https://github.com/projectdiscovery/pdtm/releases

Notes:

  • Currently, projects are installed by downloading the released project binary. This means that projects can only be installed on the platforms for which binaries have been published.
  • The path $HOME/.pdtm/go/bin is added to the $PATH variable by default

Usage:

pdtm is a simple and easy-to-use golang based tool for managing open source projects from ProjectDiscovery

Usage:
  ./pdtm [flags]

Flags:
CONFIG:
   -config string            cli flag configuration file (default "$HOME/.config/pdtm/config.yaml")
   -bp, -binary-path string  custom location to download project binary (default "$HOME/.pdtm/go/bin")

INSTALL:
   -i, -install string[]  install single or multiple project by name (comma separated)
   -ia, -install-all      install all the projects
   -ip, -install-path     append path to PATH environment variables

UPDATE:
   -u, -update string[]         update single or multiple project by name (comma separated)
   -ua, -update-all             update all the projects
   -up, -self-update            update pdtm to latest version
   -duc, -disable-update-check  disable automatic pdtm update check

REMOVE:
   -r, -remove string[]  remove single or multiple project by name (comma separated)
   -ra, -remove-all      remove all the projects
   -rp, -remove-path     remove path from PATH environment variables

DEBUG:
   -sp, -show-path          show the current binary path then exit
   -version                 show version of the project
   -v, -verbose             show verbose output
   -nc, -no-color           disable output content coloring (ANSI escape codes)
   -disable-changelog, -dc  disable release changelog in output

Running pdtm

$ pdtm -install-all
                ____          
     ____  ____/ / /_____ ___ 
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/ 
 /_/                          v0.0.1

      projectdiscovery.io

[INF] Installed httpx v1.1.1
[INF] Installed nuclei v2.6.3
[INF] Installed naabu v2.6.3
[INF] Installed dnsx v2.6.3

Todo

  • support for go setup + project install from source
  • support for installing from source as fallback option

pdtm is made with ❤️ by the projectdiscovery team and distributed under MIT License.

Join Discord

pdtm's People

Contributors

dependabot[bot] avatar dogancanbakir avatar edoardottt avatar ehsandeep avatar mzack9999 avatar ramanareddy0m avatar shubhamrasal avatar tarunkoyalwar avatar xm1k3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdtm's Issues

pdtm does not corectly recognize installed tools

pdtm version: v0.0.6 (latest)

Current Behavior:

I installed some ProjectDiscovery tools by placing their binary files in /usr/local/bin/. However, when I run the pdtm command, it does not recognize that these tools are installed.

Expected Behavior:

In my opinion, a better way to check if a tool is installed is to run the tool itself, for example, running subfinder -version to verify if Subfinder is installed.

Steps To Reproduce:

Example: steps to reproduce the behavior:

  1. Download pdtm v0.0.6 and run it on Ubuntu 22.04.
  2. An incorrect result as follows:
    image

.bashrc formatted in a bad way

I've executed these commands:

> pdtm
> cat ~/.bashrc
...
}# Generated for pdtm. Do not edit.
export PATH=/home/edoardottt/.pdtm/go/bin:$PATH


> source ~/.bashrc
bash: /home/edoardottt/.bashrc: line 246: syntax error: unexpected end of file

pdtm version: 0.0.1

OS:

> uname -a
Linux edoardottt 5.19.0-29-generic #30-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 4 12:14:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Go: go version go1.19.4 linux/amd64

CLI enhancement and validation

Please describe your feature request:

  • Adding OS, ARCH, GO version info on default run
  • Adding binary download path information in CLI output
  • Adding not supported error for projects when asset info is not returned from API for specific OS/ARCH
  • Adding -nc / no-color option support
  • Adding error / validation for invalid input, ex: pdtm -i adsasdsa

Example for above changes -

./pdtm

                ____          
     ____  ____/ / /_____ ___ 
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/ 
 /_/                          0.0.1

		projectdiscovery.io

[INF] [OS: DARWIN] [ARCH: ARM64] [GO: 1.19.3]
[INF] Default path to download project binary: $HOME/.pdtm/go/bin
[INF] Available opensource projects to download

1. subfinder (installed - outdated)
2. dnsx (installed - latest)
3. naabu (not installed)
4. uncover (not supported)

Note: not supported error can be displayed in orange color.

pdtm client improvements

  • fallback local cache support upon api unavailability
  • using the source as a constant instead of CLI flag
  • whitelist pdtm client from remove-all option

Tools Requirements

Please describe your feature request:

A few tools might have requirements (shared libraries/file permissions - ref https://github.com/projectdiscovery/pdtm-api/issues/3)

Describe the use case of this feature:

The user should be warned of missing dependencies and/or suggested the command to run to fix the issue (eg. apt/brew install lipbcap-dev)

Error to install binaries on Linux AMD64.

pdtm version: 0.0.1

Current Behavior: Trying to install uncover for Linux AMD64 using the command

./pdtm -i uncover

Getting error as

[INF] installing uncover...
[ERR] error while installing uncover: could not find release asset for your platform (linux/amd64)

Expected Behavior:

The utility should have installed.

Steps To Reproduce:

./pdtm -i uncover

Anything else:

Tried installing via

./pdtm -ia

Few of the binaries are not installed

[INF] subfinder: already installed
[INF] installing dnsx...
[ERR] error while installing dnsx: could not find release asset for your platform (linux/amd64)
[INF] naabu: already installed
[INF] httpx: already installed
[INF] nuclei: already installed
[INF] installing uncover...
[ERR] error while installing uncover: could not find release asset for your platform (linux/amd64)
[INF] installing cloudlist...
[INF] installed cloudlist 1.0.1(latest)
[INF] proxify: already installed
[INF] installing tlsx...
[INF] installed tlsx 0.0.1(latest)
[INF] installing notify...
[ERR] error while installing notify: could not find release asset for your platform (linux/amd64)
[INF] installing chaos-client...
[ERR] error while installing chaos-client: could not find release asset for your platform (linux/amd64)
[INF] installing shuffledns...
[ERR] error while installing shuffledns: could not find release asset for your platform (linux/amd64)
[INF] mapcidr: already installed
[INF] interactsh-server: already installed
[INF] installing interactsh-client...
[ERR] error while installing interactsh-client: could not find release asset for your platform (linux/amd64)

[Go 1.21.1] _cgo_pthread_key_created is missing on Ubuntu WSL

pdtm version:

Latest

Current Behavior:

Error while running pdtm --help

striker@EUREKA:~$ go version
go version go1.21.1 linux/amd64
striker@EUREKA:~$ pdtm --help
fatal error: _cgo_pthread_key_created missing

goroutine 1 [running, locked to thread]:
runtime.throw({0xf0a07d?, 0x0?})
        /usr/local/go/src/runtime/panic.go:1077 +0x5c fp=0xc000086740 sp=0xc000086710 pc=0x438edc
runtime.main()
        /usr/local/go/src/runtime/proc.go:213 +0x409 fp=0xc0000867e0 sp=0xc000086740 pc=0x43ba09
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0000867e8 sp=0xc0000867e0 pc=0x46b301

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc000086fa8 sp=0xc000086f88 pc=0x43bd0e
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:404
runtime.forcegchelper()
        /usr/local/go/src/runtime/proc.go:322 +0xb3 fp=0xc000086fe0 sp=0xc000086fa8 pc=0x43bb93
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc000086fe8 sp=0xc000086fe0 pc=0x46b301
created by runtime.init.6 in goroutine 1
        /usr/local/go/src/runtime/proc.go:310 +0x1a

goroutine 3 [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc000087778 sp=0xc000087758 pc=0x43bd0e
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:404
runtime.bgsweep(0x0?)
        /usr/local/go/src/runtime/mgcsweep.go:280 +0x94 fp=0xc0000877c8 sp=0xc000087778 pc=0x427c94
runtime.gcenable.func1()
        /usr/local/go/src/runtime/mgc.go:200 +0x25 fp=0xc0000877e0 sp=0xc0000877c8 pc=0x41ce25
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0000877e8 sp=0xc0000877e0 pc=0x46b301
created by runtime.gcenable in goroutine 1
        /usr/local/go/src/runtime/mgc.go:200 +0x66

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc0000ae000?, 0x10fd6d8?, 0x1?, 0x0?, 0xc0000071e0?)
        /usr/local/go/src/runtime/proc.go:398 +0xce fp=0xc000087f70 sp=0xc000087f50 pc=0x43bd0e
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:404
runtime.(*scavengerState).park(0x1729a60)
        /usr/local/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000087fa0 sp=0xc000087f70 pc=0x425529
runtime.bgscavenge(0x0?)
        /usr/local/go/src/runtime/mgcscavenge.go:653 +0x3c fp=0xc000087fc8 sp=0xc000087fa0 pc=0x425abc
runtime.gcenable.func2()
        /usr/local/go/src/runtime/mgc.go:201 +0x25 fp=0xc000087fe0 sp=0xc000087fc8 pc=0x41cdc5
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc000087fe8 sp=0xc000087fe0 pc=0x46b301
created by runtime.gcenable in goroutine 1
        /usr/local/go/src/runtime/mgc.go:201 +0xa5

Expected Behavior:

Can list out the content of pftm --help command

Steps To Reproduce:

  1. Install Go 1.21.1 in Ubuntu WSL, I follow the steps from https://go.dev/doc/install for Linux machines
  2. Install PDTM via go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
  3. Run pdtm --help

interactsh-server shouldn't be part of installed tools

pdtm version:

main|dev

Current Behavior:

interactsh-server is installed as part of the toolset, but it's a server side application which requires particular DNS configuration to work properly, it doesn't make a lot of sense to be installed by default on the system.

Not showing installed tools

pdtm version:

0.0.8

Current Behavior:

  • The 0.0.8 version does not list already installed tools

Steps To Reproduce:

  1. Run pdtm
  2. See the list of tools and its status.

image

fish shell support request

Please describe your feature request:

Add fish shell support in pdtm.

Describe the use case of this feature:

pdtm unable to set $PATH env variables automatically in the fish shell:

⋊> ~/g/bin pdtm

                ____
     ____  ____/ / /_____ ___
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/
 /_/

		projectdiscovery.io

[INF] Current pdtm version v0.0.5 (latest)
[FTL] Could not run pdtm: [:RUNTIME] Failed to set path: /Users/xxx/.pdtm/go/bin. Add it to $PATH and run again <- [:RUNTIME] add /Users/xxx/.pdtm/go/bin to $PATH env <- shell not supported

current version: v0.0.5
go version: 1.20.2

I tried to add ~/.pdtm/go/bin into the $PATH manual and got the same result:

⋊> ~/g/bin cat ~/.config/fish/conf.d/pdtm.fish
fish_add_path ~/go/bin
fish_add_path ~/.pdtm/go/bin

Updating when an asset isn't available causes an uninstall

pdtm version:

v0.0.7

Current Behavior:

Currently there is an issue with cdncheck's latest release not having any assets available (see projectdiscovery/cdncheck#103).

In this state, PDTM knows that there is an update available for cdncheck, but when it goes to do an update, it deletes cdncheck and then cannot get the latest asset and thus leaves you without the tool after the "update"

CleanShot 2023-05-25 at 15 14 39@2x CleanShot 2023-05-25 at 15 16 30@2x CleanShot 2023-05-25 at 15 16 39

Expected Behavior:

When the update isn't actually available, leave the system in the same state instead of removing the tool. This could mean that a GitHub downtime or similar odd problem could screw up a lot of folks tools.

Steps To Reproduce:

  • Install cdncheck into the pdtm bin
    • To do this after mine was broken I did this
    • wget https://github.com/projectdiscovery/cdncheck/releases/download/v1.0.3/cdncheck_1.0.3_linux_amd64.zip
    • unzip cdncheck_1.0.3_linux_amd64.zip
    • mv ./cdncheck ~/.pdtm/go/bin/
  • which cdncheck returns /home/kali/.pdtm/go/bin/cdncheck
  • Observe the need for an update with pdtm
    • 21. cdncheck (outdated) (1.0.3) ➡ (1.0.5)
  • Run pdtm -update-all
  • Observe the error above
  • which cdncheck returns cdncheck not found
  • cdncheck is now no longer in /home/kali/.pdtm
CleanShot 2023-05-25 at 15 21 13@2x

Anything else:

Core refactor to ease auto-update shared logic

Please describe your feature request:

Most of the logic of pdtm is generic enough to be abstracted and moved into independent packages under projectdiscovery/utils. pdtm is itself another package that needs to be kept up to date, so it should be exposed as well via api, and can benefit of the generic agnostic logic implemented at projectdiscovery/goflags#103).
A package for updating tools must be able to self-update.

Describe the use case of this feature:

Facilitate self-update aware functionality via goflags

update option should only update outdated projects (not install not found one)

I expected that -ua would only update installed tools but this is not the case:

❯ pdtm -ua

                ____
     ____  ____/ / /_____ ___
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/
 /_/                          v0.0.1

		projectdiscovery.io

[INF] subfinder: already up to date
[INF] dnsx: not found
[INF] installing dnsx...
[INF] installed dnsx 1.1.1(latest)

Does not properly check latest version.

pdtm version:

Current Version: v0.0.3

Current Behavior:

Does not properly check the latest version.

Expected Behavior:

Check the latest version, and set old binary to outdated.

Steps To Reproduce:

  1. Run 'pdtm'
  2. Output -> httpx (latest) (1.2.6)
    | But the latest version is: (1.2.7)

Anything else:

Screenshot

issue

Windows compatibility issue

pdtm version:

main/dev

Current Behavior:

Currently, setting up with path variables is supported for Linux env and not on windows.

[INF] Please run `source ~/.zshrc` or reload terminal to add /Users/geekboy/.projectdiscovery to $PATH 

Expected Behavior:

Support for windows eenvironment.

Steps To Reproduce:

  • Install pdtm on windows
  • try to add path variables $HOME/.projectdiscovery

Align output colors for all tools

Now:

  1. Only for pdtm the color is BrightGreen, while for all the others Green.
  2. Parentheses are colored as well

Then:

  1. All the tools versions colored using BrightGreen
  2. Parentheses not colored, just version string and number

Output the currently installed versions

Please describe your feature request:

Add a flag to print the currently installed versions of all the tools

Describe the use case of this feature:

Maybe I just want to check which tools are installed / which versions of the tools before deciding to install a new one / install all

Cannot install naabu

pdtm version:

v0.0.3

Current Behavior:

Unable to install naabu on linux/amd64 with PDTM

Expected Behavior:

Installs correctly

Steps To Reproduce:

  1. On a linux/amd64 system, run pdtm -i naabu
  2. Get the error
[ERR] error while installing naabu: could not find release asset for your platform (linux/amd64)

Anything else:

CleanShot 2023-03-01 at 09 57 47@2x

error msg even after successful update

pdtm version:

latest

Current Behavior:

pdtm -u interactsh-server
[INF] updating interactsh-server...
[updater] failed to download latest release got [:RUNTIME] repo projectdiscovery/interactsh-server not found got %!v(MISSING) <- GET https://api.github.com/repos/projectdiscovery/interactsh-server/releases/latest: 404 Not Found []

Note:

even if the error indicates the update got failed, but tool actually gets updated and can be reflected by running the tool or running pdtm again which will list latest version of project installed.

Expected Behavior:

update with successful msg.

Steps To Reproduce:

  • pdtm -ua

version number is not displayed for nuclei

pdtm version:

main

Current Behavior:

$ pdtm

                ____          
     ____  ____/ / /_____ ___ 
    / __ \/ __  / __/ __ __  \
   / /_/ / /_/ / /_/ / / / / /
  / .___/\__,_/\__/_/ /_/ /_/ 
 /_/                         

		projectdiscovery.io

[INF] Current pdtm version v0.0.6 (latest)
[INF] [OS: DARWIN] [ARCH: ARM64] [GO: 1.19.8]
[INF] Path to download project binary: /Users/geekboy/.pdtm/go/bin
[INF] Path /Users/geekboy/.pdtm/go/bin configured in environment variable $PATH
1. aix (latest) (0.0.1)
2. subfinder (latest) (2.5.7)
3. dnsx (latest) (1.1.3)
4. naabu (latest) (2.1.5)
5. httpx (latest) (1.3.0)
+ 6. nuclei 
7. uncover (latest) (1.0.3)
8. cloudlist (latest) (1.0.3)
9. proxify (latest) (0.0.9)
10. tlsx (latest) (1.0.8)
11. notify (latest) (1.0.4)
12. chaos-client (latest) (0.5.1)
13. shuffledns (latest) (1.0.8)
14. mapcidr (latest) (1.1.1)
15. interactsh-client (latest) (1.1.2)
16. interactsh-server (latest) (1.1.2)
17. katana (latest) (1.0.1)
18. pdtm (latest) (0.0.6)
19. asnmap (latest) (1.0.3)
20. alterx (latest) (0.0.1)
21. cdncheck (latest) (1.0.0)
22. simplehttpserver (latest) (0.0.6)

Expected Behavior:

list with version display

Steps To Reproduce:

pdtm

Anything else:

Doesn't appear to work with interactsh

pdtm version:

v0.0.1

Current Behavior:

When running on linux/amd64, you get these errors when running -install-all

[INF] installing interactsh-server...
[ERR] error while installing interactsh-server: could not find release asset for your platform (linux/amd64)
[INF] installing interactsh-client...
[ERR] error while installing interactsh-client: could not find release asset for your platform (linux/amd64)

Expected Behavior:

Installs interactsh-server and -client

Steps To Reproduce:

  1. Install pdtm on a machine with linux/amd64 architecture
  2. Run pdtm -install-all
  3. Observe behavior.

Anything else:

My theory looking at the code is that it's because the linux for both interact-client and interact-server has a capital L in the asset name.

Making the checks for this case-insensitive or re-realeasing those two packages to conform to the formatting the rest of the tools follow should solve this issue.

error while installing cdncheck

pdtm version:

$ pdtm --version
[INF] Current Version: v0.0.6

Current Behavior:

Hello,

An error occurs when installing cdncheck.

Thanks.

Steps To Reproduce:

pdtm -install-all

....
...
[INF] installing cdncheck...
[ERR] error while installing cdncheck: could not find release asset for your platform (linux/amd64)

image

Auto update

Please describe your feature request:

Auto-update feature as an option to enable/disable automatic updates of the tools installed on the system.

Describe the use case of this feature:

With the Auto-update feature, pdtm can automatically update the PD tools with the latest updates and enhancements. Users no longer have to keep looking for recent updates constantly. This might be a problem for specific scenarios, like when there is a breaking change. The auto-update feature can only be allowed for a subset of tools that won't cause a problem. That's something we need to decide.

Auto-update can have a time option for the update time, like non-working hours, etc.

Blank installed information on MacOS

pdtm version:

main

Current Behavior:

pdtm

1. subfinder (installed - latest)
2. dnsx (installed - latest)
3. naabu (not installed)
4. httpx (installed - latest)
5. nuclei (installed - latest)
6. uncover (installed - latest)
7. cloudlist (installed - latest)
8. proxify (installed - latest)
- 9. tlsx ()
10. notify (installed - latest)
11. chaos-client (installed - latest)
12. shuffledns (installed - latest)
13. mapcidr (installed - outdated)
14. interactsh-server (installed - latest)
15. interactsh-client (installed - latest)

Expected Behavior:

pdtm

1. subfinder (installed - latest)
2. dnsx (installed - latest)
3. naabu (not installed)
4. httpx (installed - latest)
5. nuclei (installed - latest)
6. uncover (installed - latest)
7. cloudlist (installed - latest)
8. proxify (installed - latest)
+ 9. tlsx (installed - latest)
10. notify (installed - latest)
11. chaos-client (installed - latest)
12. shuffledns (installed - latest)
13. mapcidr (installed - outdated)
14. interactsh-server (installed - latest)
15. interactsh-client (installed - latest)

Steps To Reproduce:

  • Install and run pdtm on MacOS

add tool description in help

pdtm version:

v0.0.2

Current Behavior:

  • pdtm help (i.e pdtm -h) is missing tool description
$ pdtm -h


Usage:
  pdtm [flags]
...

Expected Behavior:

Example

$ katana -h
Katana is a fast crawler focused on execution in automation
pipelines offering both headless and non-headless crawling.

Usage:
  katana [flags]
...

Steps To Reproduce:

Anything else:

Fix latest string in new installed tools

pdtm version: v0.0.5

Current Behavior:

[INF] naabu: installed v1.0.3(latest)

(latest is not colored)

Expected Behavior:

[INF] naabu: installed v1.0.3 (latest)

(latest is green)

Steps To Reproduce:

  1. Run pdtm -ia
  2. See output

Anything else:

Using self-hosted API instead of GitHub for version check

  • Currently tools.json file is used.
Available ProjectDiscovery FOSS Tools

[ERR] error trying to fetch latest version of available tool(nuclei): GET https://api.github.com/repos/projectdiscovery/nuclei/releases?per_page=1: 403 API rate limit exceeded for 103.59.75.169. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 8m42s]
[FTL] Could not run pdtm: GET https://api.github.com/repos/projectdiscovery/nuclei/releases?per_page=1: 403 API rate limit exceeded for 103.59.75.169. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 8m42s]

Example project: https://github.com/projectdiscovery/nuclei-updatecheck-api

Add support for pre/post hooks instructions

Please describe your feature request:

After/Before installing each tool it would be useful to add the capability to pre/post execute some instructions (eg. to check for dependencies or correct installation, for example tool -healthcheck). Additionally this might also address auto-installing dependencies (eg. #44)

Add ability to install & update nuclei templates

Please describe your feature request:

Not sure if we want this to be in scope, but a cool idea might be having PDTM install/update the default nuclei templates. Maybe even with just using nuclei -ut?

Describe the use case of this feature:

Maintenance Tasks

Please describe your feature request:

  • Bump go to 1.18
  • Execute go mod tidy
  • Resolve lint errors (eg. deprecated ioutil)
  • Create dev branch as a copy of current master/main
  • Ensure dependantbot is correctly configured (points to dev branch and add Maintenance label)
  • Replace deprecated github.com/projectdiscovery/xxxutils with xxxutils /projectdiscovery/utils/xxxx in imports

add github action

add github action script that will auto add all binary to pdtm main . and use cron for update binary files regualrly for fast clone . it is hard to wait for fully install all tools so you can add binary for fast clone for disposable linux user

Env Path variable modification should be optional

pdtm version:

dev|main

Current Behavior:

Env path variable change is an invasive change and the behavior should be changed as follows:

  • It should be optional and never performed automatically without specific bypass flag or user authorization (eg. entire package management software like homebrew leave the path change as a manual step)
  • It should be reversible upon tools removal
  • It should be just another step in the setup process, for example:
$ go run .
[INF] [OS: LINUX] [ARCH: AMD64] [GO: 1.18.1]
[INF] Path to download project binary: /root/.pdtm/go/bin

- environment path (configured|not configured)

1. subfinder (not installed)
...

pdtm should require at least go1.19 for secure path handling

pdtm version:

main|dev

Current Behavior:

  • exec.LookPath might return a wrong path relative to the current directory, leading to erroneous file deletion/overwrite
  • exec.Command for the same reason might execute the wrong binary

Expected Behavior:

The only paths to consider should be the default one or those present in the PATH environment variable (standard Behavior of go1.19)

Add Helper Function that returns callback of given tool

Proposed Changes

// returns a callback function and when it is executed returns a version string of that tool
func GetVersionCheckCallback(toolName string) func() string    { xxx }

// returns a callback function when executed  updates that tool
func GetUpdaterCallback(toolName string) func() {xxx }

Note:

callback functions should not implement any new logic and are only meant to use current logic of pdtm (context: installation , env setup etc)

go install support as fallback

Please describe your feature request:

Add support for go install as fallback support to install when release binary is not available to download.

This also involves

  • go path setup (if misconfigured)
  • go setup / install (if not available)

Describe the use case of this feature:

  • additional install option for tools when binary is not available.

pdtm corrupts packages manager on tools removal

pdtm version:

main|dev

Current Behavior:

If a tool is already installed in a system directory via apt|snap|brew pdtm just removes it after performing an exec.LookPath, leading to package manager security warnings and blocking system updates due to package corruption.

Expected Behavior:

Only binaries installed previously in the specified path should be removed

Steps To Reproduce:

# ls /usr/bin/mapcidr
/usr/bin/mapcidr
# pdtm -bp /tmp/ -ra
...
[INF] removing mapcidr...
[INF] removed mapcidr
...
# mapcidr
bash: /usr/bin/mapcidr: No such file or directory
# snap refresh
sh: 1: /usr/bin/mapcidr: not found
# snap remove mapcidr
sh: 1: /usr/bin/mapcidr: not found

Notes: not yet verified but also install, update and execution should be verified for potential similar errors

display changelog with update option

Please describe your feature request:

Similar to $project -update option, we can display changelog information with pdtm -update or -update-all option as well.

   -dc, -disable-changelog     disable release changelog in output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.