Add a byte or list of bytes to the current shell code.
(self, byte_or_bytes)
| 3 | class ShellCode(object): |
| 4 | |
| 5 | def append(self, byte_or_bytes): |
| 6 | """ |
| 7 | Add a byte or list of bytes to the current shell code. |
| 8 | """ |
| 9 | |
| 10 | if hasattr(byte_or_bytes, '__iter__'): |
| 11 | self.__shell_code.extend(byte_or_bytes) |
| 12 | else: |
| 13 | self.__shell_code.append(byte_or_bytes) |
| 14 | |
| 15 | def asHex(self): |
| 16 | return "".join(map(lambda b: "\\x%0.2X" % b, self.__shell_code)) |