Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "../config.inc";
- $query_search = $conn->prepare("SELECT * FROM CypherIT WHERE HWID = ?");
- $query_search->bind_param("s", $HWID);
- $query_search->execute();
- $query_search->store_result();
- $query_search->fetch();
- scanFile();
- /*if($query_search->num_rows > 0)
- {
- scanFile();
- }*/
- function scanFile()
- {
- $tempname = $_FILES["file"]["tmp_name"];
- $name = $_FILES["file"]["name"];
- $md5 = md5($tempname);
- $dir = "./" . $md5;
- //$fullpath = $dir . "/" . $name;
- $fullpath = "putty.exe";
- mkdir($dir);
- move_uploaded_file($tempname, $fullpath);
- $result = initiateRequest(true, $fullpath);
- $fhandle = fopen("logs.txt", "a");
- fwrite($fhandle, "\r\nResult : " . $result . "\r\n" . "Date : " . date("d/m/Y H:i:s") . "\r\n");
- recurseRmdir($dir);
- echo $result;
- }
- function initiateRequest($postGet=false, $file_path=null){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, 'https://dropmyb.in/upload.php?uploadKey=token');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $result = curl_exec($ch);
- if (curl_errno($ch)) {
- echo 'Error:' . curl_error($ch);
- }
- curl_close ($ch);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement