2013-05-06 86 views
0

我想访问我的Powerschool(powerschool.avon.k12.ct.us),我发现每次输入密码和用户名都很麻烦。为了试图解决这个我下载了页面的源代码在Chrome中,如下:我该如何修改一个.html文件,每次给输入字段提供硬编码输入?

<!DOCTYPE html> 
<!-- saved from url=(0052)http://powerschool.avon.k12.ct.us/guardian/home.html --> 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 

<title>Parent Sign In</title> 
<meta http-equiv="X-UA-Compatible" content="IE=8"> 
<meta name="robots" content="noindex"> 
<link href="./Powerschool_files/screen.css" rel="stylesheet" type="text/css" media="screen"> 

<meta name="viewport" content="width=device-width"> 
<script src="./Powerschool_files/jquery-1.4.2.min.js"></script><style type="text/css"></style> 
<script language="JavaScript" src="./Powerschool_files/md5.js" type="text/javascript"></script> 
<script language="JavaScript" type="text/javascript"><!-- 
var pskey = "4EDE156E2FAD0F1A427D2AD066530F496ADC3EEA78CE43E70F28053576FD4EA1"; 
//--> 
</script> 
<script language="JavaScript" type="text/javascript"> 
function deleteCookie(cookieName){ 
    var cookieDate = new Date(); 
    cookieDate.setTime(cookieDate.getTime()-1); 
    document.cookie = cookieName + "=; expires='" + cookieDate.toGMTString()+"'; path=/"; 
} 
deleteCookie("InformAuthToken"); 

function getURLParameter(name) { 
    return unescape(
     (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] 
    ); 
} 

var $j = jQuery.noConflict(); 
$j(document).ready(function() { 
    // Hide or show the translator login input field 
    // if the URL parameter "translator" is present 
    var translator = getURLParameter("translator"); 
    if (translator == "null") { 
     $j('#translatorInput').hide(); 
    } else { 
     if (translator == "true") { 
      $j('#translatorInput').show(); 
     } else { 
      $j('#translatorInput').hide(); 
     } 
    } 
    $j('a.popWin').click(function(){ 
     var winURL = $j(this).attr('href'); 
     window.open(winURL); 
     return false; 
    }); 
}); 
</script> 
</head> 
<body class="pslogin" id="palogin"> 
<div id="container"> 
    <div id="branding-powerschool"><img src="./Powerschool_files/ps7-logo-lrg.png" alt="PowerSchool" width="280" height="41"></div> 
    <div id="content" class="group"> 
<form action="./Powerschool_files/Powerschool.htm" method="post" name="LoginForm" target="_top" id="LoginForm" onsubmit="doPCASLogin(this);"> 
    <input type="hidden" name="pstoken" value="2465670387a1nxrEimrKqPMN0c7QbxxKLNZe16PRC"> 
    <input type="hidden" name="contextData" value="4EDE156E2FAD0F1A427D2AD066530F496ADC3EEA78CE43E70F28053576FD4EA1"> 
    <input type="hidden" name="dbpw" value=""> 
    <input type="hidden" name="translator_username" value=""> 
    <input type="hidden" name="translator_password" value=""> 
    <input type="hidden" name="translator_ldappassword" value=""> 

<input type="hidden" name="returnUrl" value=""> 
<input type="hidden" name="serviceName" value="PS Parent Portal"> 
<input type="hidden" name="serviceTicket" value=""> 
<input type="hidden" name="pcasServerUrl" value="/"> 
<input type="hidden" name="credentialType" value="User Id and Password Credential"> 







       <h2>Parent Sign In</h2> 
     <!--box content--> 

    <div id="noscript" class="feedback-alert" style="display: none;"> To sign in to PowerSchool, you must use a browser that supports and has JavaScript enabled. </div> 
    <fieldset id="login-inputs" class="group"> 

     <div> 
       <label>Username</label> 
       <input type="text" id="fieldAccount" name="account" value="" size="39"> 
     </div> 
     <div> 
       <label>Password</label> 
       <input type="password" name="pw" value="" size="39"><div id="login-help"><a href="http://powerschool.avon.k12.ct.us/public/logonhelp.html">Having trouble signing in?</a></div> 
     </div> 
     <div id="translatorInput" style="display: none;"> 
       <label>Translator Sign In</label> 
       <input type="password" name="translatorpw" value="" size="39"> 
     </div> 
     <div class="button-row"> 
     <button type="submit" id="btn-enter" title="Sign In To PowerSchool Parent Access" value="Enter" border="0">Sign In</button> 
     </div> 
    </fieldset> 

     <!-- box content--> 


</form> 


</div> 
<div id="footer" class="group"> 
    <p>Copyright© 2005 - 2013 Pearson Education, Inc., or its affiliate(s). All rights reserved.</p> 
    <p id="pearsoncorplink"><a href="http://www.facebook.com/powerschool" class="popWin fb" title="Join us on Facebook">Join us on Facebook</a></p> 
</div> 

</div> 
<div id="branding-pearson"> 
    <div id="logo-pearson"></div> 
    <div id="tagline-pearson"></div> 
</div> 
<script type="text/javascript"> 
    /** 
    * Set the page's locale via a request_locale URL parameter. If there is already a URL parameter by 
    * this name, then substitute it with the passed-in locale. NOTE: This function will actually cause the page 
    * to be re-submitted with the new locale, so it really should not be used with pages submitted via POST 
    * requests (if there are any, which I hope there are not). 
    * @param locale the locale to set (e.g. en_US) 
    */ 
    function setPageLocale (locale) { 
     var c=String (window.location); 
     var rlpos = c.indexOf("request_locale="); 
     var afterPart = ""; 
     if (rlpos > 0) { 
     var afterBegin = c.indexOf("&", rlpos); 
     if (afterBegin > 0) { 
      afterPart = c.substring(afterBegin); 
     } 
     c = c.substring(0, rlpos-1); 
     } 
     var s=(c.indexOf('?') > 0 ? '&' : '?'); 
     var np = c + s + 'request_locale=' + locale + afterPart; 
     window.location = np; 
    } 

    function jsCheck() { 
      document.getElementById("login-inputs").className = 'group'; 

    } 
jsCheck(); 
</script> 

<script> 
$j('#noscript').hide(); 
function jsEnabled() { 
    if(typeof $j != 'function'){ 
     alert('Developer: This page is missing key components required for functionality!\n\nPossible causes include:\n - Commonscripts might be missing.\n - Page customization might enabled, and incomplete.'); 
     //document.write('<script...'); 
     } else { 
     $j('#login-inputs').removeClass('hide'); 
     $j("#fieldAccount").focus(); 
    } 
} 
$j(document).ready(function(){ 
    jsEnabled(); 
}); 

</script> 


</body></html> 

我想知道是否有可能直接修改下载源自动填写输入框(在下面的框是我认为它将完成)始终填写用户名和传递字段与“myUsername”和“myPassword,”或类似的东西。我尝试设置输入用户名和字段的值,但(铬)给了我一个,如下所示:

No webpage was found for the web address: file:///C:/Users/Me/Desktop/Powerschool_files/Powerschool.htm 

Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found.

。你们知道怎么可以这样做?

回答

0

您可能可以使用Chrome自动记住您的密码,但您拥有的应该是实际的工作。你只需要改变任何路径到URL以使其完美工作。一说你一定要改变的是形式action

- ./Powerschool_files/Powerschool.htm 
+ https://example.com/Powerschool_files/Powerschool.htm 

这应该允许,除非他们有在我看不到形式的CSRF令牌,你可以直接提交给该网站。

+0

Example.com?这应该是网站的地址吗? – pipsqueaker117 2013-05-07 01:16:38

+0

当我将其修改为正确的值时,chrome将其地址栏中的文件路径打开。当我点击提交页面刷新并转到实际的网页,空白字段。任何想法发生了什么? – pipsqueaker117 2013-05-07 01:28:58

+0

@ pipsqueaker117 no;我认为你的表单行为仍然不正确 – 2013-05-07 14:07:23

1

而不是复制整个页面,可能更简单的做一个书签填写表单。只要编辑一个正常的书签,并更改链接是这样的:

javascript:(function() { document.forms[0].elements[0].value="hi" })() 

,将设置第一个字段的值,在第一种形式。 (可能需要一些试验来查看哪些表格编号和哪个字段编号。)

相关问题