Skip to content

Commit

Permalink
Merge pull request #522 from hahwul/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
hahwul committed Jan 28, 2024
2 parents eeda86c + 25dbbc3 commit 3fc6a4b
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<h1 align="center">
<div align="center">
<br>
<a href=""><img src="https://user-images.githubusercontent.com/13212227/120111054-49ffc780-c1ab-11eb-974e-e198d53ddb48.png" alt="" width="300px;"></a>
<br>🌙🦊=XSS<br>
</h1>
<img src="https://github.com/hahwul/dalfox/assets/13212227/38f4e2e4-baa4-4bcd-8e71-3d1bf01ade8c" alt="dalfox" width="400px;">
</div>
<p align="center">
<a href="https://github.com/hahwul/dalfox/actions/workflows/go.yml"><img src="https://github.com/hahwul/dalfox/actions/workflows/go.yml/badge.svg"></a>
<a href=""><img src="https://api.codacy.com/project/badge/Grade/17cac7b8d1e849a688577f2bbdd6ecd0"></a>
<a href="https://goreportcard.com/report/github.com/hahwul/dalfox"><img src="https://goreportcard.com/badge/github.com/hahwul/dalfox"></a>
<a href="https://codecov.io/gh/hahwul/dalfox"><img src="https://codecov.io/gh/hahwul/dalfox/branch/main/graph/badge.svg"/></a>
<a href="https://twitter.com/intent/follow?screen_name=hahwul"><img src="https://img.shields.io/twitter/follow/hahwul?style=flat&logo=twitter"></a>
<a href="https://twitter.com/intent/follow?screen_name=hahwul"><img src="https://img.shields.io/twitter/follow/hahwul?style=flat&logo=x"></a>
<a href=""><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"></a>
</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: DalFox
description: Parameter Analysis and XSS Scanning tool based on golang
description: Dalfox is a powerful open-source XSS scanner and utility focused on automation.
lang: en-US

baseurl: "" # the subpath of your site, e.g. /blog/
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/topnav.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ site.baseurl }}/">
<span><img src="{{ "/assets/img/logonav.png" | relative_url }}" alt="Logo"></span>
<span><img src="{{ "/assets/img/logonav.png" | relative_url }}" alt="Logo"> DALFOX</span>
</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
Expand Down
Binary file modified docs/assets/img/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/img/logonav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<div class="header-container jumbotron">
<div class="container">
<h1>🌙🦊 = XSS</h1>
<p>Powerful open source XSS scanning tool and parameter analyzer, utility</p><br><br><br><br>
<p><a class="btn btn-primary btn-lg" href="{{ "/docs/home/" | relative_url }}" role="button">Learn more</a></p>
<p>Dalfox is a powerful open-source XSS scanner and utility focused on automation.</p><br><br><br><br>
<p><a class="btn btn-primary btn-lg" href="{{ "/docs/installation/" | relative_url }}" role="button">Install</a></p>
</div>
</div>

Expand Down
29 changes: 15 additions & 14 deletions pkg/optimization/optimization.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"bufio"
"bytes"
"fmt"
"github.com/hahwul/dalfox/v2/pkg/har"
"html/template"
"net/http"
"net/url"
"os"
"strings"

"github.com/hahwul/dalfox/v2/pkg/har"

"github.com/hahwul/dalfox/v2/pkg/model"
)

Expand All @@ -19,30 +20,30 @@ func GenerateNewRequest(url, body string, options model.Options) *http.Request {
req, _ := http.NewRequest("GET", url, nil)
req = har.AddMessageIDToRequest(req)
// Add the Accept header like browsers do.
req.Header.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
req.Header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")

if options.Data != "" {
d := []byte(body)
req, _ = http.NewRequest("POST", url, bytes.NewBuffer(d))
req = har.AddMessageIDToRequest(req)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
}

if len(options.Header) > 0 {
for _, v := range options.Header {
h := strings.Split(v, ": ")
if len(h) > 1 {
req.Header.Add(h[0], h[1])
req.Header.Set(h[0], h[1])
}
}
}
if options.Cookie != "" {
req.Header.Add("Cookie", options.Cookie)
req.Header.Set("Cookie", options.Cookie)
}
if options.UserAgent != "" {
req.Header.Add("User-Agent", options.UserAgent)
req.Header.Set("User-Agent", options.UserAgent)
} else {
req.Header.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0")
req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0")
}
if options.Method != "" {
req.Method = options.Method
Expand All @@ -60,7 +61,7 @@ func GenerateNewRequest(url, body string, options model.Options) *http.Request {
fmt.Println(err)
os.Exit(1)
} else {
req.Header.Add("Cookie", GetRawCookie(rq.Cookies()))
req.Header.Set("Cookie", GetRawCookie(rq.Cookies()))
}
}
}
Expand Down Expand Up @@ -89,30 +90,30 @@ func MakeHeaderQuery(target, hn, hv string, options model.Options) (*http.Reques
d := []byte("")
req, _ = http.NewRequest("POST", target, bytes.NewBuffer(d))
req = har.AddMessageIDToRequest(req)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
}

if len(options.Header) > 0 {
for _, v := range options.Header {
h := strings.Split(v, ": ")
if len(h) > 1 {
req.Header.Add(h[0], h[1])
req.Header.Set(h[0], h[1])
}
}
}

if options.Cookie != "" {
req.Header.Add("Cookie", options.Cookie)
req.Header.Set("Cookie", options.Cookie)
}
if options.UserAgent != "" {
req.Header.Add("User-Agent", options.UserAgent)
req.Header.Set("User-Agent", options.UserAgent)
} else {
req.Header.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0")
req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0")
}
if options.Method != "" {
req.Method = options.Method
}
req.Header.Add(hn, hv)
req.Header.Set(hn, hv)
return req, tempMap
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/printing/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package printing

// VERSION is version of dalfox
const VERSION = "v2.9.1"
const VERSION = "v2.9.2"

0 comments on commit 3fc6a4b

Please sign in to comment.