mirror of
https://github.com/OJ/gobuster.git
synced 2026-10-12 02:07:17 +00:00
cleanup
This commit is contained in:
@@ -18,9 +18,11 @@
|
||||
"shardulm94.trailing-spaces",
|
||||
"IBM.output-colorizer",
|
||||
"github.vscode-github-actions",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"task.vscode-task",
|
||||
"redhat.vscode-yaml",
|
||||
"usernamehw.errorlens"
|
||||
"usernamehw.errorlens",
|
||||
"Gruntfuggly.todo-tree"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-8
@@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
Generated
-9
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Generated
-8
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/gobuster.iml" filepath="$PROJECT_DIR$/.idea/gobuster.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
-6
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
+1
-1
@@ -96,7 +96,7 @@ func printProgress(g *libgobuster.Gobuster) {
|
||||
requestsExpected := g.Progress.RequestsExpected()
|
||||
percent := float32(requestsIssued) * 100.0 / float32(requestsExpected)
|
||||
if math.IsNaN(float64(percent)) {
|
||||
percent = float32(0)
|
||||
percent = 0.0
|
||||
}
|
||||
s := fmt.Sprintf("%sProgress: %d / %d (%3.2f%%)", TERMINAL_CLEAR_LINE, requestsIssued, requestsExpected, percent)
|
||||
_, _ = fmt.Fprint(os.Stderr, s)
|
||||
|
||||
@@ -19,16 +19,23 @@ func TestAdditionalWordsLen(t *testing.T) {
|
||||
|
||||
globalOpts := libgobuster.Options{}
|
||||
for _, x := range tt {
|
||||
opts := OptionsDir{}
|
||||
opts.ExtensionsParsed.Set = x.extensions
|
||||
t.Run(x.testName, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
d, _ := New(&globalOpts, &opts, nil)
|
||||
opts := OptionsDir{}
|
||||
opts.ExtensionsParsed.Set = x.extensions
|
||||
|
||||
calculatedLen := d.AdditionalWordsLen()
|
||||
wordsLen := len(d.AdditionalWords("dummy"))
|
||||
d, err := New(&globalOpts, &opts, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("got error creating gobusterdir: %v", err)
|
||||
}
|
||||
|
||||
if calculatedLen != wordsLen {
|
||||
t.Fatalf("Mismatched additional words length: %d got %d generated words %v", calculatedLen, wordsLen, d.AdditionalWords("dummy"))
|
||||
}
|
||||
calculatedLen := d.AdditionalWordsLen()
|
||||
wordsLen := len(d.AdditionalWords("dummy"))
|
||||
|
||||
if calculatedLen != wordsLen {
|
||||
t.Fatalf("Mismatched additional words length: %d got %d generated words %v", calculatedLen, wordsLen, d.AdditionalWords("dummy"))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,6 @@ func TestLineCounter(t *testing.T) {
|
||||
{"Empty 3", "\r\n", 1}, // these are wrong, but I've found no good way to handle those
|
||||
}
|
||||
for _, x := range tt {
|
||||
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||
t.Run(x.testName, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
r := strings.NewReader(x.s)
|
||||
@@ -204,7 +203,6 @@ func TestLineCounterSlow(t *testing.T) {
|
||||
{"Empty 3", "\r\n", 0},
|
||||
}
|
||||
for _, x := range tt {
|
||||
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||
t.Run(x.testName, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
r := strings.NewReader(x.s)
|
||||
@@ -286,7 +284,6 @@ func TestParseExtensions(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, x := range tt {
|
||||
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||
t.Run(x.testName, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
ret, err := ParseExtensions(x.extensions)
|
||||
@@ -333,7 +330,6 @@ func TestParseCommaSeparatedInt(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, x := range tt {
|
||||
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||
t.Run(x.stringCodes, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
want := NewSet[int]()
|
||||
@@ -365,7 +361,6 @@ func BenchmarkParseExtensions(b *testing.B) {
|
||||
}
|
||||
|
||||
for _, x := range tt {
|
||||
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||
b.Run(x.testName, func(b2 *testing.B) {
|
||||
for y := 0; y < b2.N; y++ {
|
||||
_, _ = ParseExtensions(x.extensions)
|
||||
@@ -390,7 +385,6 @@ func BenchmarkParseCommaSeparatedInt(b *testing.B) {
|
||||
}
|
||||
|
||||
for _, x := range tt {
|
||||
x := x // NOTE: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
|
||||
b.Run(x.testName, func(b2 *testing.B) {
|
||||
for y := 0; y < b2.N; y++ {
|
||||
_, _ = ParseCommaSeparatedInt(x.stringCodes)
|
||||
|
||||
Reference in New Issue
Block a user