GithubHelp home page GithubHelp logo

nodyhub / fifi Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 103 KB

fifi sends to a given list of url's HTTP requests, calculates on each response a signature and groups them based on the values.

License: GNU General Public License v3.0

Go 100.00%
go http recon

fifi's People

Contributors

cugu avatar nodyhub avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fifi's Issues

Handle HTTP client timeouts

When the client timeout is reached, it throws an error and exists.
Timeout errors should be caught and properly handled.

022/04/13 14:13:42 Get "https://[REDACTED].aspx": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
exit status 1

Do not use the canonical form of the header's to avoid information loss

According to the documentation go does automatically generate the canonical form of the response header. That lead to information loss and, fifi might miss differences based on the case.

The raw response header should be used here:

fifi/main.go

Lines 61 to 72 in aca1bb0

for _, row := range strings.Split(string(rawResponse), "\n") {
if len(row) > 0 {
field := strings.TrimSpace(strings.Split(row, ":")[0])
for h, v := range response.Header {
if strings.EqualFold(field, h) {
idx := hdrCounter[h]
res = append(res, headerEntry{h, v[idx]})
hdrCounter[h] = idx + 1
}
}
}
}

Make fifi multithreaded

HTTP calls should be performed in a parallel manner, making the tool much quicker. Maybe a worker pool would be sufficient for this purpose.

Preserver response header order

Golang stores currently the response header in a map[string][]string which makes it impossible to reverse the initial order of the header values.

The order of the header values may indicate even further information about differences.

Failing error handling

Thats a bug!

022/05/04 06:55:13 ERROR (0): Get "https://<snip>/sales-accelerator/oidc/logoutcallback": dial tcp: lookup <snip> on 1.1.1.1:53: no such host
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x634924]

goroutine 7 [running]:
main.performRequest(0xc00007ea00, {0xc000b37950, 0x48})
	/home/runner/work/fifi/fifi/main.go:210 +0x544
main.getAllSignatures.func1(0x0?, 0xc00007ea00, 0x0?, 0xc00000c0a8, 0x0)
	/home/runner/work/fifi/fifi/main.go:291 +0x192
created by main.getAllSignatures
	/home/runner/work/fifi/fifi/main.go:283 +0x37d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.