Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for offset in (0..64 * 1024 * 1024).step_by(8) { } == for i in range( 0, 64*1024*1024, 8):
- Reading Raw Bytes: let strr = unsafe{ std::slice::from_raw_parts(straddr as *const u8, 0x10) } ;
- let redone = String::from_utf8_lossy(&strr);
- What a string looks like in memory:
- ```
- /// waht a string actuallly looks like:
- $2 = alloc::string::String {
- vec: alloc::vec::Vec<u8> {
- buf: alloc::raw_vec::RawVec<u8, alloc::alloc::Global> {
- ptr: core::ptr::Unique<u8> {
- pointer: 0x5555555acde0 "29\n\000",
- _marker: core::marker::PhantomData<u8>
- },
- cap: 0x3,
- a: alloc::alloc::Global
- },
- len: 0x3
- }
- }
- */
- ```
- ```
- //std::slice::from_raw_parts(0x1337 as *const u8, 0x20 )
- /*
- // as long as we never deref the var it never crashes...
- $1 = &[u8] {
- data_ptr: 0x1337 <error: Cannot access memory at address 0x1337>,
- length: 0x20
- }
- */
- ```
Add Comment
Please, Sign In to add comment