it was probably already answered, but you could either instruct and use Cobra in a process hook, to do no mappaths, or just use the Cobra syscall (sth like map_path("your_path", NULL)
the syscall definition is wrong. it takes 2 parameters, so it would look like this:Code:unsigned int get_cobraversion(void){ system_call_1(8, 0x7001); return (unsigned int)p1; }
Code:int get_cobraversion(uint16_t *version) { system_call_2(8, 0x7001, (uint64_t)(uint32_t)version); return (int)p1; }
thanks haxxxen but the compiler is giving me some errors now
Code:
int get_cobraversion(uint16_t *version)
{
lv2syscall2(8, 0x7001, (uint64_t)(uint32_t)version);
return (int)p1;
}
bool is_cobra(void){
int ver = get_cobraversion();
// Optional debug log
//#if DEBUG
//DPRINTF("syscall 8 get_version2: 0x%X",ver);
//#endif
return ver>0 && ver<=0xffff;
}
Errors:
Code:
c:/PS34KPROXINSTALL/source/syscalls.cpp: In function 'int get_cobraversion(uint16_t*)':
c:/PS34KPROXINSTALL/source/syscalls.cpp:40:2: error: cast from 'uint16_t*' to 'uint32_t' loses precision
c:/PS34KPROXINSTALL/source/syscalls.cpp: In function 'bool is_cobra()':
c:/PS34KPROXINSTALL/source/syscalls.cpp:46:37: error: too few arguments to function 'int get_cobraversion(uint16_t*)'
c:/PS34KPROXINSTALL/source/syscalls.cpp:38:5: note: declared here
Last edited:
