Skip to content

Instantly share code, notes, and snippets.

@abn
Created February 16, 2014 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abn/9031929 to your computer and use it in GitHub Desktop.
Save abn/9031929 to your computer and use it in GitHub Desktop.
Helper script to keep connection alive for Reliance Broadband networks.
#! /usr/bin/env bash
# Hard-code credentials here, or better, pass them as env vars
USERNAME="${RELIANCE_USER}"
PASSWORD="${RELIANCE_PASS}"
# Reliance Broadband URLs
BASE_URL="http://reliancebroadband.co.in"
START_URL="${BASE_URL}/reliance/startportal_isg.do"
LOGIN_URL="${BASE_URL}/reliance/login.do"
COOKIE_FILE="/tmp/reliance.cookie"
CURL_CMD="curl --silent --cookie ${COOKIE_FILE} --cookie-jar ${COOKIE_FILE}"
# Get session
${CURL_CMD} ${START_URL} > /dev/null
# Perform login
${CURL_CMD} \
--data userId="${USERNAME}" \
--data password="${PASSWORD}" \
--data action="doLoginSubmit" \
${LOGIN_URL} > /dev/null
@joeshua
Copy link

joeshua commented Nov 20, 2015

Will this work with ddwrt router for log in to reliance on every time interval
Need ping to check on every hour base time and dial if the packets are drop seen that reliance is logging out every hour Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment