u64
A value that represents a 64-bit Integer
This is an array of exactly 2 values, as described below.
u64
Type:
Array<number>
Properties
1 (number)
: High value of u64
Example
[ 0x00000000, 0xffff0000 ]
SploitCore
Represents an instance of SploitCore
new SploitCore(exploitMe:
object)
Parameters
exploitMe (object)
Reference to object used for leaking data
Properties
base (u64)
: Base address
name (string)
: Returns "browser"
Instance Members
Returns address of function
Returns
u64
:
Address of function
Reads 4 bytes from address
Parameters
addr (u64)
Address to read value from
offset (number
= 0
)
Offset to add to addr before read
Returns
number
:
▸
write4(val, addr, offset)
Writes 4 bytes to address
Parameters
addr (u64)
Address to write value to
offset (number
= 0
)
Offset to add to addr before write
Reads 8 bytes from address
Parameters
addr (u64)
Address to read value from
offset (number
= 0
)
Offset to add to addr before read
Returns
number
:
▸
write8(val, addr, offset)
Writes 8 bytes to address
Parameters
addr (u64)
Address to write value to
offset (number
= 0
)
Offset to add to addr before write
▸
memview(addr, size, func)
Calls callback with an ArrayBuffer pointing to the view of memory requested.
If you return a value from within the callback it will be returned by SploitCore#memview
Warning: If you keep that view or any object using it around; you will tank the GC and your Switch will crash.
Parameters
addr (u64)
Base address for view
size (number)
Number of bytes to view
func (function)
Function which is called with ArrayBuffer.
Returns
any
:
Value returned by func
Returns address of object
Parameters
obj (object)
Object to get address of
Returns
u64
:
Address of object
Calculate address relative to main address
Parameters
Returns
u64
:
Relative address
Finds a gadget that matches required pattern
Parameters
Returns
(u64 | null)
:
Address of gadget, or null if not found.
Disables the browser watchdog
disableWatchdog()
Returns the address of SP
Returns
u64
:
Address of SP
Allocates a region of memory to use
Parameters
Returns
u64
:
Address of region
TODO DOCS
free(addr: any)
Parameters
TODO DOCS
getArrayBufferAddr(ab: any)
Parameters
▸
call(funcptr, args, fargs, registers, dump_regs)
TODO DOCS
call(funcptr: any, args: any, fargs: any, registers: any, dump_regs: any)
Parameters
▸
svc(id, args, dump_regs)
Call a specific svc with arguments
Parameters
args (Array<any>)
Arguments to pass
TODO DOCS
str2buf(inp: any)
Parameters
▸
memdump(offset, size, fileName)
Initiate a memory dump over HTTP
Parameters
offset (u64)
Memory address to start from
size (number)
Number of bytes you wish to dump
fileName (string)
Name of file, used to set Content-Disposition
Forces the garbage collector to run
gc()
▸
readString(addr, length)
Reads a string from memory
Parameters
addr (u64)
Address to start from
length (number)
Number of bytes to read
Returns
string
:
Copy memory from one region to another
Parameters
dst (u64)
Base destination address
src (u64)
Base source address
size (number)
Number of bytes to copy