exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Carbylamine PHP Encoder

Carbylamine PHP Encoder
Posted Mar 15, 2012
Authored by Prakhar Prasad | Site code.google.com

Carbylamine PHP Encoder is a PHP Encoder for obfuscating/encoding PHP files so that antivirus detection signatures can be bypassed.

tags | tool, php, rootkit
systems | unix
SHA-256 | 6f197acdeea20ab9bfd507bc9b7b41f814bbf276f8f26d7b7d2f1d89744c1b14

Carbylamine PHP Encoder

Change Mirror Download
<?php
function rstr() //Random String Function
{
$len=rand(3,6);
$chr='';
for($i=1;$i<=$len;$i++)
{
$chr.=rand(0,1) ? chr(rand(65,90)) : chr(rand(97,122));
}
return $chr;
}
function enjumble($data) //Custom Encoding + Base64 + gzinflate()
{
for($i=0;$i<strlen($data);$i++)
{
$data[$i]=chr(ord($data[$i])+1);
}
return base64_encode(gzdeflate($data,9));
}
function striptag($in) //Remove '<?php' from initial code
{
$pos = strpos($in,"<?php"); //to do: add support for short_tags
if(is_numeric($pos))
{
for($i=$pos;$i<=$pos+4 && strlen($in) >=5;$i++)
{
$in[$i]=' ';
}
return $in;
}
else
{
return $in;
}
}
function makeoutfile($str)
{ $funcname=rstr();
$varname='$'.rstr();
$template=
"<?php function ".$funcname."($varname)
{
$varname=gzinflate(base64_decode($varname));
for(\$i=0;\$i<strlen($varname);\$i++)
{
".$varname."[\$i] = chr(ord(".$varname."[\$i])-1);
}
return $varname;
}eval($funcname(\"";
$str=enjumble($str);
$template = $template . $str."\"));?>";
return $template;
}
function main($argc,$argv)
{
$banner=
"\n +-------------------------------------------------------------------+
|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
|+ +|
+____ _ _ _ +|
/ __ \ | | | | (_) +|
| / \/ __ _ _ __ | |__ _ _ | | __ _ _ __ ___ _ _ __ _+|_
| | / _` || '__|| '_ \ | | | || | / _` || '_ ` _ \ | || '_ \ / _ \
| \__/\| (_| || | | |_) || |_| || || (_| || | | | | || || | | || __/
\____/ \__,_||_| |_.__/ \__, ||_| \__,_||_| |_| |_||_||_| |_| \___|
|+ __/ | +|
|+ Carbylamine PHP Encoder +|
|+ v0.1.1 Nightly +|
|+ +|
|+ +|
|+ Coded by Prakhar Prasad +|
|+ (prakharpd@gmail.com) +|
|+ +|
|+ +|
|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
+-------------------------------------------------------------------+\n\n";
$usage="$banner Syntax: ".$_SERVER['PHP_SELF']." <file to encode> <output file>\n";
if($argc==1) {echo $usage ; die();}
if($argc>1) $file = $argv[1];
if($argc>2) $outfile = $argv[2];
if(empty($file) || empty($outfile)) { echo "Input/Output filename not entered!\n\n\x07" ;die();}
if(!file_exists($file))
{
echo "$banner Error: Input file doesn't exist\n\n\x07";
}
else{
$orginal_size=round(filesize($file)/1024,2);
echo "$banner Encoding : $file ($orginal_size KB) \n\n ";
$output_filename=$outfile;
$outfile=fopen($outfile,'w+');
$file=fread(fopen($file,'r'),filesize($file));
$outdata=makeoutfile(striptag($file));
$newsize=round(strlen($outdata)/1024,2);
echo " Compression : ".@round(100-(($newsize*100)/($orginal_size!=0?$orginal_size:1)),2)."%\n\n";
if(!fwrite($outfile,$outdata))
{
echo " Unable to write to $output_filename\n\n\x07";
}
else
{
echo " Successfully Encoded! to $output_filename\n\n" ;
}}}
main($argc,$argv);
?>
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    53 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close