The soul of an empty prodigal soul
Read Monyer's article:
Iframe anti-plug and strong plug (2): The http://www.bkjia.com/Article/200902/31888.html code is as follows: JavaScript code
- <Script>
- Window. onload =Function(){
- If(Top! = Self ){
- VarF = document. createElement ("Form");
- F. action = location;
- F.tar get ="_ Parent";
- Document. body. appendChild (f );
- F. submit ();
- }
- };
- </Script>
Forced submission. I carefully read this article and then practiced it. I found that the two onloads will overwrite the previous onload.
And the protection code is in the "body" operation ".
Therefore, this code must be applied to the bottom of the page.
Look at the previous
Iframe protection plug and strong plug: http://www.bkjia.com/Article/200902/31827.html
Attackers can control at least a piece of JavaScript code, so they can "Force Insert ".
Finally, Monyer provides a solution.
But take a closer look, there are still a lot of problems.
There was a SLEEP function in YY and JS last night, so that the subsequent code could not be executed until "half a year", so his solution would be ineffective.
So the test was successful.
I chatted with you about this in the morning and was severely attacked. Originally, JS didn't have this function at all... The subsequent steps are indeed not executed (JS errors ). ...
After careful research, I finally thought of a method to crack it. HOOK...
Look at the code. I put the monyer code in and won't let it run smoothly.
JavaScript code
- <Head>
- </Head>
- <Body>
- Haha...
-
- </Body>
- <Script>
-
- Document. createElement =Function(Test)
- {
- VarF =NewObject ();
- F. action = location;
- F.tar get ="_ Parent";
-
- F. submit =Function(){};
- ReturnF;
- }
- Document. body. appendChild =Function(Test ){}
-
- Window. onload =Function() {Alert (1 );}
-
- // ------------------------------ The following is the Monyer method. Original copy.
- Window. onload =Function(){
- If(Top! = Self){
- VarF = document. createElement ("Form");
- F. action = location;
- F.tar get ="_ Parent";
- Document. body. appendChild (f );
- F. submit ();
- }
- };
- // Ad time http://www.inbreak.net
- Alert (Hackedbykxlzx);
- </Script>
Create a class to HOOK up all the things used in this method... Hey hey... At the same time, ensure that the subsequent JavaScript code is correctly executed.