Skip to content

Commit 488d8a7

Browse files
author
arkadiyt
committed
Fix bugcrowd
1 parent c3dbbe3 commit 488d8a7

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/bounty-targets/bugcrowd.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def scan
1414
retryable do
1515
parse_program(program_link)
1616
end
17-
end
17+
end.compact
1818
end
1919

2020
def uris
@@ -38,7 +38,7 @@ def directory_index
3838
response = JSON.parse(SsrfFilter.get(uri).body)
3939

4040
programs = response['engagements'].map do |program|
41-
program['briefUrl']
41+
"https://bugcrowd.com#{program['briefUrl']}"
4242
end
4343
break if programs.empty?
4444

@@ -51,8 +51,10 @@ def directory_index
5151

5252
def parse_program(program_link)
5353
uri = URI(program_link)
54-
response = ::SsrfFilter.get(uri).body
55-
document = ::Nokogiri::HTML(response)
54+
response = ::SsrfFilter.get(uri)
55+
return if response.code == '403'
56+
57+
document = ::Nokogiri::HTML(response.body)
5658

5759
brief_url = ::JSON.parse(document.css('div[data-react-class="ResearcherEngagementBrief"]')
5860
.attr('data-api-endpoints').value)['engagementBriefApi']['getBriefVersionDocument']

0 commit comments

Comments
 (0)