LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2010, 08:07 AM   #1
midhat
Member
 
Registered: Aug 2009
Location: bosna
Distribution: ubuntu
Posts: 42

Rep: Reputation: 15
curl auto login to my isp


how to write bash script to auto log in to my isp network here is url :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>


<title>mediasky hotspot » login</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="login_files/prototype.js"></script>
<script type="text/javascript" src="login_files/scriptaculous.js"></script><script type="text/javascript" src="login_files/builder.js"></script><script type="text/javascript" src="login_files/effects.js"></script><script type="text/javascript" src="login_files/dragdrop.js"></script><script type="text/javascript" src="login_files/controls.js"></script><script type="text/javascript" src="login_files/slider.js"></script><script type="text/javascript" src="login_files/sound.js"></script>
<script type="text/javascript" src="login_files/lightview.js"></script>
<script type="text/javascript" src="login_files/jquery.js"></script>
<script type="text/javascript" src="login_files/menu.js"></script>
<link href="login_files/style.css" type="text/css" rel="stylesheet" media="screen">
<link href="login_files/menu.css" type="text/css" rel="stylesheet" media="screen">
<link href="login_files/lightview.css" type="text/css" rel="stylesheet" media="screen">
<script type="text/javascript">
jQuery.noConflict ();
var timeout = 500;
var closetimer = 0;
var ddmenuitem = 0;

function jsddm_open(){
jsddm_canceltimer();
jsddm_close();
ddmenuitem = jQuery(this).find('ul').eq(0).css('visibility', 'visible');
}

function jsddm_close(){
if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');
}

function jsddm_timer(){
closetimer = window.setTimeout(jsddm_close, timeout);
}

function jsddm_canceltimer(){
if(closetimer) {
window.clearTimeout(closetimer);
closetimer = null;
}
}

jQuery(document).ready(function(){
jQuery('.jsddm > li').bind('mouseover', jsddm_open);
jQuery('.jsddm > li').bind('mouseout', jsddm_timer);
jQuery('.jsddm2 > li').bind('mouseover', jsddm_open);
jQuery('.jsddm2 > li').bind('mouseout', jsddm_timer);
});

document.onclick = jsddm_close;

document.observe ('lightview:loaded',
function() {
Lightview.show({
href: 'http://www.mediasky.ba/izbornik/importer.php?id=35&showTitle=false',
rel: 'iframe',
title: '<h1>Vazno obavjestenje za sve Media Sky korisnike</h1>',
options: {
autosize: false,
width: 600,
height: 400,
topclose: true,
ajax: {
method: 'get',
evalScripts: true
}
}
});

new Ajax.Request('./game-servers.html', {
method: 'get',
onSuccess: function(transport) {
var gameserv = $('gameserv');

gameserv.update('<div style="font-size: 18px; color: #000;">Game Server Aktiviran</div>' + transport.responseText);
}
});
}
);
</script>

<style type="text/css">
body {color: #737373; font-size: 10px; font-family: verdana;}

textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #bbb;
padding: 2px;
margin: 1px;
font-size: 12px;
color: #808080;
}

a, a:link, a:visited, a:active { color: #aaa; text-decoration: none; font-size: 10px; }
a:hover { text-decoration: underline; color: #aaa; }
img {border: none;}
td { font-size: 14px; color: #fff; }
td .obavjestenje { color: #000; font-size: 11px; }
.style1 {
color: #fff;
font-size: 12px;
}
.content {color: #fff; font-size: 11px; }
.style4 {font-size: 12px}
.style6 {
font-size: 12px
}
input[type=text], input[type=password] {
width: 96%;
padding: 5px;
border: 3px solid #aaa;
}
input[type=submit] {
width: 28%;
padding: 6px;
border: 2px solid #666;
color: #000;
}
</style>
</head><body>

<form name="sendin" action="http://10.1.35.1/login" method="post">
<input name="username" type="hidden">
<input name="password" type="hidden">
<input name="dst" value="http://www.google.ba/" type="hidden">
<input name="popup" value="true" type="hidden">
</form>

<script type="text/javascript" src="login_files/md5.js"></script>
<script type="text/javascript">
<!--
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('\055' + document.login.password.value + '\221\103\034\044\350\150\145\057\263\073\304\115\116\062\302\235');
document.sendin.submit();
return false;
}
//-->
</script>


<div align="center"><img src="login_files/hot-spot-logo.jpg" height="157" width="995">
</div>
<table height="28" width="995" align="center" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td scope="col" height="36" width="140" align="center">
<a href="http://www.mediasky.ba/" class="lightview" rel="iframe" title="Mediasky.ba :: Pregled Stranice :: width: 1200, height: 600"><img src="login_files/button-mediasky-zeleni.gif" height="25" width="130" border="0"></a>
</td>
<td scope="col" width="120" align="center">
<a href="http://mediasky.ba/izbornik/importer.php?id=33" class="lightview" rel="iframe" title="Akcija Racunara :: Mjesecne Akcije :: width: 1200, height: 600"><img src="login_files/button-akcija-racunara-zeleni.gif" height="25" width="110"></a></td>
<td scope="col" width="120" align="center">
<ul class="jsddm">
<li><a href="http://mediasky.ba/index.php/video-nadzor" class="lightview" rel="iframe" title="Video Nadzor :: Video Nadzor :: width: 1200, height: 600" style="width: 120px;"><img src="login_files/button-video-nadzor-zeleni.gif" height="25" width="110"></a>
<ul style="width: 120px;">
<li><a href="http://mediasky.ba/izbornik/importer.php?id=32" class="lightview" rel="iframe" title="Reference :: Video Nadzor :: width: 600, height: 400">Reference</a></li>
</ul>
</li>
</ul>
</td>
<td scope="col" width="140" align="center">
<a href="http://91.191.50.15/radiusmanager/user.php" class="lightview" rel="iframe" title="Provjera Potrosnje :: Korisnici :: width: 1200, height: 600"><img src="login_files/button-provjera-potrosnje-zeleni.gif" height="25" width="130"></a>
</td>
<td scope="col" width="120" align="center">
<a href="http://10.64.43.121/" title="Free Zona" target="_blank"><img src="login_files/button-freezona-zeleni.gif" height="25" width="110"></a>
</td>
<td scope="col" width="120" align="center">
<ul class="jsddm">
<li><a href="http://mediasky.ba/izbornik/importer.php?id=16" class="lightview" rel="iframe" title="Web Dizajn :: Web Software :: width: 600, height: 400"><img src="login_files/button-web-dizajn-zeleni.gif" height="25" width="110"></a>
<ul style="width: 111px;">
<li><a href="http://mediasky.ba/izbornik/importer.php?id=17" class="lightview" rel="iframe" title="CMS Portal :: CMS :: width: 600, height: 400">CMS Portal</a></li>
<li><a href="http://mediasky.ba/izbornik/importer.php?id=18" class="lightview" rel="iframe" title="Web Shop :: Online SHOP :: width: 600, height: 400">Web Shop</a></li>
<li><a href="http://mediasky.ba/izbornik/importer.php?id=20" class="lightview" rel="iframe" title="HTML Stranice :: HTML :: width: 600, height: 400">HTML Stranice</a></li>
<li><a href="http://mediasky.ba/izbornik/importer.php?id=21" class="lightview" rel="iframe" title="Web Aplikacije :: Web Apps :: width: 600, height: 400">Web Aplikacije</a></li>
<li><a href="http://mediasky.ba/izbornik/importer.php?id=22" class="lightview" rel="iframe" title="Cjenovnik :: Cjenik :: width: 600, height: 400">Cjenovnik</a></li>
</ul>
</li>
</ul>
</td>
<td scope="col" width="120" align="center">
<a href="http://10.1.35.1/webmail.html" class="lightview" rel="iframe" title="Webmail :: E-Posta :: width: 265, height: 150"><img src="login_files/button-webmail-zeleni.gif" height="25" width="100"></a>
</td>
<td scope="col" width="159">&nbsp;</td>
</tr>
</tbody></table>
<table width="995" align="center" border="1" bordercolor="#088ade">
<!--DWLayoutTable-->

<tbody><tr>
<td valign="top" width="393" bgcolor="#ffffff">
<div class="content">
<form name="login" action="http://10.1.35.1/login" method="post" onsubmit="return doLogin()">
<table width="393" align="center" bgcolor="#3366ff" border="0" bordercolor="#8ad115" cellpadding="2" cellspacing="2">
<tbody><tr>
<td width="461" bgcolor="#088ade"><strong>Dobro došli na stranicu za prijavu!</strong>
<p><span class="style4 style1">Ako koristite kartice potrebno je samo unijeti šesnestocifarni broj kartice umjesto korisničkog imena i lozinke !!!</span></p></td>
</tr><tr>
<td height="20" valign="bottom" bgcolor="#088ade"><span class="style6">Korisnicko ime / Broj kartice:</span></td>
</tr>
<tr>
<td style="padding: 6px 3px;" height="32" valign="middle" bgcolor="#088ade"><input name="username" value="mido" type="text"></td>
</tr>
<tr>
<td height="20" valign="bottom" bgcolor="#088ade"><span class="style6">Lozinka:</span></td>
</tr>
<tr>
<td style="padding: 6px 3px;" height="32" valign="middle" bgcolor="#088ade"><input name="password" type="password"></td>
</tr>

<tr><td height="40" bgcolor="#088ade"><span class="style10">
<input name="submit" value="Prijava" type="submit">
<br>
<br>
<span class="style4">U slučaju da imate problema sa prijavom molimo kontaktirajte našu tehničku podršku!</span>
<p><span class="style4">Telefoni: <strong style="font-size: 11px;">063/796-704</strong> ili <strong style="font-size: 11px;">035/772-249</strong><br>
Email: <strong style="font-size: 11px;">admin@mediasky.ba</strong></span></p></span></td>
</tr>
</tbody></table>

<input name="dst" value="http://www.google.ba/" type="hidden">
<input name="popup" value="false" type="hidden">
</form>

</div>
</td><td valign="top" width="586">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tbody><tr>
<td valign="top" width="516">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td id="obavjestenje" class="obavjestenje" style="" valign="top" width="516">
<iframe src="login_files/importer.html" allowtransparency="true" frameborder="0" height="295" scrolling="auto" width="100%"></iframe>
</td>
</tr>
</tbody></table></td>
</tr>
</tbody></table>

<table width="100%" align="center" border="0" cellpadding="12" cellspacing="0">
<tbody><tr>
<td id="gameserv" align="center"><div style="font-size: 18px; color: rgb(0, 0, 0);">Game Server Aktiviran</div></td>
</tr>
</tbody></table>
</td></tr></tbody></table>
<!--OVDE PRESTAJE KOD ZA LOGIN FORMU-->

<!-- ODAVDE POCINJE TEKST ZA SKRIPTU KOJA IZBACIUJE INFORMACIJU DA JE NETACNO KORISNICKO IME -->


<!--odavde pocinej graska da se ispisuje//-->

<!--do ovde se ispisuje greska//-->

<script type="text/javascript">
<!--document.login.username.focus();//-->
</script>
<div style="z-index: 4999; position: fixed; background: none repeat scroll 0% 0% rgb(0, 0, 0); opacity: 0.85; display: none;" id="lv_overlay"></div><div style="z-index: 5000; top: 50%; left: 50%; position: fixed; margin-left: -62px; margin-top: -62px; visibility: visible; width: 124px; height: 124px; opacity: 0; display: none;" id="lightview"><div style="z-index: 5001;" id="" class="lv_Container"><ul style="z-index: 5001; margin-top: -11px; height: 22px;" class="lv_Sides"><li style="margin-left: -16px; width: 16px; height: 22px; z-index: 5001;" class="lv_PrevSide"><div style="margin-left: 16px; width: 16px; height: 22px; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...prev.png&quot;) no-repeat scroll left top transparent; z-index: 5001; display: none;" class="lv_Wrapper"><div style="z-index: 5001;" class="lv_Button"></div></div></li><li style="margin-right: -16px; width: 16px; height: 22px; z-index: 5001;" class="lv_NextSide"><div style="margin-left: -16px; width: 16px; height: 22px; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...next.png&quot;) no-repeat scroll left top transparent; z-index: 5001; display: none;" class="lv_Wrapper"><div style="z-index: 5001;" class="lv_Button"></div></div></li></ul><div style="z-index: 5001; height: 18px; top: -18px;" class="lv_topButtons"><div style="z-index: 5001; float: right; margin-top: 0px; width: 22px; height: 18px; padding-right: 12px;" class="lv_Wrapper lv_topcloseButtonImage"><div style="z-index: 5001; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...lose.png&quot;) no-repeat scroll left top transparent; width: 22px; height: 18px;" class="lv_Button"></div></div></div><ul style="z-index: 5001;" class="lv_Frames"><li style="z-index: 5001;" class="lv_Frame lv_FrameTop"><div style="height: 12px; z-index: 5001;" class="lv_Liquid"><ul style="z-index: 5001;" class="lv_Half lv_HalfLeft"><li style="z-index: 5001;" class="lv_CornerWrapper"><div style="width: 12px; height: 12px; z-index: 5001;" class="lv_Corner lv_CornerTl"><canvas style="float: left; z-index: 5001;" height="12px" width="12px" class="cornerCanvasTl"></canvas></div><div style="left: 12px; background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Fill"></div></li></ul><div style="background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Filler"></div><ul style="z-index: 5001;" class="lv_Half lv_HalfRight"><li style="margin-top: -12px; z-index: 5001;" class="lv_CornerWrapper"><div style="width: 12px; height: 12px; z-index: 5001;" class="lv_Corner lv_CornerTr"><canvas style="float: left; z-index: 5001;" height="12px" width="12px" class="cornerCanvasTr"></canvas></div><div style="left: -12px; background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Fill"></div></li></ul></div></li><li style="height: 112px; z-index: 5001;" class="lv_Center"><div style="z-index: 5001;" class="lv_WrapUp"><div style="margin-top: 12px; background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_WrapDown"><div style="padding: 0pt 12px; background-color: rgb(255, 255, 255); z-index: 5001; opacity: 0;" class="lv_WrapCenter"><div style="display: none; width: auto; height: auto;" class="lv_contentTop"></div><div style="z-index: 5001; width: 100%; position: relative; display: block; padding: 0pt 0pt 6px; visibility: visible;" class="lv_MenuBar clearfix"><div style="width: 77px; height: 22px; background: none repeat scroll 0% 0% rgb(255, 255, 255); opacity: 0.75; z-index: 5001; display: none;" class="lv_Button lv_Close"></div><ul style="z-index: 5001; width: 599px;" class="lv_Data"><li style="z-index: 5001;" class="lv_DataText"><div style="background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Title"><h1>Vazno obavjestenje za sve Media Sky korisnike</h1></div><div style="background-color: rgb(255, 255, 255); z-index: 5001; display: none;" class="lv_Caption"></div></li><div style="z-index: 5001; display: none;" class="lv_innerController"><li style="background-color: rgb(255, 255, 255); z-index: 5001; display: none;" class="lv_ImgNumber"><div style="z-index: 5001;"></div></li><li style="z-index: 5001; display: none;" class="lv_innerPrevNext"><div style="opacity: 0.75; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...prev.png&quot;) no-repeat scroll left top rgb(255, 255, 255); z-index: 5001; width: 14px; height: 14px;" class="lv_Button"></div><div style="opacity: 0.75; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...next.png&quot;) no-repeat scroll left top rgb(255, 255, 255); z-index: 5001; width: 14px; height: 14px;" class="lv_Button"></div></li><li style="z-index: 5001; width: 44px; height: 14px; display: none;" class="lv_Slideshow"><div style="opacity: 0.75; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...play.png&quot;) no-repeat scroll left top rgb(255, 255, 255); z-index: 5001; width: 44px; height: 14px;" class="lv_Button"></div></li></div></ul></div><div style="overflow: hidden; width: auto; height: auto; display: none;" class="lv_contentBottom"></div></div></div></div><div style="z-index: 5001; width: 22px; height: 22px; margin-top: -5px; margin-left: -11px; display: none;" class="lv_Loading"><div style="background: url(&quot;http://10.1.35.1/js/lightview/js/ima...ding.gif&quot;) no-repeat scroll left top transparent; z-index: 5001;" class="lv_Button"></div></div></li><li style="z-index: 5001;" class="lv_Frame lv_FrameBottom"><div style="height: 12px; z-index: 5001;" class="lv_Liquid"><ul style="z-index: 5001;" class="lv_Half lv_HalfLeft"><li style="z-index: 5001;" class="lv_CornerWrapper"><div style="width: 12px; height: 12px; z-index: 5001;" class="lv_Corner lv_CornerBl"><canvas style="float: left; z-index: 5001;" height="12px" width="12px" class="cornerCanvasBl"></canvas></div><div style="left: 12px; background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Fill"></div></li></ul><div style="background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Filler"></div><ul style="z-index: 5001;" class="lv_Half lv_HalfRight"><li style="margin-top: -12px; z-index: 5001;" class="lv_CornerWrapper"><div style="width: 12px; height: 12px; z-index: 5001;" class="lv_Corner lv_CornerBr"><canvas style="float: left; z-index: 5001;" height="12px" width="12px" class="cornerCanvasBr"></canvas></div><div style="left: -12px; background-color: rgb(255, 255, 255); z-index: 5001;" class="lv_Fill"></div></li></ul></div></li><li style="display: none; margin-top: 12px; background: url(&quot;http://10.1.35.1/js/lightview/js/ima...lank.gif&quot;) repeat scroll left top transparent; z-index: 5001;" class="lv_PrevNext"></li></ul></div></div><div style="display: none;" id="lightviewError"></div><div style="z-index: 5001; margin-bottom: 18px; position: fixed; top: auto; left: 50%; width: 178px; margin-left: -89px; display: none; visibility: visible;" id="lightviewController"><div style="width: 178px;" class="lv_controllerTop"><div style="margin-left: 6px;" class="lv_controllerCornerWrapper lv_controllerCornerWrapperTopLeft"><div style="width: 6px; height: 6px;" class="lv_Corner lv_CornerTl"><canvas style="float: left;" height="6px" width="6px" class="cornerCanvasTl"></canvas></div></div><div style="margin: 0pt 6px; height: 6px; background-color: rgb(77, 77, 77);" class="lv_controllerBetweenCorners"></div><div style="margin-left: -6px;" class="lv_controllerCornerWrapper lv_controllerCornerWrapperTopRight"><div style="width: 6px; height: 6px;" class="lv_Corner lv_CornerTr"><canvas style="float: left;" height="6px" width="6px" class="cornerCanvasTr"></canvas></div></div></div><div style="background-color: rgb(77, 77, 77); width: 178px;" class="lv_controllerMiddle clearfix"><ul style="margin: 0pt 6px;" class="lv_controllerCenter"><li style="line-height: 22px; width: 58px;" class="lv_controllerSetNumber"><div style="width: 58px; height: 22px; line-height: 22px;"></div></li><li class="lv_ButtonWrapper lv_controllerPrev"><div style="background: url(&quot;http://10.1.35.1/js/lightview/js/ima...prev.png&quot;) no-repeat scroll left top rgb(77, 77, 77); width: 22px; height: 22px;" class="lv_Button"></div></li><li class="lv_ButtonWrapper lv_controllerNext"><div style="background: url(&quot;http://10.1.35.1/js/lightview/js/ima...next.png&quot;) no-repeat scroll left top rgb(77, 77, 77); width: 22px; height: 22px;" class="lv_Button"></div></li><li class="lv_ButtonWrapper lv_controllerSlideshow"><div style="background: url(&quot;http://10.1.35.1/js/lightview/js/ima...play.png&quot;) no-repeat scroll left top rgb(77, 77, 77); width: 22px; height: 22px; opacity: 0.4; cursor: auto;" class="lv_Button"></div></li><li class="lv_ButtonWrapper lv_controllerClose"><div style="background: url(&quot;http://10.1.35.1/js/lightview/js/ima...lose.png&quot;) no-repeat scroll left top rgb(77, 77, 77); width: 22px; height: 22px;" class="lv_Button"></div></li></ul></div><div style="width: 178px;" class="lv_controllerBottom"><div style="margin-left: 6px;" class="lv_controllerCornerWrapper lv_controllerCornerWrapperBottomLeft"><div style="width: 6px; height: 6px;" class="lv_Corner lv_CornerBl"><canvas style="float: left;" height="6px" width="6px" class="cornerCanvasBl"></canvas></div></div><div style="margin: 0pt 6px; height: 6px; background-color: rgb(77, 77, 77);" class="lv_controllerBetweenCorners"></div><div style="margin-left: -6px;" class="lv_controllerCornerWrapper lv_controllerCornerWrapperBottomRight"><div style="width: 6px; height: 6px;" class="lv_Corner lv_CornerBr"><canvas style="float: left;" height="6px" width="6px" class="cornerCanvasBr"></canvas></div></div></div></div></body></html>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
auto fill a form and submit using curl limadario Linux - Software 1 06-04-2010 05:46 AM
Auto-login (KDE) - will not auto-login without monitor attached Mithrilhall Linux - General 2 03-04-2008 10:16 AM
How to configure auto login & after login auto startup some program. hocheetiong Linux - Newbie 1 02-18-2008 12:49 AM
cURL not posting login data? Travesser Linux - General 1 02-15-2007 01:14 PM
ISP auto reconnect problem lumpfish Linux - Networking 0 07-29-2003 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration