Fiddler Autoresponder when = in URL - fiddler

I'm trying to make an auto response for a website, let me take an exemple
Website : http://mywebsite.com/1.0/?appID=blah_blah&appVersion=RandomNumber&getAppicationSettings=blah_blah
I'd like that Fiddler match the autoresponse after, for exemple, "appVersion=" I've tried to put "REGEX:http://mywebsite.com/1.0/?appID=blah_blah&appVersion=.*" but it doesn't work.
I don't know if you know what I mean, I have trouble to explain it. :(
Thanks for the reply.

The simplest thing would be to just change the rule to
http://mywebsite.com/1.0/?appID=blah_blah&appVersion=
If you need to use a regular expression, the expression needs to be valid, with escaping of characters that have a meaning in regular expressions. E.g. more like:
REGEX:mywebsite\.com\/1\.0\/\?appID=blah_blah&appVersion=[\d]+&getAppicationSettings=blah_blah

Related

How can I write regex in the fiddler autoresponder answer?

just start to use fiddler in my project for debug purpose, but haven't figure out how to handle following case with autoresponder.
I want to extract the timestamp in url and respond to the timestamp value itself.
if url is
https://example.com/20220816/hello/
I would like to respond by text as follows.
20220816
I wrote the rule as follows, but it didn't work. The fiddler recognizes $1 as a file path.
regex:(?insx)^https://example\.com/(.*)/hello/
$1
I don't think there's a way to respond to text other than url right away in the fiddler autoresponder, so can't you solve it?

Unable to get a value from the key in Sendgrid template

I am trying to get a value and use it in sendgrid email template. The JSON looks like this.
"productskumapping" : {
"created/updated" : 2,
"failed" : 0
}
{{productskumapping.created/updated}} does not give any value in the email template. the macro is not replaced. But the macro must replace with 2. How to make this work? the slash character("/") is causing the issue. Please sugggest any solution for this.
Twilio SendGrid developer evangelist here.
SendGrid uses handlebars style expressions to interpolate data. I just learned that slashes were a deprecated way that handlebars the library used to navigate objects. I don't know if SendGrid uses that exact handlebars library internally, but I thought it was important.
I believe the way to get around a slash in a key, like you have, is to surround the key with square brackets instead. This is known as literal segments and would look like this for you:
{{productskumapping.[created/updated]}}

Simple DOM open Redirection quesiton

Burp highlights DOM open redirection possible with code below. Could anyone explain if this is feasible? Many thanks!
var url = window.location.href;
url = url.replace(/(\?|\&)user_lang=[A-Za-z]{2}/, "");
window.location.href = url;
Most likely a false positive
Let's have a look at what the code exactly does: First, it reads the current URL, then it applies some Regular Expression to it, and finally it redirects to that URL. Burp recognizes this pattern and flags it as potential vulnerability.
Let's have a closer look at the regular expression: (\?|\&)user_lang=[A-Za-z]{2}
So the first match is either a ? or a &, followed by user_lang=, followed by two letters of either upper- or lower case. Here are some strings this would match to:
&user_lang=FO
?user_lang=sj
?user_lang=Oo
Once a match is found, it is replaced with nothing, and the user is redirected to the resulting URL. Let's look at an example:
https://example.com/?user_lang=ENsome/kind/of/url would rresult in a redirect to https://example.com/some/kind/of/url
This should generally not be a problem, as redirects to a different domain are not a problem using this method.

Mojolicious route with a parameter not matching if the parameter contains %2f

I have the following route
$r->get('/select_folder/:mail')->to('mail#change_folder');
It works well almost every time but when the route contains the %2f sequence of characters, equivalent to / it works as if %2f is a path separatator instead of a escaped sequence.
This is an example input:
http://127.0.0.1:5000/select_folder/%5bGmail%5d%2fDestacados
This is part of the error:
None of these routes could generate a response for your GET request for /select_folder/[Gmail]/Destacados, maybe you need to add a new one?
I would like to know some way to get a parameter like this as an url part without using GET or POST parameters.
You can use wildcard placeholders to allow / to be part of the matched parameter.
$r->get('/select_folder/*mail')->to('mail#change_folder');
The reason why %2F is interpreted as a / is because the URL is decoded before being applied to routing.
Finally I have discovered how to use regular expressions to solve the problem.
$r->get('/select_folder/:folder'=>[folder=>qr/.*/])->to('mail#change_folder');
I made :folder match any character, now it is working.

Fiddler Wildcard AutoResponse For URL parameters

Is there a way for Fiddler to match an autoresponse for the following URL so it will match ANY wildcard value in the middle of a URL?
http://test.localhost.com/accounts/{wildcard}/notes/page/1
You'll probably want to use a regular expression:
REGEX:http://test\.localhost\.com/accounts/.*/notes/page/1
or maybe
REGEX:http://test\.localhost\.com/accounts/.+/notes/page/1
if your wildcard must be 1 or more characters.
Note: Your question's title mentions "query parameters" but the text of the question seems to concern the "path" component of the URL, since there's no ? in your sample.
Using AutoResponder, it would be:-
[![regex:(?inx)^http://test\.localhost\.com/accounts/.*/.*notes/page/1][1]][1]
Use the below case, when host is also not known.
regex:(?inx)^https://.+\/accounts/.*/.*/.*