Skip to content

Commit

Permalink
Small improve to allow proxy can be apply in chrome headless
Browse files Browse the repository at this point in the history
  • Loading branch information
j3ssie committed Jul 4, 2021
1 parent 66b4635 commit dc14f98
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 163 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: [ 'https://paypal.me/j3ssiejjj' ]
custom: [ 'https://paypal.me/j3ssiejjj', 'https://www.buymeacoffee.com/j3ssie' ]
11 changes: 6 additions & 5 deletions core/output.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core

import (
"crypto/sha1"
"fmt"
"github.com/fatih/color"
"github.com/jaeles-project/jaeles/libs"
Expand Down Expand Up @@ -142,9 +141,10 @@ func (r *Record) StoreOutput() {
}

// hash the content
h := sha1.New()
h.Write([]byte(content))
checksum := h.Sum(nil)
checksum := utils.GenHash(r.Response.Body)
if r.Response.Body == "" {
checksum = utils.GenHash(r.Response.Beautify)
}

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

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

// detail normal output
utils.WriteToFile(p, content)

// summary file
sum := fmt.Sprintf("%v - %v", strings.TrimSpace(head), p)
if r.Opt.JsonOutput {
Expand Down
38 changes: 20 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
module github.com/jaeles-project/jaeles

go 1.15
go 1.16

require (
github.com/Jeffail/gabs/v2 v2.6.0
github.com/Masterminds/sprig/v3 v3.2.0
github.com/PuerkitoBio/goquery v1.6.1
github.com/Jeffail/gabs/v2 v2.6.1
github.com/Masterminds/sprig/v3 v3.2.2
github.com/PuerkitoBio/goquery v1.7.0
github.com/appleboy/gin-jwt/v2 v2.6.4
github.com/chromedp/cdproto v0.0.0-20210126020047-7ec7357d1463
github.com/chromedp/chromedp v0.6.5
github.com/chromedp/cdproto v0.0.0-20210625233425-810000e4a4fc
github.com/chromedp/chromedp v0.7.3
github.com/davecgh/go-spew v1.1.1
github.com/fatih/color v1.10.0
github.com/fatih/color v1.12.0
github.com/gin-contrib/cors v1.3.1
github.com/gin-contrib/static v0.0.0-20200916080430-d45d9a37d28e
github.com/gin-gonic/gin v1.6.3
github.com/go-resty/resty/v2 v2.4.0
github.com/gin-contrib/static v0.0.1
github.com/gin-gonic/gin v1.7.2
github.com/go-resty/resty/v2 v2.6.0
github.com/google/uuid v1.2.0
github.com/gorilla/websocket v1.4.2
github.com/jinzhu/copier v0.2.3
github.com/jinzhu/copier v0.3.2
github.com/jinzhu/gorm v1.9.16
github.com/json-iterator/go v1.1.10
github.com/lixiangzhong/dnsutil v0.0.0-20191203032812-75ad39d2945a
github.com/json-iterator/go v1.1.11
github.com/lixiangzhong/dnsutil v1.4.0
github.com/logrusorgru/aurora/v3 v3.0.0
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.16.4 // indirect
github.com/onsi/gomega v1.13.0 // indirect
github.com/panjf2000/ants v1.3.0
github.com/robertkrimen/otto v0.0.0-20200922221731-ef014fd054ac
github.com/sirupsen/logrus v1.7.0
github.com/robertkrimen/otto v0.0.0-20210614181706-373ff5438452
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cast v1.3.1
github.com/spf13/cobra v1.1.1
github.com/spf13/viper v1.7.1
github.com/thoas/go-funk v0.7.0
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.8.1
github.com/thoas/go-funk v0.8.0
github.com/x-cray/logrus-prefixed-formatter v0.5.2
gopkg.in/sourcemap.v1 v1.0.5 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1
Expand Down
Loading

0 comments on commit dc14f98

Please sign in to comment.