Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>resultats bac 2013</title>
- <style type="text/css">
- body{width: 660px;margin:auto;margin-top:20px;margin-bottom:10px;}
- #majjbac {width:300px;font-Size : 20px;}
- #matriculebac {width:300px;font-Size : 48px;}
- </style>
- <script type="text/javascript">
- function entree(champs) {champs.style.backgroundColor='#AA0000';champs.style.color='#FFFFFF';champs.style.fontSize='48px'; }
- function sortie(champs){champs.style.backgroundColor='';champs.style.color='#777777';}
- </script>
- </head>
- <body>
- <div align="center" >
- <div align="center"><form action="" method="post" name="formbac" id="formbac" onsubmit=""><input type="text" name="matriculebac" id="matriculebac" value="" autocomplete="on" onclick="entree(this)" onfocus="entree(this)" onblur="sortie(this)" /><input type="text" name="matriculebac1" id="matriculebac" value="" autocomplete="on" onclick="entree(this)" onfocus="entree(this)" onblur="sortie(this)" /><br /><br /><input type="submit" name="dobac" id="majjbac" value="Get" /></form><br />
- <?php
- if(isset($_POST['matriculebac'])) {
- $part1 = $_POST['matriculebac'];
- $part2 = $_POST['matriculebac1'];
- for ($part1; $part1 <= $part2; $part1++) {
- $file = fopen("res.html","a");
- $res = post($part1);
- echo $res;
- }
- }
- function post($code){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http://ins.onec.dz/bac/index.php");
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"matriculebac=$code&dobac=%D8%A7%D8%B3%D8%AA%D8%B8%D9%87%D8%A7%D8%B1+%D8%A7%D9%84%D9%86%D8%AA%D9%8A%D8%AC%D8%A9");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_COOKIEFILE, "/");
- curl_setopt($ch, CURLOPT_COOKIEJAR, "/");
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- $result = curl_exec($ch);
- curl_close($ch);
- if(preg_match('/alert((.*));history.back()/', $result, $matches)){
- $mm = array('("','")');
- $result = str_replace($mm,"",$matches[1])."<br>----------------------------------------------------------<br>";
- $result = preg_replace("/\\\\n/", "<br />", $result);
- return $result;
- }
- }
- ?>
- </div></body></html>
Advertisement
Add Comment
Please, Sign In to add comment