Error CS0103

I’m trying to send a POST request with custom content (payload) for email and password, but when I try to load a data with the “Credentials” wordlist type in the stacker, I’m thrown with this error:

[IDLE] CompilationErrorException: (96,358): error CS0103: The name ‘USERNAME’ does not exist in the current context.

Any help could mean a lot. It’s also important to note that I’m fairly new with OB, trying to migrate from Python. I haven’t used OB1. Thanks in advance!

Probably, you are using <USERNAME> in “content”…you must use <input.USERNAME>.

1 Like

Ohhh, that’s right. What a silly slip-up. Thank you!

1 Like

Hey, how about using variable in custom headers? I’m trying to randomize my user-agent using the built-in function. I can’t seem to figure out how to use variables. And I can’t find any docs for reference. Sorry for the bother.

BLOCK:RandomUserAgent
=> VAR @UA
ENDBLOCK

BLOCK:HttpRequest
customHeaders = ${(“User-Agent”, “<UA>”), (“Pragma”, “no-cache”), (“Accept”, “/”), (“Accept-Language”, “en-US,en;q=0.8”)}
TYPE:STANDARD
$""
“application/x-www-form-urlencoded”
ENDBLOCK

1 Like

image

2 Likes

I tried this earlier but the debugger shows only the text “” in the request headers. I didn’t know about the interpolated mode. Thanks again for helping me with my basic questions!