📜 ⬆️ ⬇️

inquiry of account status for life :) Ukrainian provider

Recently life :) opened the “portal” my.life.com.ua , the most useful feature of which, it seemed to me, is the ability to find out the status of the account.

Well, I quickly on-curl-il:

#!/bin/sh

base_url=http://my.life.com.ua
cookies_file=$(tempfile)
nprefix=063
number=1234567
password=555222

curl -sSL --cookie-jar $cookies_file "$base_url/wap/jsps/balanceCheck/index.jsp?language=en" --output /dev/null

curl -sSL --cookie $cookies_file --cookie-jar $cookies_file "$base_url/servlet/aus?language=en" \
--data "topage=/wap/jsps/balanceCheck/index.jsp" --data "prefix=$nprefix" --data "msisdn=$number" \
--data "password=$password" | awk -- '/On/ {print ($3,$2,"", $6, ". ", $12, "");}'

curl -sSL --cookie-jar $cookies_file "$base_url/servlet/logout?language=en" --output /dev/null

rm $cookies_file


I have not yet decided in what form to display on the screen and where, but this way I will be able to monitor the status of my family’s account, otherwise they often forget to replenish on time.

ps: surely someone has already done this for Kyivstar and Beeline.UA, but there was no such thing on the live before.
pps: surely the script will not work for long, the portal has recently opened, the page format can be changed.

')

Source: https://habr.com/ru/post/75562/


All Articles