Skip to content

Commit

Permalink
reset..
Browse files Browse the repository at this point in the history
  • Loading branch information
phith0n committed Feb 3, 2020
1 parent 4f6b231 commit 7bc453f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions ffmpeg/CVE-2016-1897/www/index.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php
if(!empty($_FILES)) {
$filename = escapeshellarg($_FILES['file']['tmp_name']);
$newname = '/tmp/' . uniqid() . '.mp4';
$newname = './' . uniqid() . '.mp4';
shell_exec("ffmpeg -i $filename $newname");

$data = base64_encode(file_get_contents($newname));
}
?>
<html>
Expand All @@ -15,7 +13,7 @@
<body>
<?php if(!empty($_FILES)): ?>
<div>
<video src="data:video/mp4;base64,<?=$data?>" controls="controls" width="640" height="480"></video>
<video src="<?=$newname?>" controls="controls" width="640" height="480"></video>
</div>
<?php endif; ?>
<form method="post" enctype="multipart/form-data">
Expand Down
6 changes: 2 additions & 4 deletions ffmpeg/phdays/www/index.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php
if(!empty($_FILES)) {
$filename = escapeshellarg($_FILES['file']['tmp_name']);
$newname = '/tmp/' . uniqid() . '.mp4';
$newname = './' . uniqid() . '.mp4';
shell_exec("ffmpeg -i $filename $newname");

$data = base64_encode(file_get_contents($newname));
}
?>
<html>
Expand All @@ -15,7 +13,7 @@
<body>
<?php if(!empty($_FILES)): ?>
<div>
<video src="data:video/mp4;base64,<?=$data?>" controls="controls" width="640" height="480"></video>
<video src="<?=$newname?>" controls="controls" width="640" height="480"></video>
</div>
<?php endif; ?>
<form method="post" enctype="multipart/form-data">
Expand Down

0 comments on commit 7bc453f

Please sign in to comment.