Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ctx param in agent enumerate method #756

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Add ctx param in agent enumerate method #756

merged 2 commits into from
Feb 17, 2023

Conversation

EndPositive
Copy link
Contributor

so that I can cancel the enumeration manually too

@ehsandeep ehsandeep changed the base branch from master to dev February 15, 2023 18:10
@EndPositive
Copy link
Contributor Author

@ehsandeep rebased on dev

@tarunKoyalwar
Copy link
Member

@EndPositive , How about implementing the same without making any breaking changes to API since many users import subfinder as library .

Ex:

func (a *Agent) EnumerateSubdomains(domain string, proxy string, rateLimit, timeout int, maxEnumTime time.Duration) chan subscraping.Result {
return a.EnumerateSubdomainsWithCtx(context.Background(),domain , proxy , rateLimit, timeout , maxEnumTime)
}
func (a *Agent) EnumerateSubdomainsWithCtx(ctx context.Context, domain string, proxy string, rateLimit, timeout int, maxEnumTime time.Duration) chan subscraping.Result 

v2/pkg/passive/passive.go Outdated Show resolved Hide resolved
Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@tarunKoyalwar tarunKoyalwar requested review from ehsandeep and tarunKoyalwar and removed request for tarunKoyalwar February 16, 2023 09:30
@tarunKoyalwar
Copy link
Member

@ehsandeep , build test is currently failing due to a #761 . It is WIP and for this PR we can either merge it to dev or rebase after #761 is resolved

@ehsandeep ehsandeep merged commit 913ae85 into projectdiscovery:dev Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants