How to parse this token? (1)

Hello guys, how to parse this token? it’s not on the same line and the string - value=" - it is repeated several times.

<input type="hidden" name="_csrf_token"
                                   value="12345"
                                   >

Thanks for your help.

BLOCK:Parse
  input = @data.SOURCE
  leftDelim = "<input type=\"hidden\" name=\"_csrf_token\""
  rightDelim = ">"
  MODE:LR
  => VAR @FIRST
ENDBLOCK

BLOCK:Parse
  input = @FIRST
  leftDelim = "value=\""
  rightDelim = "\""
  MODE:LR
  => VAR @TOKEN
ENDBLOCK

1 Like

Thanks, how can this be done in OpenBullet 1.2.2?

ITS RECOMENDED TO USE OB2 BCZ ITS FASTER AND HAVE A LOT OF OPTIONS
BUT ANYWAYS THIS IS OB1 CODE

PARSE "<SOURCE>" LR "<input type=\"hidden\" name=\"_csrf_token\"" ">" -> VAR "FIRST" 

PARSE "<FIRST>" LR "value=\"" "\"" -> VAR "TOKEN" 


1 Like

PARSE “” CSS “[name=_csrf_token]” “value” → VAR “csrf”