(Bash) $user#aol.com email availability checker - bash

So, I'm trying to set up a script in bash to send a request to aim.com's signup form, where it allows you to check if an ID is able to be made like so:
https://new.aol.com/productsweb/?promocode=827692&ncid=txtlnkuswebr00000073
- Choose a username
if $user = available then $continue; else show "Sorry, that username isn't available.".
Once that concept is down, I'll have it running through a list of a good 100 or so to see if any of these are able to be re-made.
If anyone can just point me in a starting direction, that would be awesome!
Thank you for your time.

Looking at the referenced page, when you click the Check button, it sends a POST request to the following URL:
https://new.aol.com/productsweb/subflows/ScreenNameFlow/AjaxSNAction.do
With the following (required) parameter: s. This parameter needs to be set to the username you're testing for.
If the username exists, a "reloadEverything" message appears. If the username doesn't exist, a "toggleSNField" message appears.
If you want a real "Sorry, that username isn't available." message instead of the "reloadEverything", add two more parameters: l and f - and they both need to also be the username you're testing.
To accomplish this, you could iterate through your list of usernames and make a POST request with each and then just parse the response matching the above strings (the reloadEverything string is longer than that - so you could just do a substring match).

Related

How do i get body of message when using keyword mentions in teams

in automate i have a flow. I am using "When keywords are mentioned". the keyword i entered is "test"
I Selected, the team,channel,etc... all correctly.
when someone types "the test is a success". in that channel. how do i get the full string "the test is a success"?
I have tried a few operations "get Messages", also tried a few dynamic content options and a few triggeroutput variations. all either are blank or provide a long json string with subscription,channelId,teamId,etc. but not the string I am trying to get.
The Get message details action should help you ...
In the body of the response, you'll clearly see the text that was entered to invoke the trigger.
Use Get message details, you will get message detail of that reply message. Then get your text with expression like this:
outputs('Get_message_details')?['body']['body']['plainTextContent']

Receiving Golang GET request with # in the URL parameter

I'm trying to create a fulfillment app for shopify, and they send a call once an hour to an endpoint on my app, with the order names they need me to provide tracking numbers for.
Unfortunately the order names have "#" in them (ex. #1001.1). When I receive these calls the query arguments get cut off at the # and the rest of the query string no longer shows. When I remove the # from the call (while testing), the whole query string comes through.
With #'s
Request
GET http://localhost:4200/v1/fetch_tracking_numbers.json?order_names[]=#1001.1&order_names[]=#1002.1&order_names[]=#1003.2
Logged Request on server side
GET http://localhost:4200/v1/fetch_tracking_numbers.json?order_names[]=
Without #'s
Request
GET http://localhost:4200/v1/fetch_tracking_numbers.json?order_names[]=1001.1&order_names[]=1002.1&order_names[]=1003.2
Logged Request on server side
GET http://localhost:4200/v1/fetch_tracking_numbers.json?order_names[]=1001.1&order_names[]=1002.1&order_names[]=1003.2
I'm using atreugo built on top of fasthttp.
Thanks!
Just want to respond here with an update.
I'm an idiot.
Shopify encodes their request URI's.
Their docs mislead me, along with my stupidity. Thanks to everyone who tried to help!

Filenet - GET Username from F_Originator

I am using filenet BPM for approval system and I want to extract the username from F_Originator so that I can send an email to originator about the status of approved Or rejected document. How can I extract the username from F_Originator in workflow (not using java code)?
I think I found a way to get the username although it's not making use of F_Originator. I created a string field called username & then at the launch step in Assignment tab I assigned username with userid() and it gives you the username. I think its not the best way to get the username but in my case it worked.
Answer suiting to the exact requirement
At launch step, assign output of userid() to a work flow data field
Use OOTB option to send email (CE_Operations) and edit the OOTB templates or
Have a component queue and establish a VWSession (or you can have custom login module to get VWSession)
Call yourVWSession.convertIdtoUserName(int userId) to get the username
then call yourVWSession.fetchUserInfo(username) it returns VWUserInfo
from VWUserInfo you can use getEMailAddress() to get user email id.
Hope this helps
I don't think there is a way to do it in workflow or at least I don't know.
I would suggest you have a component queue like ce_operations and pass the F_Originator and use vwSession.convertIdToUserName(userId)
**************updated answer************
you can use userid() method to get the user who has processed the workflow.
but there is a catch here if there are more than one user involved in processing the workflow, userid() will always return the last user. In order to get the username of the user who launched the workflow try
Define a data field in workflow and assign the value of userid() to it in the launch step
If you are launching workflow from code, you can set the username value to the data field

How to login multiple different auth0 users with jmeter?

What I am trying to do:
I want to simulate 100 different users (username+password combinations) into the same site (that uses an integrated Auth0 login), and each user clicks a button.
What I tried:
Using other questions from stackoverflow, I created:
- a login.txt file:
and a "CSV data set config":
and a "body data" on the login page, where I tried to take the USER and PASS from the text file:
The problem:
- when I check the Request in the result tree, I can only see the correct username being taken from the login.txt file, but the password field is just ${PASS} and not an actual password:
Questions:
What am I doing wrong, as the password is not loaded from the file?
I have a lot of errors in the result tree, and I think it's because of the Auth0... do you have any guidelines on using it with JMeter?
You variable name you define is PASSWORD and not PASS,
You can call it in your test ${PASSWORD} instead of ${PASS}
Or, in the guideline it states to use ${PASS} so you can change in CSV Data Set Config the Variable Names to USER,PASS

Have Dynamical values for my parameters in the Request payload (POST x-www-form-urlencoded)

Is there a way (and does it make sense even) to have dynamical values for my request parameters (in my case POST application/x-www-form-urlencoded that has two parameters username and password) which can be altered based on some function or a returned value from the server from a previous request?
The motivation being that i have a register-new-user request which i run from time to time off apiary.io and unless i manually change the example value for the username i get a "use already exists" response instead of 201 i want (since this request was already run with the username in the example).
What i'd like to have instead is a value in the API documentation that will change on each execution of the API call (either using some random number there, or to be able to have it take a value returned from a previous request).
Is there anything you can suggest to solve my "user already exists" response for register-new-user API call?
Here is my current API documentation (the relevant part):
## Registration [/users.json]
The `/users.json` resource handles registration of new user
### Register a New Patient [POST]
Register a new patient action sends email and password and registers
the new user in case it doesn't already exist
+ Request (application/x-www-form-urlencoded)
+ Attributes (Test User)
+ Body
user[email]=username#example.com&user[password]=123456
+ Response 201 (application/json)
{
"id":500
}
# Data Structures
## Test User (object)
+ "user[email]" (string): "username#example.com" - user email
+ "user[password]" (string): "123456" - user password
Thanks in advance
You can partially simulate this in the Apiary mock server by passing a header in your call, for example:
Prefer: status=200
See https://help.apiary.io/tools/mock-server/#multiple-responses
In general the mock server is not yet flexible and programmable enough to fully do what you describe, for example conditionals, dynamic variables or random responses.
We are working on enhancing this. If you'd like you may comment here on your requirements:
https://github.com/apiaryio/api-blueprint/issues/58
Feel free to also ping us in Apiary (in-app chat) or on support#apiary.io.
Thanks

Resources