Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation javascript revealing answers script help

    Hi I'm Terbinafine

    I do online school, and it utilizies a popular, virtual education system known as "OdysseyWare". I found a javascript 'cheat' per se, online, which is supposed to reveal the answers to your questions. Here's an example of the source code for a multiple choice question:
    Code:
    <div class="question_body"><textarea style="display: none;" id="athena-init-args-13">[]</textarea><script type="text/javascript">
                    Nevow.Athena.Widget._widgetNodeAdded(13);
                    </script><div athena:class="ShowAssignment.QuestionHelp" xmlns:athena="http://divmod.org/ns/athena/0.7" id="athena:13"><div><div id="question_help_3"><table class="question_help_table_hidden" id="question_help_table_3"><tbody><tr class="help_table_header"><td>Note to teacher:</td></tr><tr><td class="help_table_notecell"><div class="help_table_notearea" id="help_studentnote_3"></div></td></tr><tr class="help_table_header"><td>Note from teacher:&nbsp;</td></tr><tr><td class="help_table_notecell"><div class="help_table_notearea" id="help_teachernote_3"></div></td></tr></tbody></table></div></div></div><span class="empty_container"><p style="font-weight: bold;">Any particular element can always be identified by its _____.</p></span><div id="multiple_choice_radios_3"><input name="mc_radio_3" value="V1" class="radio_input" onclick="ShowAssignment.MultipleChoice.get(this).checkAnswer('3', 'V1');" id="radio_id_3_V1" type="radio"><span class="item_normal" id="multiplechoice_item_3_V1"><span class="empty_container">number of electrons</span></span><br><input name="mc_radio_3" value="V2" class="radio_input" onclick="ShowAssignment.MultipleChoice.get(this).checkAnswer('3', 'V2');" id="radio_id_3_V2" type="radio"><span class="item_normal" id="multiplechoice_item_3_V2"><span class="empty_container">number of protons</span></span><br><input name="mc_radio_3" value="V3" class="radio_input" onclick="ShowAssignment.MultipleChoice.get(this).checkAnswer('3', 'V3');" id="radio_id_3_V3" type="radio"><span class="item_normal" id="multiplechoice_item_3_V3"><span class="empty_container">number of neutrons</span></span><br><input name="mc_radio_3" value="V4" class="radio_input" onclick="ShowAssignment.MultipleChoice.get(this).checkAnswer('3', 'V4');" id="radio_id_3_V4" type="radio"><span class="item_normal" id="multiplechoice_item_3_V4"><span class="empty_container">atomic mass</span></span><br></div></div>
    This is the first script for revealing answers:
    Code:
    eval( 
      function(p,a,c,k,e,r){ 
        e = function(c){ 
          return ( c<a ? '' : e(parseInt(c/a) ) ) + ( (c=c%a)>35 ? String.fromCharCode(c+29) : c.toString(36) ) 
        }; 
        if(!''.replace(/^/,String)){ //Always true? 
          while(c--){ 
            r[e(c)]=k[c]||e(c); 
          } 
          k = [ function(e){ return r[e] } ]; 
          e = function(){ 
                return '\\w+' 
              }; 
          c=1 
        }; 
        while(c--){ 
          if(k[c]){ 
            p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]); 
          } 
        } 
        return p; 
      } 
      ( //Args p, a, c, k, e and r for the function 
        '3 6=q G();j i(a){3 b=7.g;3 c=a+"=";3 d=b.8("; "+c);4(d==-1){d=b.8(c);4(d!=0)o K}l d+=2;3 e=7.g.8(";",d);4(e==-1)e=b.9;o x(b.w(d+c.9,e))}j f(){3 D=q u;3 a=D.t();3 b=i("h");3 c=a-b;6.s(0,0,c);4(6.9>5){6.O()}4(c<N){7.M.L="<n>I H C B E F A z a y J. <k/><k/><m>("+6.v(\', \')+")</m></n>"}l{7.g="h="+a;r("f()",p)}}r("f()",p);', 
        51, 
        51, 
        '|||var|if||diffHistory|document|indexOf|length||||||securityCheck|cookie|timestamp|getCookie|function|br|else|small|center|return|3500|new|setTimeout|splice|getTime|Date|join|substring|unescape|single|in|used|designed|is||to|be|Array|application|This|window|null|innerHTML|body|3000|pop'.split('|'), //This will be an array 
        0, 
        {} //This is an object 
      ) 
    ) 
    
    //Produces this code? 
    var diffHistory = new Array(); 
    function getCookie(a){ 
      var b = document.cookie; 
      var c = a+"="; 
      var d = b.indexOf("; "+c); 
      if(d==-1){ 
        d=b.indexOf(c); 
          if(d!=0)return null 
      }else d+=2; 
      var e=document.cookie.indexOf(";",d); 
      if(e==-1)e=b.length; 
      return unescape(b.substring(d+c.length,e)) 
    } 
    function securityCheck(){ 
      var D=new Date; 
      var a=D.getTime(); 
      var b=getCookie("timestamp"); 
      var c=a-b;diffHistory.splice(0,0,c); 
      if(diffHistory.length>5){ 
        diffHistory.pop() 
      } 
      if(c<3000){ 
        document.body.innerHTML="\nThis application is designed to be used in a single window.\n\n(" + diffHistory.join(', ') + ")\n" 
      }else{ 
        document.cookie="timestamp="+a; 
        setTimeout("securityCheck()",3500) 
      } 
    } 
    setTimeout("securityCheck()",3500); 
    
    //To mod it just overload securityCheck() with another function

    that's one script that reveals the answer and this is another script that's similar:

    Code:
    //jQuery.noConflict();var activeAnswer = null;var param1_last = null;var param2_last = null;function studentAnswer(param1, param2, el){//console.log("param1: " + param1);//console.log("param2: " + param2);if (activeAnswer != null) {//console.log('unShow: ' + activeAnswer);ShowAssignment.QuestionSubHeader.get(document.getElementById(activeAnswer)).unShowKey(param1_last, param2_last, 'true');}if(activeAnswer == el.id){activeAnswer = null;return false;}activeAnswer = el.id;param1_last = param1;param2_last = param2;ShowAssignment.QuestionSubHeader.get(document.getElementById(activeAnswer)).showKey(param1, param2, 'true');//console.log("Show: " + activeAnswer);}
    This is the website portal page where we login "wcsd.owotw.com". How would I utilize one of these scripts so I could use it. I'd imagine it has to be part of the webpage somehow but I have not a clue.

    PS - I know cheating is bad but you don't understand my situation. I've covered all this work they're assigning me on here last year and the questions are not worded correctly and are misleading and confusing. Regular school is better, this is just awful, its just the same units over and over.
    Last edited by Terbinafine; 08-12-2010 at 05:13 PM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    No way will anyone here assist you with dishonesty. You cannot go through life expecting to cheat your way to a successful outcome. Your situation is no different to any other student in your class.

  • #3
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    No way will anyone here assist you with dishonesty. You cannot go through life expecting to cheat your way to a successful outcome. Your situation is no different to any other student in your class.

    quite the opposite. I go to an alternative night school for one mistake I made in public school. I'm the only one who cares about my education, everyone else there just plays computer games and act up and the teachers don't seem to care. You don't know one's situation until you actually experience it.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    I meant that "the questions are not worded correctly and are misleading and confusing" applies just as much to the other students.

  • #5
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    I meant that "the questions are not worded correctly and are misleading and confusing" applies just as much to the other students.
    Well it most likely would if they took the time to login for once.

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Quote Originally Posted by Terbinafine View Post
    Well it most likely would if they took the time to login for once.
    So, why should you care if they throw away their life's chances?

  • #7
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    So, why should you care if they throw away their life's chances?
    It annoys me that I'm the only one that at least tries. I'm just that type of person, but you wouldn't be able to point me at another website that could possibly help me out?

  • #8
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,080
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Have a look at

    http://www.bop.gov/


  • #9
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    Have a look at

    http://www.bop.gov/

    Extremely hilarious, it seems as if every forum has a user that just loves to get his post count up.

    + kudos for being a prick.

  • #10
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Please keep it civil gentleman.

    Terbinafine please refer to our rules: http://www.codingforums.com/rules.htm §1.4 which qualifies as attempting to circumvent the security in use by the system. We cannot help you with such requests as these.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •