mirror of https://github.com/daffainfo/nuclei.git
Merge branch 'dev' of https://github.com/projectdiscovery/nuclei into disk-cleanup
commit
9490146db9
|
@ -9,26 +9,30 @@ jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Git Checkout
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
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
|
uses: docker/setup-qemu-action@v1
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
-
|
|
||||||
name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
-
|
|
||||||
name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm
|
platforms: linux/amd64,linux/arm64,linux/arm
|
||||||
push: true
|
push: true
|
||||||
tags: projectdiscovery/nuclei:latest
|
tags: projectdiscovery/nuclei:latest,projectdiscovery/nuclei:${{ steps.meta.outputs.tag }}
|
|
@ -45,7 +45,7 @@ We have a [dedicated repository](https://github.com/projectdiscovery/nuclei-temp
|
||||||
# Install Nuclei
|
# Install Nuclei
|
||||||
|
|
||||||
```sh
|
```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/).**
|
**More installation [methods can be found here](https://nuclei.projectdiscovery.io/nuclei/get-started/).**
|
||||||
|
|
|
@ -25,7 +25,7 @@ type Config struct {
|
||||||
const nucleiConfigFilename = ".templates-config.json"
|
const nucleiConfigFilename = ".templates-config.json"
|
||||||
|
|
||||||
// Version is the current version of nuclei
|
// Version is the current version of nuclei
|
||||||
const Version = `2.5.2`
|
const Version = `2.5.3-dev`
|
||||||
|
|
||||||
func getConfigDetails() (string, error) {
|
func getConfigDetails() (string, error) {
|
||||||
homeDir, err := os.UserHomeDir()
|
homeDir, err := os.UserHomeDir()
|
||||||
|
|
|
@ -128,6 +128,14 @@ func (r *Request) Make(domain string) (*dns.Msg, error) {
|
||||||
q.Qclass = r.class
|
q.Qclass = r.class
|
||||||
q.Qtype = r.question
|
q.Qtype = r.question
|
||||||
req.Question = append(req.Question, q)
|
req.Question = append(req.Question, q)
|
||||||
|
|
||||||
|
req.SetEdns0(4096, false)
|
||||||
|
|
||||||
|
switch r.question {
|
||||||
|
case dns.TypeTXT:
|
||||||
|
req.AuthenticatedData = true
|
||||||
|
}
|
||||||
|
|
||||||
return req, nil
|
return req, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,6 @@ func Parse(request, baseURL string, unsafe bool) (*Request, error) {
|
||||||
Headers: make(map[string]string),
|
Headers: make(map[string]string),
|
||||||
}
|
}
|
||||||
if unsafe {
|
if unsafe {
|
||||||
request = strings.ReplaceAll(request, "\\0", "\x00")
|
|
||||||
request = strings.ReplaceAll(request, "\\r", "\r")
|
|
||||||
request = strings.ReplaceAll(request, "\\n", "\n")
|
|
||||||
rawRequest.UnsafeRawBytes = []byte(request)
|
rawRequest.UnsafeRawBytes = []byte(request)
|
||||||
}
|
}
|
||||||
reader := bufio.NewReader(strings.NewReader(request))
|
reader := bufio.NewReader(strings.NewReader(request))
|
||||||
|
|
|
@ -45,6 +45,11 @@ func (i *Exporter) Export(event *output.ResultEvent) error {
|
||||||
filenameBuilder.WriteString(event.TemplateID)
|
filenameBuilder.WriteString(event.TemplateID)
|
||||||
filenameBuilder.WriteString("-")
|
filenameBuilder.WriteString("-")
|
||||||
filenameBuilder.WriteString(strings.ReplaceAll(strings.ReplaceAll(event.Matched, "/", "_"), ":", "_"))
|
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")
|
filenameBuilder.WriteString(".md")
|
||||||
finalFilename := sanitizeFilename(filenameBuilder.String())
|
finalFilename := sanitizeFilename(filenameBuilder.String())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue