Skip to content

Commit

Permalink
Fix bugcrowd (#159)
Browse files Browse the repository at this point in the history
Co-authored-by: arkadiyt <>
  • Loading branch information
arkadiyt committed Mar 16, 2024
1 parent ed81124 commit 809d697
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ If you want to run bounty-targets yourself you can follow these steps:

### Getting in touch

Feel free to contact me on twitter: https://twitter.com/arkadiyt
Feel free to contact me on Signal: @arkadiyt.01
2 changes: 1 addition & 1 deletion config/README.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ The code used to generate these files lives in the [bounty-targets](https://gith

### Getting in touch

Feel free to contact me on twitter: https://twitter.com/arkadiyt
Feel free to contact me on Signal: @arkadiyt.01
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 809d697

Please sign in to comment.