[CODE]<?php
/*
Lua Mounter made for Gmod.biz by Impulsive.
Version: 1.0.1
Notes:
Next version will be faster.
*/
error_reporting(E_ALL ^ E_STRICT);
class luamount
{
/* Generate private glabal values for access later. */
private $file;
private $name;
private $hash;
/* Create mount function. */
public function mount ( )
{
/* Scan payload for all files. */
$payload = scandir ( "payload/" );
/* Foreach files */
foreach ( $payload as $level => $file )
{
/* Skip first two iterations. */
if ( @$counter++ < 2 ) continue;
/* Add each file to global file. */
$this -> file = $this -> file . file_get_contents ( "payload/" . $file );
}
/* Begin padding process. */
$this -> encrypt ( $this -> file );
}
/* On load generate new hash. */
public function __construct ( )
{
/* Padding using safe characters only http://wiki.garrysmod.com/page/Specific_Operators . */
$padding = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";
$this -> hash = str_shuffle ( $padding );
$padding .= "$ % ^ & * _ - + = : @ ~ ; ' # < > ? , . /";
$this -> hash = str_shuffle ( $padding . $this -> hash );
$padding .= "a b c d e f g h i j k l m n o p q r s t u v w x y z";
$this -> hash = str_shuffle ( $padding . $this -> hash );
}
/* Function to give each variable a new random name and replace all. */
private function value ( $string )
{
/* Give value a md5 hash of a unique ID. */
$string = md5 ( uniqid ( $string ) );
/* Prepare string for lua. */
$string = str_replace ( range ( '0', '100' ) , '', $string );
/* Add padding to hash. */
$padding = "/*". str_shuffle ( $this -> hash ) ."*/" . $string ."/*". str_shuffle ( $this -> hash ) ."*/";
return $padding;
}
private function encrypt ( $file )
{
/* Find all renamable functions. */
$functions = array (
"print",
"concommand.Add",
"concommand.Remove",
"Msg",
"CreateClientConVar",
"GetConVar",
"ConVarExists",
"http.Fetch",
"Color",
"hook.GetTable"
);
/* Custom functions. */
$custom = array (
"function",
"(",
")"
);
/* Foreach all functions. */
foreach ( $functions as $replace => $value )
{
/* Check if they exist in global file. */
if ( strpos ( $this -> file, $value ) !== false )
{
/* Replace function name with random unique ID. */
$this -> file = str_replace ( $value, $this -> value ( $value ) , $this -> file);
/* Replace function name with random unique ID. */
$this -> file = "local " . $this -> value ( $value ) . " = " . $value . "\n" . $this -> file;
}
}
/* Foreach all custom functions. */
foreach ( $custom as $replace => $value )
{
/* Check if they exist in global file. */
if ( strpos ( $this -> file, $value ) !== false )
{
/* Get the name of the function. */
$name = explode ( 'function ', rtrim ( $this -> file, ',' ) );
/* Ensure name is not empty. */
if ( !empty ( $name [ 1 ] ) )
{
/* Remove function param. */
$name = str_replace ( array ( "end", "(", ")" ), '', $name [ 1 ] );
/* Save. */
$name = preg_replace ( '/\s+/', '', $name );
/* Check for calling of the function. */
if ( strpos ( $this -> file, $name ) !== false )
{
/* Replace if it exists. */
$this -> file = str_replace ( $name, $this -> value ( $name ) , $this -> file );
}
}
/* Check if any () are invovled. */
if ( strpos ( $this -> file, $value ) !== false )
{
/* Pad brackets inside and out. */
$this -> file = str_replace ( $value, "/*" . str_shuffle ( $this -> hash ) . "*/" . $value . "/*" . str_shuffle ( $this -> hash ) . "*/" , $this -> file );
}
}
}
echo $this -> file;
}
}
$luamount = new luamount;
$luamount -> mount ( );
?>[/CODE]
[CODE]
print("Hello")
function hello ( )
concommand.Add()
CreateClientConVar()
end
/*~ <~ > ~,cs u r n a b '~^ q .e o t y z jk* ^ fp xw * >m,< h g' .vldi */local/*c p . wk* fqugt ^> ~ ~ ^x ' n y jsb'* ev ~ , < odiz ~m hr al<,>.*/ /* j * rny f< , ,e.> ps t c .xmq * d ^o u~ k~*/afdaacddeedcb/*kf , .o wc ,jg .q ~u *bm ^ s t 'i*/ = CreateClientConVar /*~ <~ > ~,cs u r n a b '~^ q .e o t y z jk* ^ fp xw * >m,< h g' .vldi */local/*c p . wk* fqugt ^> ~ ~ ^x ' n y jsb'* ev ~ , < odiz ~m hr al<,>.*/ /* ^ v, q m' u,> ~c p ' ~z>g ^f k < *i sa r t< b* y n j d o welx~ h .~. */dabacebdab/* gx ^ew r a vm ~^'' * uyo~pn kq ~<~c z >*.is df, */ = concommand.Add /*~ <~ > ~,cs u r n a b '~^ q .e o t y z jk* ^ fp xw * >m,< h g' .vldi */local/*c p . wk* fqugt ^> ~ ~ ^x ' n y jsb'* ev ~ , < odiz ~m hr al<,>.*/ /*y^p k t' x j ~z> f ob gnw ~>m er ~l h, c q.< .* ~ u ^ ' * d svi< a, */bfecabecabfcdea/*w yg r '< ' * ^th l d qa ~om sz ^ b n* e~ ui <~c . ~. k j ,x > , vf> p*/ = print /*c w *^ >y v < l f ^ .'hde < s* z qr u' k,~i j g ,p ~m x nao.t ~ b> ~*/bfecabecabfcdea/*, < ~ v a~. b .f uy 'ei rg ^ ljs >ckd ~ < *ow ' ^ >n hz ~m, * x qp t*//* zy ~s > n*> w cd ' h < eq k o.ix* ~ un* ~ u< c~zjve.,~hmrq< d~y a b , ^ ' * sl pxk ' . >g^if*/"Hello"/* *x ' kp r *f .^z yq. , < ,~ts ^ d >>c~ba m~ ~ v < 'hio u n we lg j */)/*m>j.u k t , vf c s>'~y ' p qlwa d. <~ o ~ * gh*b x, ^re ^ni ~z < */ /* bwi l*,e ~ ~ p n, ' *^o k ' r h a tqf v g zm < > . xy ^ j*/function/* r z e ~s n>u>^gqx * * k< . < ch m~id, ' bv~ po fa, t~j'wl ^y.*/ hello /* zy ~s > n*> w cd ' h < eq k o.ix* ~ un* ~ u< c~zjve.,~hmrq< d~y a b , ^ ' * sl pxk ' . >g^if*/ /* *x ' kp r *f .^z yq. , < ,~ts ^ d >>c~ba m~ ~ v < 'hio u n we lg j */)/*m>j.u k t , vf c s>'~y ' p qlwa d. <~ o ~ * gh*b x, ^re ^ni ~z < */ /* a ~ *< r,^ > .i js~f t enbvm * u'y kh^o cp~ q '< z>.w ~x d ,lg */dabacebdab/*~v s l f ~^ , ,x ka j c . .~ > iq* n ~z d o u t*by '< < 'r > e^ whpm g *//* zy ~s > n*> w cd ' h < eq k o.ix* ~ un* ~ u< c~zjve.,~hmrq< d~y a b , ^ ' * sl pxk ' . >g^if*//* *x ' kp r *f .^z yq. , < ,~ts ^ d >>c~ba m~ ~ v < 'hio u n we lg j */)/*m>j.u k t , vf c s>'~y ' p qlwa d. <~ o ~ * gh*b x, ^re ^ni ~z < */ /*,> ^ ~. . * h , < pde~ s il > y ' nvk ,* .rk* >. tc~ ,*//* zy ~s > n*> w cd ' h < eq k o.ix* ~ un* ~ u< c~zjve.,~hmrq< d~y a b , ^ ' * sl pxk ' . >g^if*//* *x ' kp r *f .^z yq. , < ,~ts ^ d >>c~ba m~ ~ v < 'hio u n we lg j */)/*m>j.u k t , vf c s>'~y ' p qlwa d. <~ o ~ * gh*b x, ^re ^ni ~z < */ end
Each time the page is reloaded it re-obfuscates the code:
/* . k ~~ j u r,'y gzi .b ^' n , p ^ dlh v~~o ex a > s * < *w c t fq */local/*~ gn e f*<' r~tvpm i c b >< , ok > ^ul. q zx 'hy~ w, a jd ~. s^ **/ /* > <,bz q 'gf * * ~ np w < i o u ^^k xrj~ dv> a ~ s ~e. y,mtlh'c.*/eaacefcebeefd/*~> < k~ h * s x^ */ = CreateClientConVar /* . k ~~ j u r,'y gzi .b ^' n , p ^ dlh v~~o ex a > s * < *w c t fq */local/*~ gn e f*<' r~tvpm i c b >< , ok > ^ul. q zx 'hy~ w, a jd ~. s^ **/ /*y i'~u k< dp ^t b.^a~ s zl, g x ' mrc. o qwe*j ,* ~ nh ~f>*/dcdcffabdcdf/*< ul n k~y hp> , q ~m* rf. o xsgcd * b' ~ .~^^j ie< ' vza w, >t*/ = concommand.Add /* . k ~~ j u r,'y gzi .b ^' n , p ^ dlh v~~o ex a > s * < *w c t fq */local/*~ gn e f*<' r~tvpm i c b >< , ok > ^ul. q zx 'hy~ w, a jd ~. s^ **/ /* ~'w ml i v n ~ > >< rk f e *g h ,.< , .q ^jopy ac bz^~tsx~ d* u'*/adbecdda/* q~ nr jyv,. *a z . ^b de l < xo *h i >gs~u k ~' ' , > ~ w c <^ tm f p*/ = print /*jokpn~ >t~v mbr.g. ~ , e xd, a ~ <^ f*l ^*/adbecdda/* g > * ~z , . kbf ~' n c w,ov xs i e~ *dj ' trq l u ^ hm. > a~ <^ vk*~ l.f d b, j t . hauxc< r'~mn s'e */(/* .eg n y d*, k '* q ~t xw b ~ as.m j ^^ ,>v ~~ */"Hello"/* ,v o>s< t' lh d . cm .ebz* u ^a * f ~yp gqwx^ ~ ~ jr*/)/* ,gx > > *, r .o ~~tq < wl g > k*/function/*tg z o* ~x*qu . m ^j,h c d p k l ><~f , w i s.y ~r a ~ ^nb<>'v 'e*/ hello /*~z>vk*~ l.f d b, j t . hauxc< r'~mn s'e */(/* .eg n y d*, k '* q ~t xw b ~ as.m j ^^ ,>v ~~ */ /* ,v o>s< t' lh d . cm .ebz* u ^a * f ~yp gqwx^ ~ ~ jr*/)/* ,gx > > *,~ m ^'yi^~zh a r~w v> < , u.q kt fc~ b ,* o <*/dcdcffabdcdf/* o x h ~w ~< c e ~av ,b .> ,gt s~ *nk ' 'r^*//*~z>vk*~ l.f d b, j t . hauxc< r'~mn s'e */(/* .eg n y d*, k '* q ~t xw b ~ as.m j ^^ ,>v ~~ *//* ,v o>s< t' lh d . cm .ebz* u ^a * f ~yp gqwx^ ~ ~ jr*/)/* ,gx > > *,sl.d * ew j*q c^ 'i~ ~ xvo a ^,, n p>'.< tk ug b < ~z mf yh r ~*/eaacefcebeefd/* ~^ gz ~ <,t ,w < .d j kn b >q * veoi axr ^s ~ . ~ l u mf'c>*hy'p*//*~z>vk*~ l.f d b, j t . hauxc< r'~mn s'e */(/* .eg n y d*, k '* q ~t xw b ~ as.m j ^^ ,>v ~~ *//* ,v o>s< t' lh d . cm .ebz* u ^a * f ~yp gqwx^ ~ ~ jr*/)/* ,gx > > *,
/*~f< ly ^gb u ~d x no .,j , ^'si ~ qw> marp zc th *e v ~'*. */local/* ' e .~t~ > q d* p^ cx r < fka 'mw l , . g >ibs hv y ,n~ pe dk ax ^ b>uw n< q z v*/ddadbfbccb/*~ ~ *q j^ ba r ,, vkzgdulsy . ^ e h 'om ~>tn ~ . w i c ' *f <*/ = CreateClientConVar /*~f< ly ^gb u ~d x no .,j , ^'si ~ qw> marp zc th *e v ~'*. */local/* ' e .~t~ > q d* p^ cx r < fka 'mw l , . g >ibs hv y ,n~ .' * m ^ < t x> z~,c f*qe y u~s~lq ,v w ' z ~ ftu cs, o~*>~ < byme ja marp zc th *e v ~'*. */local/* ' e .~t~ > q d* p^ cx r < fka 'mw l , . g >ibs hv y ,n~ . ~~, ^ tp.~ a ~ r ysln h b*vx>^ m q' < k d <*/ccddeaaadfc/* w c > < fh. ^.i^ k pu ,~nog y vd z t ra m' e , */ = print /* x z l'e bh~ dmq ti ^ y'< * .o, f ~*>n ^ */ccddeaaadfc/*o < m x , ~ b *pq n'd >t v~ < ~ s iz h> *~^ c url' y,awk g jf .^ e. *//*~ n r ~>i * k l zp j ~ ec u .bo f hsw . '>< ^,y atq, < gm ^x*v' d ~*/(/* f m v s l .n , oa px * >z q k ^ r' ^d *~hu i s*l vz'~ e~,u t~ . i^b. q a xo' w m c<*/)/* qfd b s^ ~xwlp ' j, k nc vzt~ ,< > r ~ . g * u eo im~*y .a ' ^*/ /* wf >uh *k rd pa js i.n ql z^ e* <~ y ^ ~ ' . ~ 'mc< ~g, >bv ,t ox */function/*ox .' n l~ a, h~ ~t yrud se k^ pq ^ w z< v. c, '*~>i*/ hello /*~ n r ~>i * k l zp j ~ ec u .bo f hsw . '>< ^,y atq, < gm ^x*v' d ~*/(/* f m v s l .n , oa px * >z q k ^ r' ^d *~hu i s*l vz'~ e~,u t~ . i^b. q a xo' w m c<*/)/* qfd b s^ ~xwlp ' j, k nc vzt~ ,< > r ~ . g * u eo im~*y .a ' ^*/ /*, ~s^ ^ q ge dl m i *j* . x< z'> an u */ebdebedbfbcaf/*^q f~ e ' > x y r~. sgma c,o * t vjw . d k p~ n ^ , i~<'lu z h*//*~ n r ~>i * k l zp j ~ ec u .bo f hsw . '>< ^,y atq, < gm ^x*v' d ~*/(/* f m v s l .n , oa px * >z q k ^ r' ^d *~hu i s*l vz'~ e~,u t~ . i^b. q a xo' w m c<*/)/* qfd b s^ ~xwlp ' j, k nc vzt~ ,< > r ~ . g * u eo im~*y .a ' ^*/ /* y n ed~ j~p , x z * ~c' s >g l.. h ib a' ^rqomvt */ddadbfbccb/* i k u pl~ < r'q * hj c ^z > .< e a~^m gn .f >y, w*sd ot v~~ ',b x*//*~ n r ~>i * k l zp j ~ ec u .bo f hsw . '>< ^,y atq, < gm ^x*v' d ~*/(/* f m v s l .n , oa px * >z q k ^ r' ^d *~hu i s*l vz'~ e~,u t~ . i^b. q a xo' w m c<*/)/* qfd b s^ ~xwlp ' j, k nc vzt~ ,< > r ~ . g * u eo im~*y .a ' ^*/ end
[/CODE]
Really basic lua Obfuscator, made it recently for Gmod.biz.
Use of "encrypt" used lightly.
Ib4 dumb "rates" because Facepunch.
i know you said "simple", but that isn't an obfuscator and the code behind it doesn't justify the outcome tbh.
[vid]http://a.pomf.se/ixkxhb.mp4[/vid]
it isn't obfuscating, it's padding with garbage.
Its not like you have a million dollar secret hiding in Lua...
[QUOTE=Exho;47350654]Its not like you have a million dollar secret hiding in Lua...[/QUOTE]
Tell that to Killslick
[QUOTE=code_gs;47350927]Tell that to Killslick[/QUOTE]
Tell that to !cake
I tried using an obfuscator for Java one time but the event system stopped working so I just gave up and used an open-source license like everybody else.
[sp]I wish it worked though[/sp]
[QUOTE=Freezebug;47351499]Tell that to !cake[/QUOTE]
[url]http://pastebin.com/raw.php?i=cGzqzY5B[/url]
[QUOTE=anime dad;47363528][url]http://pastebin.com/raw.php?i=cGzqzY5B[/url][/QUOTE]
Doesn't look that readable to me
[QUOTE=Silentfood;47350525]i know you said "simple", but that isn't an obfuscator and the code behind it doesn't justify the outcome tbh.
[vid]http://a.pomf.se/ixkxhb.mp4[/vid]
it isn't obfuscating, it's padding with garbage.[/QUOTE]
pwned
Sorry, you need to Log In to post a reply to this thread.