61
62
63
64
65
66
67
68
69
70
|
# File 'lib/msf/core/exploit/view_state.rb', line 61
def decode_viewstate(encoded_viewstate, algo: 'sha1')
decoded = Rex::Exploit::ViewState.decode_viewstate(encoded_viewstate, algo: algo)
vprint_error('Could not parse ViewState data') unless decoded[:data].present?
vprint_error('Could not parse ViewState HMAC') unless decoded[:hmac].present?
decoded
rescue Rex::Exploit::ViewState::Error => error
vprint_error("#{error.class.name}: #{error.message}")
return { data: nil, hmac: nil }
end
|