-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathserver.php
More file actions
executable file
·29 lines (29 loc) · 1.24 KB
/
Copy pathserver.php
File metadata and controls
executable file
·29 lines (29 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
if (isset($_GET['filename']) && isset($_GET['password'])){
$host = "hiddenduetosecurityreasons";
$username = "hiddenduetosecurityreasons";
$password = "hiddenduetosecurityreasons";
$link = mysqli_connect($host, $username, $password);
mysqli_select_db($link,"hiddenduetosecurityreasons");
$filename = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyz", 5)), 0, 5);
$command = "select * from data where savedname ='".$filename."';";
while (mysqli_num_rows(mysqli_query($link,$command)) != 0){
$filename = substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyz", 5)), 0, 5);
$command = "select * from data where savedname ='".$filename."';";
}
$command = "insert into data (filename,savedname,password) values ('" . $_GET['filename'] . "','" . $filename . "','" . $_GET['password'] . "');";
$result = mysqli_query($link,$command);
if ($result){
move_uploaded_file($_FILES["file"]["tmp_name"],'files/'.$filename);
echo "File Uploaded Successfully\n"
echo "Command to get your file 'get.py ".$filename."'\n";
echo "Or you can go to 'sharecode.co.nf/".$filename."'\n";
}
else{
echo "Some error occured please try again\n";
}
}
else{
echo "False";
}
?>