Is there a way to bypass a router login screen? - javascript

I was challanged recently to "hack" into my router, by that I mean already having connected to the internet, but hack into the local IP. So basically bypass the login screen. The router is a Livebox. I already have tried looking at the source code but the password seems to be hidden.
Here's a picture of the login screen.
If you can help than thank you very much.
Oh by the way, here's the source code:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript">
var remote_clt=0;
var sipp_proxy_flag=1;
var pcp_gui_enable=1;
var nat_from_upnp=1;
var my_auto_detect_fxo=0;
var my_isolate_wlan=1;
var X02_pf=1;
var adsl_para_page=0;
var my_ddns=1;
var my_wlan_mac=0;
var my_snmp=0;
var my_dialup=0;
var my_printer=0;
var my_bridge=0;
var my_8021x=0;
var my_tiny=0;
var my_vpn=0;
var my_upnp=1;
var my_usb=1;
var my_usb_storage=1;
var my_usb_printer=1;
var operation_func=10;
var my_wps=1;
var my_wcn=1;
var my_ralink_ver=0;
var feature_func=1;
var product_code=1024020;
var my_file_share=1;
var my_umts=0;
var vlan_func_enable=1;
var vlan_ip="";
var vlan_mask="";
var my_qos=2;
var my_isdn=0;
var my_voip=1;
var FXS_Num=8;
var my_voip_h323=0;
var my_voip_sip=1;
var ipsec_func=0;
var pptp_func=0;
var br_dhcpd_func=0;
var iptv_func=0;
var static_rt_func=0;
var my_upnpIgd=1;
var my_upnpAv=1;
var PM="DSL Router";
var BACKUP_LOG_NAME="dsl_log.log";
var BACKUP_CONFIG_NAME="config_dsl.bin";
var resetButton=0;
var hasUpgrade=0;
var ftpcRun=0;
var dhcpd_fixip_func=1;
var vendor_code=6;
var my_http_redir=0;
var arcor_umtsPin=0;
var my_ncidd=0;
var ipv6_service=1;
var ipv6_enable=1;
var hyper_link="<a href='http://www.arcadyan.com' target='_blank'>";
var urlname="www.arcadyan.com";
var product_name="Arcadyan ARV7519";
var vendor_name="DSL-EasyBox";
var company="Arcadyan Inc.";
var mouseover="'#FF6600'";
var mouseout="'#FFFFFF'";
var wizardbg="'#FFFFFF'";
var menu_link="<td height='0' align='left' bgColor='#FFFFFF' valign='middle'>";
var vendor_no=2;
var helplink="<p></p>";
var logo_fn="logo.gif";
var help_hyper_link="<a href='http://www.arcadyan.com/802' target='_blank'>";
var help_urlname="www.arcadyan.com/802";
var fw_hyper_link="<a href='http://www.arcadyan.com' target='_blank'>";
var fw_urlname="www.arcadyan.com";
var product_pic_fn="product_zz.gif";
var firmware_ver='00.96.806B';
if (parent.location.href != window.location.href)
parent.location.href = window.location.href;
function evaltF() {
document.tF.submit();
}
function kDown(e)
{
var key = 0 ;
if(window.event) key = window.event.keyCode;
else if(e) key = e.which ;
if(key==13) document.tF.submit();
//if (navigator.appName =='Netscape'&&(e.which ==3||e.which ==2|| e.which ==13))
// document.tF.submit();
//else if (navigator.appName == 'Microsoft Internet Explorer' &&(event.keyCode == 13))
// document.tF.submit();
}
document.onkeypress=kDown;
if (document.layers) window.captureEvents(Event.KEYDOWN);
//window.onkeypress=kDown;
function init()
{
var f=document.tF;
f.pws.focus();
if(remote_clt==1)
f.user.readOnly=false;
}
</script>
<link rel="stylesheet" type="text/css" href="fonts.css">
<link rel="stylesheet" type="text/css" href="page.css">
<link rel="stylesheet" type="text/css" href="menu.css">
<link rel="stylesheet" type="text/css" href="header.css">
<link rel="stylesheet" type="text/css" href="contener.css">
<link rel="stylesheet" type="text/css" href="subcontener.css">
<link rel="stylesheet" type="text/css" href="array.css">
<link rel="stylesheet" type="text/css" href="hardware.css">
<link rel="stylesheet" type="text/css" href="button.css">
<link rel="stylesheet" type="text/css" href="lbpopup.css">
<link rel="stylesheet" type="text/css" href="progressbar.css">
<link rel="stylesheet" type="text/css" href="styles.css">
<style type="text/css">
.style1 {
text-align: right;
}
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" cellpadding="0" cellspacing="0" width="97%" height="83">
<tr height="55">
<form ACTION="/cgi-bin/changef.exe" method="post" name="tFF">
<input type="hidden" name="language_flag" value="0">
<input type="hidden" name="menupage" value="/login.stm">
<td class="header" width="313"><div id="header"><h4>livebox</h4></div></td>
<td class="style1">
<img src="/images/language_en_gray.gif" width="70" height="29" border="0">
<input type="image" src="/images/language_es.gif" width="70" height="29" border="0">
</td>
</form>
</tr>
<tr>
<td class= bgstripe height="28" colspan="2"> </td>
</tr>
</table>
<form action="/cgi-bin/login.exe" method="post" name="tF">
<div id="menu" style="margin-left: 40%; margin-top: 60px;">
<table>
<tr>
<td class="topleft"></td>
<td class="top"></td>
<td class="topright"></td>
</tr>
<tr>
<td class="left"></td>
<td>
<div class="info_accueil">
<table class="info_accueil">
<tr>
<td class="info_pref"><img src="images/preferencesbutton.gif">Authentication</td>
</tr>
<tr>
<td class="info_label">Login:</td>
</tr>
<tr>
<td class="info_field"><input type="text" name="user" value="admin" class="login" readonly></td>
</tr>
<tr>
<td class="info_label">Password:</td>
</tr>
<tr>
<td class="info_field"><input type="password" maxlength="12" size="32" name="pws" class="password"></td>
</tr>
<tr>
<td class="info_statusnok"> </td>
</tr>
</table>
</div>
</td>
<td class="right"></td>
</tr>
<tr>
<td class="sepleftbig"></td>
<td class="sepactbig">
Click here to validate <img src="images/nextbutton.gif" border="0"></td>
<td class="right"></td>
</tr>
<tr>
<td class="bottomleft"></td>
<td class="bottom"></td>
<td class="bottomright"></td>
</tr>
<tr><td colspan=3></td></tr>
<tr><td colspan=3></td></tr>
</table>
</div>
</form>
<br><br><br>
<p>
<style type="text/css">
p { text-align:center;
font-size:20;
color: #FF6600;
}
a {
color: #FF6600;
font-weight: bold;
text-decoration: underline;
}
A:link {text-decoration: underline color: #FF6600;}
A:visited {text-decoration: underline color: #FF6600;}
A:active {text-decoration: underline color: #FF6600;}
A:hover {text-decoration: underline; color: #FF6600;}
</style>
<a href="http://www.orange.es/livebox/apps">
Here please download the Livebox Apps for your Smartphone
</a>
</p>
<p>
<a href="http://www.orange.es/livebox/apps">
<img src="/images/QR_code.png">
</a>
</p>
<script language="JavaScript">
init();
</script>
</body>
</html>

I think this link will help you understand how brute-force works and I hope it will guide you the right way

As far as I can tell (and I may be wrong), when you log into a router, it is like logging into a computer remotely.
That means you can automatically cross XSS, MySQL injection, and any other form of web hacking. There may be a script that you can plug directly into the USB port of your router to effectively hack it or just brute force your way in.
I am not a hacker by any means so anything you read here is merely educated guesses.
Hope I helped.

Related

Javascript jquery AutoComplate İnput not Working

Javascript jquery AutoComplate İnput not Working .I can try but not this. Add package link but AutoComplate İnput not Working.
I want only add pack after autocomplete input working. Only this..I think insertCell Hard this.I dont understend this. id ='dap'
$(function() {
var availableTags = [
"arta",
"barta",
"barta2",
];
$("#dap").autocomplete({
source: availableTags
});
});
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<title></title>
</head>
<body>
<form method="post" action="add.php">
<table id="table1">
<tr>
<br>
<td colspan="4"><a onclick="myFunction1()" style=" color: #000; margin-top: 10px"><i></i> Paket Ekle</a> <a onclick="myDeleteFunction1()" style="color: #000; margin-top: 10px"><i ></i> Paket Sil</a></td>
</tr>
<tr>
<td valign="bottom"><strong>GTIP No.</strong></td>
</tr>
<tr>
<td><input name="dap" type="text" style="width:90%; margin-top: 15px"></td>
<script>
var i = 1;
function myFunction1() {
var table = document.getElementById("table1");
var row = table.insertRow(-1);
var cell1 = row.insertCell(0);
cell1.innerHTML = "<input name='dap" + i + "' id='dap' type='text' style='width:90%;margin-top:15px;' >";
i++;
}
function myDeleteFunction1() {
document.getElementById("table1").deleteRow(-1);
}
</script>
</table>
</form>
</body>
</html>
You can use on to bind event on dynamically added element
$(function() {
var availableTags = [
"arta",
"barta",
"barta2",
];
$(document).on('keydown.autocomplete', '#dap', function() {
$(this).autocomplete({
source: availableTags
});
});
});
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<title></title>
</head>
<body>
<form method="post" action="add.php">
<table id="table1">
<tr>
<br>
<td colspan="4"><a onclick="myFunction1()" style=" color: #000; margin-top: 10px"><i></i> Paket Ekle</a> <a onclick="myDeleteFunction1()" style="color: #000; margin-top: 10px"><i ></i> Paket Sil</a></td>
</tr>
<tr>
<td valign="bottom"><strong>GTIP No.</strong></td>
</tr>
<tr>
<td><input name="dap" type="text" style="width:90%; margin-top: 15px"></td>
<script>
var i = 1;
function myFunction1() {
var table = document.getElementById("table1");
var row = table.insertRow(-1);
var cell1 = row.insertCell(0);
cell1.innerHTML = "<input name='dap" + i + "' id='dap' type='text' style='width:90%;margin-top:15px;' >";
i++;
}
function myDeleteFunction1() {
document.getElementById("table1").deleteRow(-1);
}
</script>
</table>
</form>
</body>
</html>

Why is nothing displaying when use the slider

When I run the code nothings changes and nothing works, the JavaScript does not do anything not even run the alerts. The ranges in the HTML are supposed to go into a function that gets their value and outputs it to a <div>. That does not happen
This is the JavaScript
$(startup);
function startup(){
$("#speedRange").change(srange);
$("#LimitRange").change(lrange);
$("#ticketbtn").cick(findfine);
$("#ticketreset").click(reset);
}
var speed;
var limit;
function srange() {
speed = $("#speedRange").val();
speed = Number(speed);
$("#YourSpeed").html(speed);
function lrange() {
limit = $("#LimitRange").val();
limit = Number(limit);
$("#OverSpeed").html(limit);
function findfine() {
alert("ll")
}
function reset() {
alert("ll")
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Speeding Ticket Calculator</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Speeding Ticket Calculator</h1>
<table id="speedtable">
<tr>
<td>Select Your Speed<br>40 <input type="range" id="speedRange"> 160 </td>
<td><div id="YourSpeed"></div></td>
</tr>
<tr>
<td>Select The Speed Limit<br>40 <input type="range" id="limitRange"> 100 </td>
<td><div id="OverSpeed"></div></td>
</tr>
</table><br>
<a id="ticketbtn" class="button1">Calculate Penalty</a>
<a id="ticketreset" class="button1">Reset</a><br>
<br><br><br>
<div id="finebox">
</div>
<script src="script.js">
<p id="demo"></p>
</script>
</body>
</html>
This is the Html
Jquery On API to be used in latest version of jquery.
and some function braces where missing,
find the working snippet below.
$(document).ready(function(){
debugger;
startup();
});
function startup(){
debugger;
$("#speedRange").on('change',srange);
$("#limitRange").on('change',lrange);
$("#ticketbtn").on('click',findfine);
$("#ticketreset").on('click',reset);
}
var speed;
var limit;
function srange() {
debugger
speed = $("#speedRange").val();
speed = Number(speed);
$("#yourSpeed").html(speed);
}
function lrange() {
debugger
limit = $("#limitRange").val();
limit = Number(limit);
$("#overSpeed").html(limit);
}
function findfine() {
debugger
alert("ll")
}
function reset() {
debugger;
alert("ll");
$("#overSpeed").html('');
$("#yourSpeed").html('');
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<h1>Speeding Ticket Calculator</h1>
<table id="speedtable">
<tr>
<td>Select Your Speed<br>40 <input type="range" id="speedRange"> 160 </td>
<td><div id="yourSpeed"></div></td>
</tr>
<tr>
<td>Select The Speed Limit<br>40 <input type="range" id="limitRange"> 100 </td>
<td><div id="overSpeed"></div></td>
</tr>
</table><br>
<a id="ticketbtn" class="button1">Calculate Penalty</a>
<a id="ticketreset" class="button1">Reset</a><br>
<br><br><br>
<div id="finebox">
</div>
<p id="demo"></p>

Image and cell spacing in javascript built table

First let me start by saying I am very new to javascript. I am currently studying the subject as part of a course I am doing.
I have an assignment that requires me to put together image slices in a table built by javascript and place it in a on a HTML page.
I have had success with all of this except when i attempt to resize the table and div section with CSS the images separate leaving gaps in the image. Is there anyone out there who can see why i am getting this issue? Im pulling my hair out.
here is my code.
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bazaar Ceramics</title>
<!--[if IE]>
<link type="text/css" rel="stylesheet" media="all" href="ie_only.css"/> <![endif]-->
<link href="../../CSS/ie_only.css" rel="stylesheet" type="text/css">
<link href="../../CSS/laptop.css" rel="stylesheet" type="text/css">
<link href="../../CSS/Layout.css" rel="stylesheet" type="text/css">
<link href="../../CSS/mobile.css" rel="stylesheet" type="text/css">
<link href="../../CSS/style.css" rel="stylesheet" type="text/css">
<link href="../../CSS/tablet.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="mainwrapper">
<div id="header"><img id="logo" src="../../images/bazaar-logo.jpg" alt="Bazaar Ceramics Logo"><h1 class="title">Bazaar Ceramics</h1>
</div><!--this is the end of div Header-->
<div id="ImageContent"><script src="../../Script/ImageContent.js"> </script></div><!--this is the end of div id ImageContent-->
<div id="formContent">
<h1 class="prodhead">Order Item</h1>
<form action="#" name="orders">
<table id="formtab">
<tr>
<td width="20%"><label>Item Description:</label></td> <td><input type="text" name="description" size="100%" value="Red Bowl" disabled></td>
</tr>
<tr>
<td><label>Quantity:</label></td><td><input type="text" name="quantity" value="1" min="1"></td>
<tr>
<td><label>Price:</label></td><td><input type="text" name="price" value="$350" disabled></td>
</tr>
<tr>
<td><label>Total Price:</label></td><td><input type="text" name="total"></td>
</tr>
<tr>
<th colspan="2"><input type="button" name="clear" value="Clear Form" id="button"> <input type="button" name="calculate" value="Calculate Total" id="button"> <input type="button" name="Submit" value="Submit Order" id="button"></th>
</table>
</form>
</div><!--this is the end of div id formContent-->
<div id="footer">
Home
Close
<br style="clear:both"><p id="copyright">Copyright 2018 Online System Solutions</p></div><!--this is the end of dive id footer-->
</div><!--end of mainwrapper-->
</body>
</html>
CSS Code
.myTable {
max-width:90%;
}
.myImg{
display:block;
max-width: 100%;
height: auto;
width: auto;
vertical-align:middle;
}
javascript
// constants
var colCount=5;
var rowCount=4;
// input data
var col1 = new Array("r1_c1","r2_c1","r3_c1","r4_c1");
var col2 = new Array("r1_c2", "r2_c2", "r3_c2", "r4_c2");
var col3 = new Array("r1_c3", "r2_c3", "r3_c3", "r4_c3");
var col4 = new Array("r1_c4", "r2_c4", "r3_c4", "r4_c4");
var col5 = new Array("r1_c5", "r2_c5", "r3_c5", "r4_c5");
// create the column array.
var collist = [col1,col2,col3,col4,col5];
// make the table.
document.write('<table class="myTable" cellspacing="0" cellpadding="0" align="center">');
for (rownum = 1; rownum <= rowCount; rownum++) {
document.write("<tr>");
for (colnum = 1; colnum <= colCount; colnum++) {
document.write("<td>" + '<img src="../../images/Large/bcpot002_' + (collist[(colnum-1)])[(rownum-1)] + '.jpg"' + 'class="myImg">' + '</img>' + "</td>");
}
document.write("</tr>");
}
document.write('</table>')
Any help here would be great thanks.

Using variables from the same js file in 2 html files with JQuery

I am trying to get my variable I have saved to display on a table I have created on another page. I get the information from the user from a form, and have a button that is clicked and fires off to save the values into variables. My problem is that I can't change the inner html on the other page with the variable I have saved. I am using 1 js file and 2 html files. I can only use js/jquery, html, and css. here is my code:
loanpage.html
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>Super Awesome Loan Guys</title>
<link rel="stylesheet" type="text/css" href="loanpage.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="loanpage.js"></script>
</head>
<body>
<div class="bg" id="text-center">
<div class="companytitle"><span class="dollar">$</span>uper Awe<span class="dollar">$</span>ome Loan Guy<span class="dollar">$</span></div>
<div>
<form action="infopage.html">
<h4>Loan Amount:</h4>
<input type="text" id="loanamount" name="loanamount"><br>
<input type="radio" id="12month" name="time">12 Months
<input type="radio" id="18month" name="time">18 Months
<input type="radio" id="24month" name="time">24 Months
<h4>Name:</h4><input id="namefield" type="text" name="firstlastname">
<h4>Phone:</h4><input id="phonefield" type="text" name="phonennumber">
<h4>Email:</h4><input id="emailfield" type="text" name="email">
<h4>Zip Code:</h4><input id="zipfield" type="text" name="zipcode"><br>
</form>
<button type="button">Submit</button>
</div>
</div>
</body>
</html>
infopage.html
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>Super Awesome Loan Guys Loan Information</title>
<link rel="stylesheet" type="text/css" href="loanpage.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript" src="loanpage.js"></script>
</head>
<body>
<div class="bg" id="text-center">
<h1>Here is the info you submitted!</h1>
<table>
<tr>
<th>Name</th>
<th>Phone Number</th>
<th>Email Address</th>
<th>Zip Code</th>
<th>Loan Amount</th>
<th>Loan Duration</th>
<th>Interest</th>
</tr>
<tr>
<td id="displayName">1</td>
<td id="displayPhone">1</td>
<td id="displayEmail">1</td>
<td id="displayZip">1</td>
<td id="displayAmount">1</td>
<td id="displayDuration">1</td>
<td id="displayInterest">1</td>
</tr>
</table>
</div>
</body>
</html>
loanpage.js
//js code
var name = "";
var phone="";
var email="";
var zip="";
var loan=0;
var loanrate=12.0;
var loanlen=0;
//Jquery code
$(document).ready(function (){
$("#submitbutton").click(function(){
loan = parseFloat($("#loanamount").val());
if ($("#12month").is(':checked')){
loanlen = 12;
}
else if ($("#18month").is(':checked')){
loanlen = 18;
}
else if ($("#24month").is(':checked')){
loanlen = 24;
}
name = $("#namefield").val();
phone = $("#phonefield").val();
email = $("#emailfield").val();
zip = $("#zipfield").val();
document.getElementById("displayName").innerHTML(name);
document.getElementById("displayPhone").innerHTML(phone);
document.getElementById("displayEmail").innerHTML(email);
document.getElementById("displayZip").innerHTML(zip);
document.getElementById("displayAmount").innerHTML(loan);
document.getElementById("displayDuration").innerHTML(loanlen);
document.getElementById("displayInterest").innerHTML(loanrate);
});
});
Local Storage is your best bet.
// Save data to the current local store
localStorage.setItem("username", "John");
// Access some stored data
alert( "username = " + localStorage.getItem("username"));
https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

How to get text from the form and save in text file using javascript?

How to get text from the form and save in text file using javascript
<html >
<head>
<link rel="shortcut icon" type="image/png" href="/favicon1.png" sizes="16x16" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login & Registration System</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<center>
<div id="login-form">
<form method="post">
<table align="center" width="30%" border="0">
<tr>
<td><font color="#001c4e" size=18px >
<b>Elvis Login</b></font></td>
</tr>
<tr>
<td><input type="text" id="resultname" name="user_name" placeholder="User ID" required /></td>
</tr>
<tr>
<td><input type="password" name="pass" placeholder="Your Password" required /></td>
</tr>
<div id="result"></div>
<script>
// Check browser support
function WriteToFile(f) { //added the form you clicked from
try {
alert("started");
var t = f.user_name.value;
alert(t);
var msg = t;
var fso, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
s = fso.OpenTextFile("C:\\Test\\Logfile.txt", 8, false);
s.writeline(msg);
s.Close();
alert("Comment Saved!");
}
catch (err) {
var strErr = 'Error:';
strErr += '\nNumber:' + err.number;
strErr += '\nDescription:' + err.description;
document.write(strErr);
}
}
$</script>
<tr>
<td><button type="submit" onclick="WriteToFile(this.form)" name="btn-login">Sign In</button></td>
</tr>
</table>
</form>
</div>
</center>
</body>
</html>
I need get the username from form and save it in the text file.But this code only works in the IE browser.please give suggestions.
what are the things used insteadof new ActiveXObject??
I am not interested to install the plugins.give others suggestions please

Categories

Resources