Skip to content

Commit

Permalink
Fix intigriti
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiyt committed Dec 20, 2024
1 parent 4e14c9e commit f3a7c00
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 137 deletions.
3 changes: 2 additions & 1 deletion lib/bounty-targets/intigriti.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def encode(component)

def directory_index
page = ::Nokogiri::HTML(SsrfFilter.get(::URI.parse('https://www.intigriti.com/programs')).body)
programs = JSON.parse(page.css('#__NEXT_DATA__').inner_text)['props']['pageProps']['programs']
script = page.css('script')[-1].inner_text.match(/self\.__next_f\.push\(\[1,(.*)\]/)[1]
programs = JSON.parse(JSON.parse(script)[2..])[3]['children'][1][3]['programs']
programs.map do |program|
{
id: program['programId'],
Expand Down
34 changes: 17 additions & 17 deletions spec/bounty-targets/intigriti_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
expect(client.directory_index).to eq(
[
{
company_handle: 'doccle',
confidentiality_level: 'application',
handle: 'doccle',
id: '12715f4b-d10e-415f-a309-6ab042f6158a',
status: 'open',
company_handle: 'arbonia',
confidentiality_level: 'public',
handle: 'arboniavdpprogram',
id: 'f2a437ca-68cb-455c-81ba-3b8cd1b21cb2',
max_bounty: {'currency' => 'EUR', 'value' => 0},
min_bounty: {'currency' => 'EUR', 'value' => 0},
name: 'Arbonia VDP program',
status: 'suspended',
tacRequired: false,
twoFactorRequired: false,
url: 'https://www.intigriti.com/programs/doccle/doccle/detail',
max_bounty: {'currency' => 'EUR', 'value' => 4000},
min_bounty: {'currency' => 'EUR', 'value' => 0},
name: 'Doccle Bug Bounty program'
url: 'https://www.intigriti.com/programs/arbonia/arboniavdpprogram/detail'
},
{
company_handle: 'bpost',
company_handle: 'intigriti',
confidentiality_level: 'public',
handle: 'e-tracker',
id: 'a09e497e-fd75-4b56-afa0-7a6689389b76',
tacRequired: false,
twoFactorRequired: false,
handle: 'fastlane',
id: 'e56d6838-a1da-46d4-9d89-8154e017ae89',
max_bounty: {'currency' => 'EUR', 'value' => 0},
min_bounty: {'currency' => 'EUR', 'value' => 0},
name: 'e-tracker',
status: 'open',
url: 'https://www.intigriti.com/programs/bpost/e-tracker/detail'
name: 'Submit your research - Fast lane',
status: 'suspended',
tacRequired: false,
twoFactorRequired: true,
url: 'https://www.intigriti.com/programs/intigriti/fastlane/detail'
}
]
)
Expand Down
239 changes: 120 additions & 119 deletions spec/fixtures/intigriti/programs.html

Large diffs are not rendered by default.

0 comments on commit f3a7c00

Please sign in to comment.