Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Checksum File Parsing Fails Due to Missing Delimiters in (*TemplateManager).writeChecksumFileInDir #5999

Open
1 task done
dwisiswant0 opened this issue Jan 21, 2025 · 0 comments · May be fixed by #5998
Open
1 task done
Assignees
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@dwisiswant0
Copy link
Member

dwisiswant0 commented Jan 21, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

Current Behavior

When the .checksum file exists in the templates directory, the (*TemplateManager).getChecksumFromDir method fails because the .checksum file lacks delimiters. As a result, the method always returns an empty map.

Expected Behavior

The .checksum file should include the necessary delimiters when written by (*TemplateManager).writeChecksumFileInDir. This would ensure that (*TemplateManager).getChecksumFromDir can properly parse the file and return the correct map of checksums.

Steps To Reproduce

Assume the templates directory is located at /tmp/nuclei-templates, and you are behind a few versions, e.g., v10.0.0 (also modify ~/.config/nuclei/.templates-config.json), while the latest version is v10.1.1.

$ cd /tmp
$ rm -rf nuclei-templates/
$ mkdir nuclei-templates/
$ wget https://github.com/projectdiscovery/nuclei-templates/archive/refs/tags/v10.0.0.zip
$ unzip v10.0.0.zip
$ cp -r ./nuclei-templates-10.0.0/*/* ./nuclei-templates
$ go run cmd/nuclei/main.go -ut

Relevant log output

This will show summary stats indicating that everything is "removed" because it failed to read the checksums.

Environment

- OS: Ubuntu 22.04 LTS
- Nuclei: v3.3.8
- Go:

Anything else?

No response

@dwisiswant0 dwisiswant0 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jan 21, 2025
@dwisiswant0 dwisiswant0 self-assigned this Jan 21, 2025
@dwisiswant0 dwisiswant0 linked a pull request Jan 21, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant