Merge branch 'dev' of https://github.com/projectdiscovery/nuclei into disk-cleanup

dev
sandeep 2021-09-26 18:08:15 +05:30
commit 9490146db9
6 changed files with 30 additions and 16 deletions

View File

@ -9,26 +9,30 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Git Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
- name: Get Github tag
id: meta
run: |
echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/projectdiscovery/nuclei/releases/latest" | jq -r .tag_name)"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm
push: true
tags: projectdiscovery/nuclei:latest
tags: projectdiscovery/nuclei:latest,projectdiscovery/nuclei:${{ steps.meta.outputs.tag }}

View File

@ -45,7 +45,7 @@ We have a [dedicated repository](https://github.com/projectdiscovery/nuclei-temp
# Install Nuclei
```sh
GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei
go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
```
**More installation [methods can be found here](https://nuclei.projectdiscovery.io/nuclei/get-started/).**

View File

@ -25,7 +25,7 @@ type Config struct {
const nucleiConfigFilename = ".templates-config.json"
// Version is the current version of nuclei
const Version = `2.5.2`
const Version = `2.5.3-dev`
func getConfigDetails() (string, error) {
homeDir, err := os.UserHomeDir()

View File

@ -128,6 +128,14 @@ func (r *Request) Make(domain string) (*dns.Msg, error) {
q.Qclass = r.class
q.Qtype = r.question
req.Question = append(req.Question, q)
req.SetEdns0(4096, false)
switch r.question {
case dns.TypeTXT:
req.AuthenticatedData = true
}
return req, nil
}

View File

@ -28,9 +28,6 @@ func Parse(request, baseURL string, unsafe bool) (*Request, error) {
Headers: make(map[string]string),
}
if unsafe {
request = strings.ReplaceAll(request, "\\0", "\x00")
request = strings.ReplaceAll(request, "\\r", "\r")
request = strings.ReplaceAll(request, "\\n", "\n")
rawRequest.UnsafeRawBytes = []byte(request)
}
reader := bufio.NewReader(strings.NewReader(request))

View File

@ -45,6 +45,11 @@ func (i *Exporter) Export(event *output.ResultEvent) error {
filenameBuilder.WriteString(event.TemplateID)
filenameBuilder.WriteString("-")
filenameBuilder.WriteString(strings.ReplaceAll(strings.ReplaceAll(event.Matched, "/", "_"), ":", "_"))
if event.MatcherName != "" {
filenameBuilder.WriteString(event.MatcherName)
} else if event.ExtractorName != "" {
filenameBuilder.WriteString(event.ExtractorName)
}
filenameBuilder.WriteString(".md")
finalFilename := sanitizeFilename(filenameBuilder.String())