Can I replace Host Names on Fiddler results? - fiddler

Fiddler's host field is not always clear, especially with IP direct calls, or service calls I don't recognize.
I would like a way to replace certain names or name regex, with other more clearly defined names.
for instance, "193-149-72-221.drip.trouter.io" actually means Skype traffic, though the IP changes. so I would prefer to use: "*.drip.trouter.io".
Or, if there is a tag field or something like that that I can apply to hosts, and show the column in the list. I'm pretty flexible, but I'd really like to be able to classify or rename hosts to something I can recognize easier at a glance.
(I have looked around for this on google and checked similar questions on here with no luck)
Thanks.

Click Rules > Customize Rules.
public static BindUIColumn("MyFunkyName", 60)
function FillNameColumn(oS: Session): String {
if (oS.hostname.EndsWith("trouter.io") return "SkypeStuff";
if (oS.hostname.EndsWith("bunnies.com") return "CuteStuff";
return oS.hostname;
}
Save the file. You now have a column titled MyFunkyName which shows a string based on the hostname of the target.

Related

How to set a fixed width for columns in mjml?

How to set a fixed width for columns in mjml?
I do not want to have classes or media queries for columns. I just want the columns to have a fixed width and I want that width to be a part of inlined styles for a column.
I need this, because, during forwarding Outlook removes all the classes and the classes which specify width for columns get stripped off as well. Also, I do not care about responsiveness.
If it is ambiguous whether you've used mj-column > width, I should suggest that as the first step. Perhaps you've used it.
Paradoxically, I'll suggest using mj-style inline="inline". In your MJML, target the HTML element you need using the technique suggested in https://documentation.mjml.io/#mj-html-attributes and Difficulty in understanding CSS-styling in MJML
If I understand your use case right, you need to get the necessary HTML attributes inside the HTML elements. MJML will put yours there because of the inline="inline" instruction above. That's the first HTML, the file MJML creates. With luck, the email client doing the forwarding won't change that. Maybe no client will change those; test carefully.
Your use case is challenging. Meeting the challenge of creating a generally forwardable email is huge; it's tough to know all possible modifications made at any one export or import at an email client, let alone the combined effect of combinations of clients. MJML typically makes email authors more efficient in getting email into all email clients the first time; MJML doesn't try to support forwarding. Each forward requires an export from the first email client and an import into the second. See https://www.litmus.com/blog/when-forwarded-emails-break/
BTW: In addition to StackOverflow, a great source of MJML support is https://mjml.slack.com/ You probably would have gotten a more prompt response there than this one. (Sorry!)

Search string formatting in Elouqa API

I'm using the Elouqa Rest API in an integration with another product and I want to implement a file browser. As part of this I want to get a list of the folders inside another folder. Theapi documents here say that a search string can be appended but don't give any clues as to the format of the search string. I've tried various things but so far I'm just getting empty results. An example is here:
/API/rest/1.0/assets/email/folders?search=folderId+%3D+250
I've tried with and without +'s and with and without url encoding the = sign, also various combinations of quote marks but so far nothing.
I believe what you want is a slightly different endpoint e.g.:
/API/rest/1.0/assets/email/folder/250/contents
Which would provide a list of folders contained with folder 250
If you wanted to search for a given folder name then you would use
/API/rest/1.0/assets/email/folders?search=foldername
Hope that helps!

Apache Wicket event on Page "page was mouted on ..."

I have mount Page in this form (with one predefined parameter):
mountPage("/lista/${variant}", StronaEntityV2.class);
when parameter "variant" is given all is OK. But when parameter is absent (is OK too from application point of view) URL is build in form
wicket/bookmarkable/all....package...StronaEntityV2?8
It is ok too, but I will know that situation. In simple situation (with one predefined parameter) checking parameter is good, but in more complicated isn't so simple (and must maintain code in distinct places).
My ideal imaged solution is event
page.OnPageIsMountedOn(URL to_me)
I will accept wide range of solutions.
FORMAL: please integrate synonyms on tags wicket-1.6 & wicket-6, and create new wicket-7
Your page is configured to listen to /lista/${variant}.
When you do: setResponsePage(StronaEntityV2.class, paramsWithVariant) then Wicket will use the mount point and produce: /lista/variantValue.
But if you do: setResponsePage(StronaEntityV2.class), i.e. no PageParameters provided, then Wicket will ignore /lista/${variant} (because it doesn't match) and will produce a "default" page url, i.e. /wicket/bookmarkable/com.example.StronaEntityV2.
So the application controls which url should be used.
You can use optional parameter placeholder: /lista/#{variant}. Note that I use # instead of $ now. This way Wicket will produce /lista/ when there is no variant parameter provided. In the page constructor you will know that the url is always "/lista" but the parameter may be null, so better use: pageParameters.get("variant").toXyz(defaultValue) or .toOptionalXyz().

Restlet routing

I'm trying to work out the best/most performant/easiest to maintain version for handling many different URLs in restlet.
eg, if I want to have an Item resource, is there a better way to do it than this?
router.attach("/items", ItemResource.class);
router.attach("/item/{itemid}", ItemResource.class);
router.attach("/items/list", ItemResource.ItemListResource.class);
router.attach("/items/weapons", ItemResource.WeaponListResource.class);
router.attach("/items/armours", ItemResource.ArmourListResource.class);
...
(I tried with having /items/{itemid}, but then /items/weapons etc could not be accessed.)
ItemResource then has #Get for fetching a single item, but also has #Put for saving an item when just /items is used. Something feels a bit wrong here... Is there a better way to have fetching/inserting/updating/listing for items in this case?
Also, this router.attach list is very long, 100 or so items. Since this has to be run through on every request it would probably be fairly slow. I know I can attach multiple routers together in a chain - but I can't find documentation on how to do this nicely. What's the best way to chain routers and keep them maintainable?
Just put the
router.attach("/item/{itemid}", ItemResource.class);
on the lowest part of the routing, since it will catch all path parameters, so before it matches everything, rout the typed path first. This should fix it based on my experience.

What may be an efficient way to judge whether a user stays on the same domain while browsing (using a Firefox extension)?

While browsing a website, say www.example.com, it is possible that the user enters some subdomain say www.sub.example.com
But the base webdomain remains the same.
In my firefox extension, I need to develop a "session" which remains active until a user remains on the same domain.
A simple solution would be to extract the domain from the url first. Then split the string with "." as token. Thus, we get sub and example for the second case and just example for the second case. I can then compare both. If any are equal, I deduce that the domains are same.
Though this might work, this seems more like a hack and might be prone to false positives/negatives.
Is there a more efficient / cleaner solution to the same problem?
Info: I am using GWT to build the extension
You should use nsIEffectiveTLDService, it will handle things like sub.example.co.uk correctly. You can pass an nsIURI instance to nsIEffectiveTLDService.getBaseDomain(), aAdditionalParts parameter should be zero. For http://sub.example.co.uk/foo you will get example.co.uk back - the actual "domain" part. Then you can simply compare the domain names for two URLs.