0

我想访问我的 Powerschool (powerschool.avon.k12.ct.us),我发现每次都需要输入我的密码和用户名相当乏味。为了尝试解决这个问题,我在 Chrome 中下载了该页面的源代码,如下所示:

<!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”传递字段,或类似的东西。我尝试设置输入和用户名字段的值,但是(chrome)给了我一个,如下所示:

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.

你们知道如何做到这一点吗?

4

2 回答 2

1

与其复制整个页面,不如制作一个填写表格的书签可能更简单。只需编辑一个普通书签并将链接更改为:

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

这将设置第一个表单中第一个字段的值。(可能需要进行一些试验才能查看哪个表格编号和哪个字段编号。)

于 2013-05-06T22:01:55.023 回答
0

您可能可以使用 Chrome 自动为您记住密码,但您所拥有的应该确实有效。您只需要更改任何指向 url 的路径即可使其完美运行。您肯定需要更改的一种形式是action

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

这应该允许您直接提交到该站点,除非他们有我看不到的形式的 CSRF 令牌。

于 2013-05-06T21:52:11.040 回答