| skipped 127 lines |
128 | 128 | | } |
129 | 129 | | |
130 | 130 | | log::info!("[+] Copying ctx_thread to rop chains"); |
131 | | - | let mut rop_prot_rw = ctx_thread.clone(); |
132 | | - | let mut rop_mem_enc = ctx_thread.clone(); |
133 | | - | let mut rop_delay = ctx_thread.clone(); |
134 | | - | let mut rop_mem_dec = ctx_thread.clone(); |
135 | | - | let mut rop_prot_rx = ctx_thread.clone(); |
136 | | - | let mut rop_set_evt = ctx_thread.clone(); |
| 131 | + | // Clone not required as it implements the copy trait |
| 132 | + | let mut rop_prot_rw = ctx_thread; |
| 133 | + | let mut rop_mem_enc = ctx_thread; |
| 134 | + | let mut rop_delay = ctx_thread; |
| 135 | + | let mut rop_mem_dec = ctx_thread; |
| 136 | + | let mut rop_prot_rx = ctx_thread; |
| 137 | + | let mut rop_set_evt = ctx_thread; |
137 | 138 | | |
138 | 139 | | log::info!("[+] Building ROP chain"); |
139 | 140 | | // pub unsafe extern "system" fn VirtualProtect(lpaddress: *const c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> BOOL |
| skipped 237 lines |