Skip to content

Instantly share code, notes, and snippets.

@unostar
Created September 10, 2009 10:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unostar/184466 to your computer and use it in GitHub Desktop.
Save unostar/184466 to your computer and use it in GitHub Desktop.
fcop
<title>Keygen & ScriptDecryptor</title>
<form method="post">
<input type="file" name="path"><br>
<input type="submit" name="decrypt" value="Decrypt">
</form>
<form method="post">
<input type="file" name="path"><br>
<input type="submit" name="encrypt" value="Encrypt">
</form>
<form method="post">
Activation Web Address: <input type=text name="webroot" value="<?if (isset($_POST['webroot']))echo $_POST['webroot'];?>">
<select name="shortname">
<option value="contactform"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='contactform') echo' selected';?>>Contact Form</option>
<option value="csvimport"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='csvimport') echo' selected';?>>CSV Importer</option>
<option value="helpdesk"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='helpdesk') echo' selected';?>>Customer Helpdesk</option>
<option value="ecommerce"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='ecommerce') echo' selected';?>>eCommerce</option>
<option value="calendar"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='calendar') echo' selected';?>>Events Calendar</option>
<option value="faqsupport"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='faqsupport') echo' selected';?>>FAQ Support</option>
<option value="formdesign"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='formdesign') echo' selected';?>>Form Design</option>
<option value="forum"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='forum') echo' selected';?>>Forum</option>
<option value="geotraffic"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='geotraffic') echo' selected';?>>Geo Traffic</option>
<option value="guestbook"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='guestbook') echo' selected';?>>Guestbook</option>
<option value="linksdir"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='linksdir') echo' selected';?>>Links Directory</option>
<option value="misctool"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='misctool') echo' selected';?>>Misc Tools</option>
<option value="modbuild"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='modbuild') echo' selected';?>>Modules Builder</option>
<option value="newsletter"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='newsletter') echo' selected';?>>Newsletter</option>
<option value="newspublish"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='newspublish') echo' selected';?>>News Publisher</option>
<option value="photogallery"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='photogallery') echo' selected';?>>Photo Gallery</option>
<option value="votecaster"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='votecaster') echo' selected';?>>Vote Caster</option>
<option value="blogger"<?if (isset($_POST['shortname'])&&$_POST['shortname']=='blogger') echo' selected';?>>Web Blogger</option>
</select><br>
<input type="submit" name="keygen" value="Generate">
</form>
<?php
//class.item.php
function genKey41($webroot,$shortname,$version){
// MySQL -> sys_component -> "shortname" & "version"
// config.php -> $path["webroot"]
$key1='';$key3='';$key4='';
$webroot = strtolower(trim($webroot));
for($i=0;$i<strlen($webroot);$i++){
$alpha = substr($webroot,$i,+1);
$key1 = $key1 + getValue($alpha);
}
$shortname = strtolower(trim($shortname));
for($i=0;$i<strlen($shortname);$i++){
$alpha = substr($shortname,$i,1);
$key3 = $key3 + getValue($alpha);
}
$version = strtolower(trim($version));
for($i=0;$i<strlen($version);$i++){
$alpha = substr($version,$i,1);
$key4 = $key4 + getValue($alpha);
}
$hkey1 = ($key4 + $key3 * $key1) * 2;
$hkey2 = ($key1 * $key3 - $key1) * 3;
$hkey3 = ($key1 - $key3 * $key3) * 4;
$hkey4 = ($key1 + $key3 * $key4) * 5;
$ckey1 = substr(strtoupper(crypt($hkey1,$key1)),3,6);
$ckey1 = str_replace(".","T",$ckey1);
$ckey1 = str_replace("/","Q",$ckey1);
$ckey2 = substr(strtoupper(crypt($hkey2,$key1)),3,6);
$ckey2 = str_replace(".","J",$ckey2);
$ckey2 = str_replace("/","C",$ckey2);
$ckey3 = substr(strtoupper(crypt($hkey3,$key3)),3,6);
$ckey3 = str_replace(".","W",$ckey3);
$ckey3 = str_replace("/","Z",$ckey3);
$ckey4 = substr(strtoupper(crypt($hkey4,$key4)),3,6);
$ckey4 = str_replace(".","Y",$ckey4);
$ckey4 = str_replace("/","C",$ckey4);
return $ckey1."-".$ckey2."-".$ckey3."-".$ckey4;
}
function getValue($alpha){
switch($alpha){
case 'a': return 8037 ; break;
case 'b': return 1262 ; break;
case 'c': return 5401 ; break;
case 'd': return 3148 ; break;
case 'e': return 9621 ; break;
case 'f': return 3590 ; break;
case 'g': return 4099 ; break;
case 'h': return 1707 ; break;
case 'i': return 1027 ; break;
case 'j': return 2666 ; break;
case 'k': return 8753 ; break;
case 'l': return 6077 ; break;
case 'm': return 8408 ; break;
case 'n': return 5242 ; break;
case 'o': return 6646 ; break;
case 'p': return 5036 ; break;
case 'q': return 6112 ; break;
case 'r': return 7476 ; break;
case 's': return 6915 ; break;
case 't': return 2013 ; break;
case 'u': return 3501 ; break;
case 'v': return 7343 ; break;
case 'w': return 6968 ; break;
case 'x': return 5297 ; break;
case 'y': return 9468 ; break;
case 'z': return 4805 ; break;
case '0': return 1309 ; break;
case '1': return 3474 ; break;
case '2': return 4604 ; break;
case '3': return 9358 ; break;
case '4': return 4722 ; break;
case '5': return 6164 ; break;
case '6': return 7740 ; break;
case '7': return 7254 ; break;
case '8': return 3252 ; break;
case '9': return 1558 ; break;
default: return 9695 ; break;
}
}
if (file_exists('debug.info')) unlink('debug.info');
// Making debug
function debug($descr,$var){
/*
$fp = @fopen('debug.info','a') or die("can't open file");
fwrite($fp,"---------------------------------------------------------
$descr
---------------------------------------------------------
$var
");
fclose($fp);
*/
}
function get_file($path){
$it=@file($path) or die("can't open file");
$file=implode('', $it);
debug('get_file_plaintext',$file);
check_encryption($file);
$file=scopbin($file);
return $file;
}
function evaluate($file){
preg_match("|eval\(gzinflate\(base64_decode\('(.*?)'\s*\)\s*\)\s*\)\s*;|si",$file,$match);
$file=gzinflate(base64_decode($match[1]));
$search=array ("|^\?>\s*<\?|i","|\?>\s*<\?$|si");
$replace=array ("<?","?>");
$file=preg_replace($search,$replace,$file);
debug('evaluate_result',$file);
return $file;
}
function scopbin($file){
function A4540acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){return $Xew6e79316561733d64abdf00f8e8ae48;}
function b5434f0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){return $Xew6e79316561733d64abdf00f8e8ae48;}
function c43dsd0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){return $Xew6e79316561733d64abdf00f8e8ae48;}
function Xdsf0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){return $Xew6e79316561733d64abdf00f8e8ae48;}
function y0666f0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){$x0b43c25ccf2340e23492d4d3141479dc='';$x71510c08e23d2083eda280afa650b045=0;$x16754c94f2e48aae0d6f34280507be58=strlen($x897356954c2cd3d41b221e3f24f99bba);$x7a86c157ee9713c34fbd7a1ee40f0c5a=hexdec('&H'.substr($x276e79316561733d64abdf00f8e8ae48,0,2));for($x1b90e1035d4d268e0d8b1377f3dc85a2=2;$x1b90e1035d4d268e0d8b1377f3dc85a2<strlen($x276e79316561733d64abdf00f8e8ae48);$x1b90e1035d4d268e0d8b1377f3dc85a2+=2){$xe594cc261a3b25a9c99ec79da9c91ba5=hexdec(trim(substr($x276e79316561733d64abdf00f8e8ae48, $x1b90e1035d4d268e0d8b1377f3dc85a2, 2)));$x71510c08e23d2083eda280afa650b045=(($x71510c08e23d2083eda280afa650b045<$x16754c94f2e48aae0d6f34280507be58)?$x71510c08e23d2083eda280afa650b045 + 1:1);$xab6389e47b1edcf1a5267d9cfb513ce5=$xe594cc261a3b25a9c99ec79da9c91ba5 ^ ord(substr($x897356954c2cd3d41b221e3f24f99bba, $x71510c08e23d2083eda280afa650b045-1, 1));if($xab6389e47b1edcf1a5267d9cfb513ce5<=$x7a86c157ee9713c34fbd7a1ee40f0c5a)$xab6389e47b1edcf1a5267d9cfb513ce5=255+$xab6389e47b1edcf1a5267d9cfb513ce5-$x7a86c157ee9713c34fbd7a1ee40f0c5a;else $xab6389e47b1edcf1a5267d9cfb513ce5=$xab6389e47b1edcf1a5267d9cfb513ce5-$x7a86c157ee9713c34fbd7a1ee40f0c5a;$x0b43c25ccf2340e23492d4d3141479dc=$x0b43c25ccf2340e23492d4d3141479dc.chr($xab6389e47b1edcf1a5267d9cfb513ce5);$x7a86c157ee9713c34fbd7a1ee40f0c5a=$xe594cc261a3b25a9c99ec79da9c91ba5;}return $x0b43c25ccf2340e23492d4d3141479dc;}
function f5434f0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){if(file_exists($x456e79316561733d64abdf00f8e8ae48)){unlink($x456e79316561733d64abdf00f8e8ae48);};return $Xew6e79316561733d64abdf00f8e8ae48;}
function j43dsd0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){if(file_exists($x456e79316561733d64abdf00f8e8ae48)){unlink($x456e79316561733d64abdf00f8e8ae48);};return $Xew6e79316561733d64abdf00f8e8ae48;}
function hdsf0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){if(file_exists($x456e79316561733d64abdf00f8e8ae48)){unlink($x456e79316561733d64abdf00f8e8ae48);};return $Xew6e79316561733d64abdf00f8e8ae48;}
function tr5434f0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24f99bba,$x276e79316561733d64abdf00f8e8ae48){if(file_exists($x456e79316561733d64abdf00f8e8ae48)){unlink($x456e79316561733d64abdf00f8e8ae48);};return $Xew6e79316561733d64abdf00f8e8ae48;}
function f0666f0acdeed38d4cd9084ade1739498($x){return $x;}
function g0666f0acdeed38d4cd9084ade1739498($s){return (strstr($s,'echa')==false?(strstr($s,'print')==false)?(strstr($s,'sprint')==false)?(strstr($s,'sprintf')==false)?false:exit():exit():exit():exit());}
function hyr3dsd0acdeed38d4cd9084ade1739498($x897356954c2cd3d41b221e3f24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment