Skip to content

Commit

Permalink
Fix bugcrowd
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiyt committed Mar 16, 2024
1 parent ed81124 commit 5ce2db5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/bounty-targets/bugcrowd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,17 @@ def directory_index
program_links = []

page = 1
uri = URI('https://bugcrowd.com/programs.json')
::Kernel.loop do
uri = URI("https://bugcrowd.com/engagements.json?category=bug_bounty&sort_by=promoted&sort_direction=desc&page=#{page}")
response = JSON.parse(SsrfFilter.get(uri).body)

programs = response['programs'].map do |program|
"https://bugcrowd.com#{program['program_url']}"
programs = response['engagements'].map do |program|
"https://bugcrowd.com#{program['briefUrl']}"
end
break if programs.empty?

program_links.concat(programs)
page += 1
uri = URI("https://bugcrowd.com/programs.json?page[]=#{page}")
end

program_links.reject do |link|
Expand Down

0 comments on commit 5ce2db5

Please sign in to comment.