| 27 | List<Byte> newBuffer = new ArrayList<Byte>(); |
| 28 | |
| 29 | private void replace_buffer(Address startAddress) |
| 30 | { |
| 31 | Address i; |
| 32 | int j = 0; |
| 33 | |
| 34 | i = startAddress; |
| 35 | |
| 36 | for (j = 0; j < newBuffer.size(); j++) |
| 37 | { |
| 38 | println("[+] Replacing byte " + originalBuffer.get(j).toString() + " in address "+i.toString()+" with decrypted byte " + newBuffer.get(j).toString()); |
| 39 | byte new_byte = newBuffer.get(j); |
| 40 | |
| 41 | try { |
| 42 | setByte(i, new_byte); |
| 43 | } catch(MemoryAccessException mae) |
| 44 | { |
| 45 | println("[-] Error accessing address " + i.toString()); |
| 46 | break; |
| 47 | } |
| 48 | |
| 49 | i = i.next(); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | private String decrypt_sub(byte subKey, Address startAddress, Address endAddress) |
| 54 | { |