Step by step
1) make a get url request using curl
2) save the content of the url in a string/variable
3) extract a few elements from the string/variable
4) Make a post url request with some of the elements in the string/variable
[The elements required are cookies, headers and token]
5) Save the result from post request
6) Locate using Find or something similar to find some elements
7) Make a get request to the elements extracted from Find
Print the texts in the console (cmd)
9) Print Using a image program to show the image extracted in console (cmd)
This steps are only theorial can this be done in batch?
Creating a small batch program
Moderator: DosItHelp
Re: Creating a small batch program
What is stopping you from attempting to code this?
Re: Creating a small batch program
Converting the get request to a string/variable. I don't how to do in cmd
Extract the token, cookie and header from string/variable
Make a POST request and extract the text and the image
Free program to embed images in cmd
Extract the token, cookie and header from string/variable
Make a POST request and extract the text and the image
Free program to embed images in cmd
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Creating a small batch program
The GET request is already a string; or are you trying to store the response in a string? Because that's just
where you replace [request] with whatever the request is. You could also use curl's -o option to store the output in a file.
POST requests can be processed the same way.
Extracting values from the responses will vary based on the response string, but it's also going to be a for /f loop.
I'm not aware of anything that can embed images in the command prompt, and I'm really not sure why you would want this in the first place.
Code: Select all
for /f "delims=" %%A in ('curl [request]') do set "get_response=%%A"
POST requests can be processed the same way.
Extracting values from the responses will vary based on the response string, but it's also going to be a for /f loop.
I'm not aware of anything that can embed images in the command prompt, and I'm really not sure why you would want this in the first place.
Re: Creating a small batch program
Thanks that really helped