883 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
14 lines
1.1 KiB
Python
14 lines
1.1 KiB
Python
import struct,sys
|
|
from pathlib import Path
|
|
sys.path.insert(0,str(Path(__file__).resolve().parents[1]/'ops'))
|
|
from engine_endpoint_code_observation import inspect,ENTRY
|
|
stack=0x100008;caller=0x141e4f620
|
|
memory={stack:struct.pack('<Q',caller),caller-5:b'\xe8'+struct.pack('<i',ENTRY-caller),0x140885000:b'\x90'*4096,0x140886000:b'\x90'*4096}
|
|
reads=[]
|
|
def read(a,n):reads.append((a,n));assert len(memory[a])==n;return memory[a]
|
|
r=inspect(read,lambda a,n:True,stack);assert len(r['pages'])==2 and not r['engine_calls_made'] and not r['memory_protection_changed']
|
|
reads.clear();r=inspect(read,lambda a,n:False,stack);assert r['pages']==[] and all(n<4096 for _,n in reads)
|
|
memory[stack]=struct.pack('<Q',0x140001000);reads.clear();assert inspect(read,lambda a,n:True,stack)['reason']=='unexpected-real-caller';assert reads==[(stack,8)]
|
|
memory[stack]=struct.pack('<Q',caller);memory[caller-5]=bytes(5);assert inspect(read,lambda a,n:True,stack)['reason']=='caller-instruction-identity'
|
|
print('Natural-entry observer reads fixed executable code only after a verified real caller; NX pages and arguments remain untouched.')
|