Skip to content

Commit dc14f98

Browse files
committed
Small improve to allow proxy can be apply in chrome headless
1 parent 66b4635 commit dc14f98

File tree

6 files changed

+491
-163
lines changed

6 files changed

+491
-163
lines changed

.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
99
liberapay: # Replace with a single Liberapay username
1010
issuehunt: # Replace with a single IssueHunt username
1111
otechie: # Replace with a single Otechie username
12-
custom: [ 'https://paypal.me/j3ssiejjj' ]
12+
custom: [ 'https://paypal.me/j3ssiejjj', 'https://www.buymeacoffee.com/j3ssie' ]

core/output.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package core
22

33
import (
4-
"crypto/sha1"
54
"fmt"
65
"github.com/fatih/color"
76
"github.com/jaeles-project/jaeles/libs"
@@ -142,9 +141,10 @@ func (r *Record) StoreOutput() {
142141
}
143142

144143
// hash the content
145-
h := sha1.New()
146-
h.Write([]byte(content))
147-
checksum := h.Sum(nil)
144+
checksum := utils.GenHash(r.Response.Body)
145+
if r.Response.Body == "" {
146+
checksum = utils.GenHash(r.Response.Beautify)
147+
}
148148

149149
parts := []string{r.Opt.Output}
150150
if r.Request.URL == "" {
@@ -160,7 +160,7 @@ func (r *Record) StoreOutput() {
160160
}
161161
parts = append(parts, host)
162162
}
163-
parts = append(parts, fmt.Sprintf("%v-%x", r.Sign.ID, checksum))
163+
parts = append(parts, fmt.Sprintf("%v-%s", r.Sign.ID, checksum))
164164

165165
p := path.Join(parts...)
166166
if _, err := os.Stat(path.Dir(p)); os.IsNotExist(err) {
@@ -189,6 +189,7 @@ func (r *Record) StoreOutput() {
189189

190190
// detail normal output
191191
utils.WriteToFile(p, content)
192+
192193
// summary file
193194
sum := fmt.Sprintf("%v - %v", strings.TrimSpace(head), p)
194195
if r.Opt.JsonOutput {

go.mod

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
11
module github.com/jaeles-project/jaeles
22

3-
go 1.15
3+
go 1.16
44

55
require (
6-
github.com/Jeffail/gabs/v2 v2.6.0
7-
github.com/Masterminds/sprig/v3 v3.2.0
8-
github.com/PuerkitoBio/goquery v1.6.1
6+
github.com/Jeffail/gabs/v2 v2.6.1
7+
github.com/Masterminds/sprig/v3 v3.2.2
8+
github.com/PuerkitoBio/goquery v1.7.0
99
github.com/appleboy/gin-jwt/v2 v2.6.4
10-
github.com/chromedp/cdproto v0.0.0-20210126020047-7ec7357d1463
11-
github.com/chromedp/chromedp v0.6.5
10+
github.com/chromedp/cdproto v0.0.0-20210625233425-810000e4a4fc
11+
github.com/chromedp/chromedp v0.7.3
1212
github.com/davecgh/go-spew v1.1.1
13-
github.com/fatih/color v1.10.0
13+
github.com/fatih/color v1.12.0
1414
github.com/gin-contrib/cors v1.3.1
15-
github.com/gin-contrib/static v0.0.0-20200916080430-d45d9a37d28e
16-
github.com/gin-gonic/gin v1.6.3
17-
github.com/go-resty/resty/v2 v2.4.0
15+
github.com/gin-contrib/static v0.0.1
16+
github.com/gin-gonic/gin v1.7.2
17+
github.com/go-resty/resty/v2 v2.6.0
1818
github.com/google/uuid v1.2.0
1919
github.com/gorilla/websocket v1.4.2
20-
github.com/jinzhu/copier v0.2.3
20+
github.com/jinzhu/copier v0.3.2
2121
github.com/jinzhu/gorm v1.9.16
22-
github.com/json-iterator/go v1.1.10
23-
github.com/lixiangzhong/dnsutil v0.0.0-20191203032812-75ad39d2945a
22+
github.com/json-iterator/go v1.1.11
23+
github.com/lixiangzhong/dnsutil v1.4.0
2424
github.com/logrusorgru/aurora/v3 v3.0.0
2525
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
2626
github.com/mitchellh/go-homedir v1.1.0
27+
github.com/onsi/ginkgo v1.16.4 // indirect
28+
github.com/onsi/gomega v1.13.0 // indirect
2729
github.com/panjf2000/ants v1.3.0
28-
github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac
29-
github.com/sirupsen/logrus v1.7.0
30+
github.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452
31+
github.com/sirupsen/logrus v1.8.1
3032
github.com/spf13/cast v1.3.1
31-
github.com/spf13/cobra v1.1.1
32-
github.com/spf13/viper v1.7.1
33-
github.com/thoas/go-funk v0.7.0
33+
github.com/spf13/cobra v1.2.1
34+
github.com/spf13/viper v1.8.1
35+
github.com/thoas/go-funk v0.8.0
3436
github.com/x-cray/logrus-prefixed-formatter v0.5.2
3537
gopkg.in/sourcemap.v1 v1.0.5 // indirect
3638
gopkg.in/src-d/go-git.v4 v4.13.1

0 commit comments

Comments
 (0)