Automate Login to Tikona Broadband(Python on Windows)

Marcus Fenix

Well-Known Member
Veteran
Hi Everybody,
Was bored at home today after I got out of action after a biking accident and so I created an automation process for logging in to Tikona Broadband.
I have a download server running on a Atom D1800(which I connect to via mstsc) and my intention was to enable login to Tikona without logging into the machine i.e. the internet is turned on as soon as the machine is turned on.
Also this script will reconnect to Tikona in case they log me out automatically after long periods of inactivity.Many a times I have set up torrent downloads on my machine and then discovered in the morning that they didn't complete as Tikona logged me out .:banghead:
This script will poll for internet connectivity in a continuous loop.If google.com can be pinged then I assume that Internet is okay and then the loop waits for 5 mins before rechecking the connectivity.
If google.com cannot be pinged then the script checks if the Default gateway(10.23.64.1) can be pinged or not (i.e. no Network issues from Tikona side) and if the gateway can be pinged then it runs a Python script to login to Tikona.
I got the basic structure from this link where the basic Python code was available,Thanks a lot Bris(whoever you are..:))
http://www.brijin.net/login-to-tikona/
I am a complete noob when it comes to Python but after some trial and error I got the Python script working in Windows 7 and 10(my office laptop and 2 home rigs) and so I created this tutorial for other guys in the same boat as me.

Please find the zipped tutorial attached below which has the screenshots intact(Had to zip it as techenclave doesn't allow .docx uploads and I can't paste pictures from a word doc directly in the text form here):confused:

Also find the mega.nz link to the word file.

https://mega.nz/#!qp1lGI4J!7Lmx-8kKoiJRJbTl8q30Yt03vBp3MDaYS3mDV3uZIoI


Cheers...........
 

Attachments

  • Automate Tikona Login v1.1.docx.zip
    958.4 KB · Views: 2,789

guptaji

Well-Known Member
Adept
This is super stuff! I was looking for something similar.
Btw guys: I was wondering if I should take the static IP from Tikona to avoid logging in again and again. will a static IP limit me in any way?
 

Marcus Fenix

Well-Known Member
Veteran
This is super stuff! I was looking for something similar.
Btw guys: I was wondering if I should take the static IP from Tikona to avoid logging in again and again. will a static IP limit me in any way?
If you pirate a lot of stuff it might be better to avoid static IP.
 

Chaos

Well-Known Member
Veteran
Does Tikona not support PPPoE? On ACT, I have just setup PPPoE on my wifi router and have never had to go to their damn webpage again. The router auto logs in once it has been logged out.
 

Marcus Fenix

Well-Known Member
Veteran
This is super stuff! I was looking for something similar.
Btw guys: I was wondering if I should take the static IP from Tikona to avoid logging in again and again. will a static IP limit me in any way?
If you pirate a lot of stuff it might be better to avoid static IP.
 
Last edited:

nRiTeCh

Well-Known Member
Veteran
Bit off the topic but my hathway is configured via dlink wifi router.
The issue is I'm unable to login to hathway on http://203.212.193.60/bsp/startportal.do
The page doesnt load.

I know my router takes care of it but I wanna do that manually.

I have Dlink 600L model.

My dhcp setup is common and in simple range- 192.168.x.x

So what more setting shall I do to get the page http://203.212.193.60/bsp/startportal.do even via dhcp of my dlink?
 

Marcus Fenix

Well-Known Member
Veteran
You can do this for auto login...

Get wget for Windows from here
http://gnuwin32.sourceforge.net/packages/wget.htm

Create this batch file(Replace User And Password as per your needs)

:START
@ECHO OFF
CLS
ECHO Waiting...
PING -n 60 127.0.0.1 > NUL
:AGAIN
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto START
ECHO Not Working!
ECHO.
ECHO Logging Back in...
E:\WGET\WGET -qO- --post-data="username=USER%40hathway.com&password=PASSWORD" "http://203.212.193.61/bsp/login.do?action=doLoginSubmit&flowId=UserLogin"
ECHO Checking Internet...
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto AGAIN
GOTO START
 

nRiTeCh

Well-Known Member
Veteran
You can do this for auto login...

Get wget for Windows from here
http://gnuwin32.sourceforge.net/packages/wget.htm

Create this batch file(Replace User And Password as per your needs)

:START
@ECHO OFF
CLS
ECHO Waiting...
PING -n 60 127.0.0.1 > NUL
:AGAIN
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto START
ECHO Not Working!
ECHO.
ECHO Logging Back in...
E:\WGET\WGET -qO- --post-data="username=USER%40hathway.com&password=PASSWORD" "http://203.212.193.61/bsp/login.do?action=doLoginSubmit&flowId=UserLogin"
ECHO Checking Internet...
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto AGAIN
GOTO START


Did as you said and even changed the wget pacth to C:\Program Files (x86)\GnuWin32\bin

but all it dies it shows Waiting... in cmd windows.
 

Sandeep_yadav

New Member
Disciple
PING -n 1 10.23.64.1|find "Sent = 1, Received = 1" >NUL
command not showing by command prompt.

When Tikona is connected :
C:\Windows\system32>PING -n 1 10.23.64.1
Pinging 10.23.64.1 with 32 bytes of data:
Reply from 10.23.64.1: bytes=32 time=51ms TTL=63

Ping statistics for 10.23.64.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 51ms, Maximum = 51ms, Average = 51ms
When Tikona is not connected :
C:\Windows\system32>PING -n 1 10.23.64.1
Pinging 10.23.64.1 with 32 bytes of data:
Request timed out.
Ping statistics for 10.23.64.1:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
When we manually enter 10.23.64.1 in browser windows , Tikona login page opens
otherwise
C:\Windows\system32>PING -n 1 10.23.64.1
Pinging 10.23.64.1 with 32 bytes of data:
Request timed out.

is looping

In case Tikona is disconnected and ping 10.23.64.1 time out
it will loop timeout forever and Tikona will not connected.
I tried ping 1.254.254.254 also but it time out.
When tikona is connected both ping 1.254.254.254 & 10.23.64.1 are working
I am using windows command prompt (Admin) in Win10x64

Tikona connect script alone working OK.
Tikona script with Batch file loops for pinging 10.23.64.1 & stuck in infinite loop.

Kindly show remedy
Thanks
 

Marcus Fenix

Well-Known Member
Veteran
Something is wrong with Tikona network today.In my case I can login to 1.254.254.254 manually but ping to 10.23.64.1 is timing out with a 100% loss.So my automatic script won't work as the gateway seems to be down.[DOUBLEPOST=1452418010][/DOUBLEPOST]Its working now.
upload_2016-1-10_14-56-26.png


Can you check from your end and let me know.
 
Last edited:

Sandeep_yadav

New Member
Disciple
Thanks for reply dear friend.
just checked. What i have done :
1. Using Tikona.
2. Disconnect Tikona from their screen at 1.254.254.254.
3. Tikona disconnection screen appears.
4. Tried 10.23.64.1 with batch file. It is looping with gateway not active message.
5. Tried PING -n 1 10.23.64.1
Pinging 10.23.64.1 with 32 bytes of data:
Request timed out.
Ping statistics for 10.23.64.1:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
6. Tried 10.23.64.1 in browser.
7. Tikona Login page appeared.
8. Used only python Tikona login script.
9. Working Well.
10. But through batch file not working.

===========
11. Reconnect using Tikona login screen.
12. Use Ping command again
C:\Windows\system32>PING -n 1 10.23.64.1

Pinging 10.23.64.1 with 32 bytes of data:
Reply from 10.23.64.1: bytes=32 time=1374ms TTL=63

Ping statistics for 10.23.64.1:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1374ms, Maximum = 1374ms, Average = 1374ms
==============
13. AFter login in tikona , Ping works.
14. It should also working before login. Thats our logic to reconnect ?
15. Please elaborate.

Thanks

Regds.

Sandeep

Here's Screenshot
 

Attachments

  • 1.PNG
    1.PNG
    20.4 KB · Views: 534
Last edited by a moderator:

Marcus Fenix

Well-Known Member
Veteran
Yes we should be able to ping the gateway even before logging in.In that case can you try replacing 10.23.64.1 with the gateways assigned to you(You can check on your router for the same)
 

Sandeep_yadav

New Member
Disciple
Yes we should be able to ping the gateway even before logging in.In that case can you try replacing 10.23.64.1 with the gateways assigned to you(You can check on your router for the same)

My Lan Adaptor says:
DHCP Enabled: Yes
IPv4 Address: 10.116.119.156
IPv4 Subnet Mask: 255.255.192.0
IPv4 Default Gateway: 10.116.64.1
IPv4 WINS Server:
NetBIOS over Tcpip Enabled: Yes

Tried with my gate way i.e. 10.116.64.1 when Tikona connected
C:\Windows\system32>ping 10.116.64.1
Ping statistics for 10.116.64.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

When Tikona disconnected:
Pinging 10.116.64.1 with 32 bytes of data:
Request timed out.

Couldn't understand
Help!!
 

Marcus Fenix

Well-Known Member
Veteran
My Lan Adaptor says:
DHCP Enabled: Yes
IPv4 Address: 10.116.119.156
IPv4 Subnet Mask: 255.255.192.0
IPv4 Default Gateway: 10.116.64.1
IPv4 WINS Server:
NetBIOS over Tcpip Enabled: Yes

Tried with my gate way i.e. 10.116.64.1 when Tikona connected
C:\Windows\system32>ping 10.116.64.1
Ping statistics for 10.116.64.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

When Tikona disconnected:
Pinging 10.116.64.1 with 32 bytes of data:
Request timed out.

Couldn't understand
Help!!

Ok so this is a workaround I can shoot off the top of my head.
Tikona rooftop CPE device will only assign an IP to your router or connected PC when the CPE itself is able to connect to the AP(Base tower)

My details are as follows from my router-
upload_2016-1-11_20-54-3.png


So the CPE must be assigning an IP of 10.116.119.156 in your case once the CPE connects to the network(i.e. before you are logged in with your userid)

Therefore I think replacing 10.23.64.1 with 10.116.119.156 should work in your case.Can you please share the pings before and after logging in to Tikona[DOUBLEPOST=1452526162][/DOUBLEPOST]BTW can you check the pings to 10.23.64.1 before logging in via an Administrative command prompt??
 

Sandeep_yadav

New Member
Disciple
Thanks Marcus
It worked. Batch file worked with gateway 10.116.119.156
But another problem is there.
When I switch off the Tikona CPE and switch on the again, It take 5-7 minutes to detect the gateway as 10.116.119.156.
Sometimes I need to enable/diable/enable lan adaptor many times.
Sometimes I need to again switch off/on the CPE power.
It , sometimes , tool 10-20 minutes to get proper gateway after due error & trial.
What is this phenomenon?
Are u experiencing such events i.e. hit and trial reconnection issues.?
I attached the lan adaptor status before detection of CPE by laptop i.e.
After 3-4 minutes of switching off/on CPE power.

Regards
 

Attachments

  • before_tikona.PNG
    before_tikona.PNG
    13.6 KB · Views: 604
Top