Conversation
todo, parse and use csv instead of export=urls
There was a problem hiding this comment.
Known issues -
- Dedicated search query is not working
./uncover -pw "/wp-content/themes/twentysixteen/"
__ ______ _________ _ _____ _____
/ / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ / __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/ v1.0.2
projectdiscovery.io
[FTL] Program exiting: no query provided- ENV token support,
PUBLICWWW_API_KEY - Unpexected output
echo "/wp-content/themes/twentysixteen/" | ./uncover -e publicwww -v
__ ______ _________ _ _____ _____
/ / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ / __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/ v1.0.2
projectdiscovery.io
[publicwww] :0
[publicwww] :0
[publicwww] :0
[publicwww] :0
[publicwww] :0
[publicwww] :0
[publicwww] :0
[publicwww] :0
[publicwww] :0
|
|
@ehsandeep this output is caused because |
|
|
@xm1k3 , @ehsandeep I think it will be better if we change ratelimit logic in uncover i.e in uncover we use If source has ratelimit say
Apart from obvious calculation required another thing we miss is bucket refill rate.
|
tarunKoyalwar
left a comment
There was a problem hiding this comment.
Suggesting some improvements .
- I think we implement
-delayoption to avoid hitting ratelimit . since we already know ratelimits for most of the sources (shodan,censys etc) I think we can use a default ratelimit for these sources and leave it for user to configure sources whose ratelimit is not know (ex: publicwww). - we are doing the same in
subfinder
| ) | ||
| switch engine { | ||
| case "shodan": | ||
| agent, err = shodan.NewWithOptions(&uncover.AgentOptions{RateLimiter: shodanRateLimiter}) | ||
| agent, err = shodan.New() | ||
| case "censys": | ||
| agent, err = censys.NewWithOptions(&uncover.AgentOptions{RateLimiter: censysRateLimiter}) | ||
| agent, err = censys.New() | ||
| case "fofa": |
There was a problem hiding this comment.
@xm1k3 , it depends on your preference , but I think we can remove .New() functions since they are not used anymore and only decrease overall code coverage. I think we can directly append to array
agents = append(agents, &publicwww.Agent{})
uncover/agent/censys/censys.go
Outdated
| err = session.RateLimits.Take(agent.Name()) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return session.Do(request) | ||
| } |
There was a problem hiding this comment.
same here , I think we can modify session.Do to accept a optional sourcename and move ratelimit logic inside Do function
func (s *Session) Do(req *retryablehttp.Request,source ...string)
uncover/session.go
Outdated
| var err error | ||
| rateLimitOpts := &ratelimit.Options{ | ||
| MaxCount: uint(retryMax), | ||
| Duration: time.Duration(delay), | ||
| IsUnlimited: delay == 0, | ||
| } | ||
|
|
||
| rateLimitOpts.Key = engines[0] |
There was a problem hiding this comment.
@xm1k3 I think Maxcount should be 1 here and retryMax is configured should be configure inretryablehttp.Client
|
@tarunKoyalwar I think tracking these changes within a new issue would be better as they are not specific to this implementation, which only adds support for the new source |
- session and rate limit logic moved to #165
|
@Mzack9999 @tarunKoyalwar as mentioned in the above message above, the logic that also modifies the other providers has been moved to this issue: #164 |
tarunKoyalwar
left a comment
There was a problem hiding this comment.
lgtm!
Just a note this source is not very stable due to its ratelimit which will be implemented in #164
Uh oh!
There was an error while loading. Please reload this page.