Haha .. This item is fresh.
Via:Http://hi.baidu.com/secbug/
Code:
<Form>
<Label for = "target"> target </label> <br/>
<Input type = "text" name = "target" value ="
Www.gnucitizen.org "/> <br/>
<Label for = "port"> port </label> <br/>
<Input type = "text" name = "port" value = "80"/> <br/>
<P> you can use sequence as well 8080, </p>
<Label for = "timeout"> timeout </label> <br/>
<Input type = "text" name = "timeout" value = "1000"/> <br/>
<Label for = "result"> result </label> <br/>
<Textarea id = "result" name = "result" rows = "7" cols = "50"> </textarea> <br/>
<Input class = "button" type = "button" value = "scan" onClick = "javascript: scan (this. form)"/>
</Form>
<Script>
Var AttackAPI = {
Version: 0.1,
Author: Petko Petkov (effecect ),
Homepage: http://www.gnucitizen.org };
AttackAPI. portshares = {};
AttackAPI. portport. scanPort = function (callback, target, port, timeout ){
Var timeout = (timeout = null )? 100: timeout;
Var img = new Image ();
Img. onerror = function (){
If (! Img) return;
Img = undefined;
Callback (target, port, open );
};
Img. onload = img. onerror;
Img. src = http: // + target ++: + port;
SetTimeout (function (){
If (! Img) return;
Img = undefined;
Callback (target, port, closed );
}, Timeout );
};
AttackAPI. portmask. scanTarget = function (callback, target, ports, timeout)
{
For (index = 0; index <ports. length; index ++)
AttackAPI. portport. scanPort (callback, target, ports [index], timeout );
};
</Script>
<Script>
Var result = document. getElementById (result );
Var callback = function (target, port, status ){
Result. value + = target +: + port ++ status + "";
};
Var scan = function (form ){
AttackAPI. porttarget. scanTarget (callback, form.tar get. value, form. port. value. split (,), form. timeout. value );
};
</Script>