openbullet / OpenBullet2

OpenBullet reinvented
MIT License
1.64k stars 456 forks source link

[Bug]: Error captcha #961

Closed Marseljrdev closed 3 months ago

Marseljrdev commented 5 months ago

Version of the software

0.2.5

Operating system

Windows 10

Browser / Native

Chrome

What happened?

Hello, I started using openbullet2 again and when building a config that contains captcha, I came across this error when passing the name "SOLUTION" of the resolved captcha.

(8.87): error CS0103: The name 'SOLUTION' does not exist in the current context

image

Relevant LoliCode if needed

BLOCK:SolveRecaptchaV3
  siteKey = "6LeECPQfAAAAACkqoH5ncOs_XrpeoCglJHa_hFGu"
  siteUrl = "https://example.com/sys/validecnh/"
  action = "submit"
  => VAR @solveRecaptchaV3Output
ENDBLOCK

BLOCK:HttpRequest
  url = $"https://example.com/sys/validecnh/"
  method = POST
  customHeaders = {("Accept", "*/*"), ("Accept-Encoding", "gzip, deflate, br"), ("Accept-Language", "pt-PT,pt;q=0.9,en-US;q=0.8,en;q=0.7"), ("Connection", "keep-alive"), ("Content-Length", "598"), ("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"), ("Cookie", "JWT_=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MDY3NDI3NTQsInVzZXIiOiJkZXNwYWNoYW50ZTEiLCJuYW1lIjoiY2xpZW50ZSIsInN0YXJ0aW5nUGxhdGZvcm0iOiIyMDIzLTEyLTE0IiwiZW5kUGxhdGZvcm0iOiIyMDI0LTAyLTE4IDExOjMyOjAwIn0%3D.d94LtDSPYOBvPeFd3AsZTQYwjifsmDntCFbrz%2FNhwn4%3D; __ddg1_=h9yzKu3QYTWIqQgM5ioq; PHPSESSID=2fecd16528c5dd0a35ffa26eb5ccbf71"), ("Host", "example.com"), ("Origin", "https://example.com"), ("Referer", "https://example.com/sys/validecnh/"), ("Sec-Fetch-Dest", "empty"), ("Sec-Fetch-Mode", "cors"), ("Sec-Fetch-Site", "same-origin"), ("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"), ("X-Requested-With", "XMLHttpRequest"), ("sec-ch-ua", "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\""), ("sec-ch-ua-mobile", "?0"), ("sec-ch-ua-platform", "\"Windows\"")}
  TYPE:STANDARD
  $"tokenrxpf=<SOLUTION>&cpf=<input.USER>"
  "application/x-www-form-urlencoded"
ENDBLOCK
openbullet commented 3 months ago

Hello, OB2 is different from OB1 so you need to use the variable you previously created <solveRecaptchaV3Output> not <SOLUTION>.

You can name it however you want.