1

I recently come to know that I can curl a website using the bash command

curl --user user:pass xyz.com

I have an idea for recharging my mobile using the bash script. I want to write a script which can automaically recharges my mobile using Paytm website. I want this script for my usage only so I will be adding my login credentials, mobile number. As I have already added my account info on Paytm, I just need to enter my CVV. So I just want to enter my CVV when the script runs. I am not much aware about it that how can I do this. Any help will be appreciated. Any other requirement to the question will be added further. Thanks.

1

I don't know about Paytm in particular, but generally in Chrome you copy a request as a curl request.

  • Enter Your information and open Inspect Element window or Press (F12)
  • Go to Network tab
  • Press Login/Recharge, whatever the button to proceed
  • In the Network tab at the left, you can see a new item added, that's your request
  • Press on the request and verify it by checking on the right "Query String Parameters"
  • You can see your username/password and any other inputs
  • Back to left side, right-click on the same request you can find "Copy as cURL (bash)"
  • Now you've the same request as curl command in bash

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.