Code linting 🌟

This commit is contained in:
Giuseppe Trotta 2021-05-27 10:38:06 +02:00
parent 24ff3c86c1
commit 0c3363f317
No known key found for this signature in database
GPG key ID: DB8F64DA3FD8FE10
7 changed files with 10 additions and 14 deletions

View file

@ -1,6 +1,6 @@
BUILD ?= build
TARGET ?= muraena
PACKAGES ?= core log proxy session module module/crawler module/necrobrowser module/statichttp module/tracking
PACKAGES ?= core log session module module/crawler module/necrobrowser module/statichttp module/tracking
GO ?= go
all: build

View file

@ -23,7 +23,7 @@ type Victim struct {
CookieJar string `redis:"cookiejar_id"`
SessionInstrumented bool `redis:"session_instrumented"`
Cookies []VictimCookie `redis:"-"`
Cookies []VictimCookie `redis:"-"`
Credentials []VictimCredential `redis:"-"`
}

View file

@ -402,11 +402,10 @@ func (init *MuraenaProxyInit) Spawn() *MuraenaProxy {
// If HTTP_PROXY or HTTPS_PROXY env variables are defined
// all the proxy traffic will be forwarded to the defined proxy.
// Basically a MiTM of the MiTM :)
config := &tls.Config{
InsecureSkipVerify: true,
proxy.Transport = &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
proxy.Transport = &http.Transport{TLSClientConfig: config, Proxy: http.ProxyFromEnvironment}
}
return muraena

View file

@ -42,9 +42,9 @@ type Crawler struct {
}
var (
discoveredJsUrls []string
waitGroup sync.WaitGroup
rgxURLS *regexp.Regexp
discoveredJsUrls []string
waitGroup sync.WaitGroup
rgxURLS *regexp.Regexp
)
// Name returns the module name
@ -158,8 +158,6 @@ func (module *Crawler) explore() {
c.OnRequest(func(r *colly.Request) {})
var config *session.Configuration
config = module.Session.Config

View file

@ -1,4 +1,5 @@
package watchdog
// Parts of this module have been taken from ZeroDrop (https://github.com/oftn-oswg/zerodrop)
import (
@ -96,7 +97,6 @@ func (module *Watchdog) Prompt() {
return
}
switch result {
case "rules":
module.PrintRules()

View file

@ -361,7 +361,6 @@ func (s *Session) GetConfiguration() (err error) {
}
s.Config.Craft.Add.Request.Headers = slice
return
}

View file

@ -30,7 +30,7 @@ func Prompt(s *Session) {
validate := func(input string) error {
input = strings.ToLower(input)
if core.StringContains(input, []string{"","h","help","e", "exit"}) {
if core.StringContains(input, []string{"", "h", "help", "e", "exit"}) {
return nil
}