From c3a8106b23954eac05728d9fd400eb769e6a4e37 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 14:40:28 +0100 Subject: [PATCH 01/23] Remove usage of `six.integer_types` --- pwnlib/adb/bootloader.py | 3 +-- pwnlib/context/__init__.py | 2 +- pwnlib/gdb.py | 4 ++-- pwnlib/log.py | 3 +-- pwnlib/memleak.py | 3 +-- pwnlib/rop/call.py | 16 ++++++++-------- pwnlib/rop/gadgets.py | 6 ++---- pwnlib/rop/ret2dlresolve.py | 3 +-- pwnlib/rop/rop.py | 14 +++++++------- pwnlib/shellcraft/__init__.py | 7 +++---- .../shellcraft/templates/aarch64/linux/stage.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/mov.asm | 5 ++--- pwnlib/shellcraft/templates/aarch64/xor.asm | 3 +-- .../templates/amd64/linux/egghunter.asm | 3 +-- .../shellcraft/templates/amd64/linux/stage.asm | 3 +-- pwnlib/shellcraft/templates/amd64/mov.asm | 3 +-- pwnlib/shellcraft/templates/amd64/setregs.asm | 3 +-- pwnlib/shellcraft/templates/amd64/xor.asm | 3 +-- .../shellcraft/templates/arm/linux/egghunter.asm | 3 +-- .../shellcraft/templates/arm/linux/open_file.asm | 3 +-- pwnlib/shellcraft/templates/arm/mov.asm | 3 +-- pwnlib/shellcraft/templates/arm/xor.asm | 3 +-- .../templates/i386/linux/egghunter.asm | 3 +-- pwnlib/shellcraft/templates/i386/linux/stage.asm | 3 +-- pwnlib/shellcraft/templates/i386/mov.asm | 3 +-- pwnlib/shellcraft/templates/i386/setregs.asm | 3 +-- pwnlib/shellcraft/templates/i386/xor.asm | 3 +-- pwnlib/shellcraft/templates/mips/mov.asm | 3 +-- .../shellcraft/templates/thumb/linux/stage.asm | 3 +-- pwnlib/shellcraft/templates/thumb/mov.asm | 2 +- pwnlib/shellcraft/templates/thumb/push.asm | 2 +- pwnlib/tubes/sock.py | 5 ++--- pwnlib/ui.py | 5 ++--- pwnlib/util/crc/__init__.py | 4 ++-- pwnlib/util/cyclic.py | 4 ++-- pwnlib/util/fiddling.py | 12 ++++++------ pwnlib/util/packing.py | 12 ++++++------ pwnlib/windbg.py | 4 ++-- 38 files changed, 71 insertions(+), 99 deletions(-) diff --git a/pwnlib/adb/bootloader.py b/pwnlib/adb/bootloader.py index 149dd4715..d03a3563a 100644 --- a/pwnlib/adb/bootloader.py +++ b/pwnlib/adb/bootloader.py @@ -4,7 +4,6 @@ import ctypes import io import os -import six import sys from pwnlib.log import getLogger @@ -65,7 +64,7 @@ def extract(self, index_or_name): Returns: Contents of the image. """ - if isinstance(index_or_name, six.integer_types): + if isinstance(index_or_name, int): index = index_or_name else: for i in range(len(self.img_info)): diff --git a/pwnlib/context/__init__.py b/pwnlib/context/__init__.py index 655976a57..64f6ae131 100644 --- a/pwnlib/context/__init__.py +++ b/pwnlib/context/__init__.py @@ -1755,7 +1755,7 @@ def update_context_defaults(section): default = ContextType.defaults[key] - if isinstance(default, six.string_types + six.integer_types + (tuple, list, dict)): + if isinstance(default, six.string_types + (int, tuple, list, dict)): value = safeeval.expr(value) else: log.warn("Unsupported configuration option %r in section %r" % (key, 'context')) diff --git a/pwnlib/gdb.py b/pwnlib/gdb.py index 25ca1ed21..ef69b3492 100644 --- a/pwnlib/gdb.py +++ b/pwnlib/gdb.py @@ -627,7 +627,7 @@ def debug(args, gdbscript=None, gdb_args=None, exe=None, ssh=None, env=None, por >>> ssh_io.close() >>> shell.close() """ - if isinstance(args, six.integer_types + (tubes.process.process, tubes.ssh.ssh_channel)): + if isinstance(args, (int, tubes.process.process, tubes.ssh.ssh_channel)): log.error("Use gdb.attach() to debug a running process") if isinstance(args, (bytes, six.text_type)): @@ -1112,7 +1112,7 @@ def attach(target, gdbscript = '', exe = None, gdb_args = None, ssh = None, sysr # let's see if we can find a pid to attach to pid = None - if isinstance(target, six.integer_types): + if isinstance(target, int): # target is a pid, easy peasy pid = target elif isinstance(target, str): diff --git a/pwnlib/log.py b/pwnlib/log.py index 317dde44a..21cf8a39f 100644 --- a/pwnlib/log.py +++ b/pwnlib/log.py @@ -98,7 +98,6 @@ import os import random import re -import six import string import sys import threading @@ -284,7 +283,7 @@ def __init__(self, logger=None): self._logger = logger def _getlevel(self, levelString): - if isinstance(levelString, six.integer_types): + if isinstance(levelString, int): return levelString return logging._levelNames[levelString.upper()] diff --git a/pwnlib/memleak.py b/pwnlib/memleak.py index 49909c19b..f767b72c8 100644 --- a/pwnlib/memleak.py +++ b/pwnlib/memleak.py @@ -5,7 +5,6 @@ import functools import string -import six from six.moves import range from pwnlib.context import context @@ -166,7 +165,7 @@ def field_compare(self, address, obj, expected): the type of ``field``. """ - if isinstance(expected, six.integer_types): + if isinstance(expected, int): expected = pack(expected, bytes=obj.size) elif not isinstance(expected, bytes): raise TypeError("Expected value must be an int or bytes") diff --git a/pwnlib/rop/call.py b/pwnlib/rop/call.py index 4e7534726..24323052d 100644 --- a/pwnlib/rop/call.py +++ b/pwnlib/rop/call.py @@ -173,7 +173,7 @@ def resolve(self, addr=None): self.address = addr rv = [None] * len(self.values) for i, value in enumerate(self.values): - if isinstance(value, six.integer_types): + if isinstance(value, int): rv[i] = value elif isinstance(value, six.text_type): value = packing._need_bytes(value) @@ -197,7 +197,7 @@ def __bytes__(self): return packing.flat(self.resolve()) def __repr__(self): - if isinstance(self.address, six.integer_types): + if isinstance(self.address, int): return '%s(%r, %#x)' % (self.__class__.__name__, self.values, self.address) else: return '%s(%r, %r)' % (self.__class__.__name__, self.values, self.address) @@ -228,26 +228,26 @@ class Call(object): def __init__(self, name, target, args, abi=None, before=()): assert isinstance(name, (bytes, six.text_type)) - # assert isinstance(target, six.integer_types) + # assert isinstance(target, int) assert isinstance(args, (list, tuple)) self.abi = abi or ABI.default() self.name = name self.target = target self.args = list(args) for i, arg in enumerate(args): - if not isinstance(arg, six.integer_types+(Unresolved,)): + if not isinstance(arg, (int, Unresolved)): self.args[i] = AppendedArgument(arg) self.stack_arguments_before = before def __repr__(self): - fmt = "%#x" if isinstance(self.target, six.integer_types) else "%r" + fmt = "%#x" if isinstance(self.target, int) else "%r" return '%s(%r, %s, %r)' % (self.__class__.__name__, self.name, fmt % self.target, self.args) def is_flat(self): - if isinstance(self, six.integer_types + (Unresolved,)): + if isinstance(self, (int, Unresolved)): return True if not isinstance(self, Call): return False @@ -271,7 +271,7 @@ def _special_repr(cls, x): return x def __str__(self): - fmt = "%#x" if isinstance(self.target, six.integer_types) else "%r" + fmt = "%#x" if isinstance(self.target, int) else "%r" args = [] for arg in self.args: args.append(self._special_repr(arg)) @@ -279,7 +279,7 @@ def __str__(self): name = self.name or (fmt % self.target) arg_str = [] for arg in args: - if isinstance(arg, six.integer_types) and arg > 0x100: + if isinstance(arg, int) and arg > 0x100: arg_str.append(hex(arg)) else: arg_str.append(str(arg)) diff --git a/pwnlib/rop/gadgets.py b/pwnlib/rop/gadgets.py index 67a6dab01..1008308a4 100644 --- a/pwnlib/rop/gadgets.py +++ b/pwnlib/rop/gadgets.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -import six - class Gadget(object): """ Describes a ROP gadget @@ -55,12 +53,12 @@ def __repr__(self): def __getitem__(self, key): # Backward compatibility - if isinstance(key, six.integer_types): + if isinstance(key, int): key = self.__indices[key] return getattr(self, key) def __setitem__(self, key, value): # Backward compatibility - if isinstance(key, six.integer_types): + if isinstance(key, int): key = self.__indices[key] return setattr(self, key, value) diff --git a/pwnlib/rop/ret2dlresolve.py b/pwnlib/rop/ret2dlresolve.py index c05fa9e67..2788a0936 100644 --- a/pwnlib/rop/ret2dlresolve.py +++ b/pwnlib/rop/ret2dlresolve.py @@ -65,7 +65,6 @@ True """ -import six from copy import deepcopy from pwnlib.context import context @@ -377,7 +376,7 @@ def _build_args(self): elif isinstance(top, bytes): top = pack(self.data_addr + len(self.payload) + queue.size()) queue.append(MarkedBytes(queue[0])) - elif isinstance(top, six.integer_types): + elif isinstance(top, int): top = pack(top) self.payload += top diff --git a/pwnlib/rop/rop.py b/pwnlib/rop/rop.py index 4505962d7..90c98a0cd 100644 --- a/pwnlib/rop/rop.py +++ b/pwnlib/rop/rop.py @@ -413,7 +413,7 @@ def __init__(self, name=''): self.name = name def _slot_len(x): - if isinstance(x, six.integer_types+(Unresolved, Padding, Gadget)): + if isinstance(x, (int, Unresolved, Padding, Gadget)): return context.bytes else: return len(packing.flat(x)) @@ -456,7 +456,7 @@ def dump(self): line = '0x%04x:' % addr if isinstance(data, (str, bytes)): line += ' %16r' % data - elif isinstance(data, six.integer_types): + elif isinstance(data, int): line += ' %#16x' % data if self.address != 0 and self.address < data < self.next: off = data - addr @@ -788,7 +788,7 @@ def resolve(self, resolvable): if resolvable in elf.symbols: return elf.symbols[resolvable] - if isinstance(resolvable, six.integer_types): + if isinstance(resolvable, int): return resolvable def unresolve(self, value): @@ -841,7 +841,7 @@ def describe(self, object): """ if isinstance(object, enums): return str(object) - if isinstance(object, six.integer_types): + if isinstance(object, int): return self.unresolve(object) if isinstance(object, (bytes, six.text_type)): return repr(object) @@ -886,7 +886,7 @@ def build(self, base = None, description = None): # Integers can just be added. # Do our best to find out what the address is. - if isinstance(slot, six.integer_types): + if isinstance(slot, int): stack.describe(self.describe(slot)) stack.append(slot) @@ -1011,7 +1011,7 @@ def build(self, base = None, description = None): size = (stack.next - base) slot_address = base for i, slot in enumerate(stack): - if isinstance(slot, six.integer_types): + if isinstance(slot, int): pass elif isinstance(slot, (bytes, six.text_type)): @@ -1136,7 +1136,7 @@ def _srop_call(self, resolvable, arguments): SYS_sigreturn = constants.SYS_rt_sigreturn for register, value in zip(frame.arguments, arguments): - if not isinstance(value, six.integer_types + (Unresolved,)): + if not isinstance(value, (int, Unresolved)): frame[register] = AppendedArgument(value) else: frame[register] = value diff --git a/pwnlib/shellcraft/__init__.py b/pwnlib/shellcraft/__init__.py index de1127448..58f20379b 100644 --- a/pwnlib/shellcraft/__init__.py +++ b/pwnlib/shellcraft/__init__.py @@ -4,7 +4,6 @@ import itertools import os import re -import six import sys from types import ModuleType @@ -137,7 +136,7 @@ def templates(self): return templates def eval(self, item): - if isinstance(item, six.integer_types): + if isinstance(item, int): return item return constants.eval(item) @@ -147,7 +146,7 @@ def pretty(self, n, comment=True): if not comment: # then it can be inside a comment! r = r.replace('*/', r'\x2a/') return r - if not isinstance(n, six.integer_types): + if not isinstance(n, int): return n if isinstance(n, constants.Constant): if comment: return '%s /* %s */' % (n,self.pretty(int(n))) @@ -158,7 +157,7 @@ def pretty(self, n, comment=True): return '%#x' % n def okay(self, s, *a, **kw): - if isinstance(s, six.integer_types): + if isinstance(s, int): s = packing.pack(s, *a, **kw) return b'\0' not in s and b'\n' not in s diff --git a/pwnlib/shellcraft/templates/aarch64/linux/stage.asm b/pwnlib/shellcraft/templates/aarch64/linux/stage.asm index a0e8df3ed..a90eaf36b 100644 --- a/pwnlib/shellcraft/templates/aarch64/linux/stage.asm +++ b/pwnlib/shellcraft/templates/aarch64/linux/stage.asm @@ -1,5 +1,4 @@ <% -import six from pwnlib.shellcraft.aarch64 import mov from pwnlib.shellcraft.aarch64.linux import read, readn, mmap from pwnlib import constants as C @@ -29,7 +28,7 @@ Example: protection = C.PROT_READ | C.PROT_WRITE | C.PROT_EXEC flags = C.MAP_ANONYMOUS | C.MAP_PRIVATE - assert isinstance(fd, six.integer_types) + assert isinstance(fd, int) %> %if length is None: /* How many bytes should we receive? */ diff --git a/pwnlib/shellcraft/templates/aarch64/mov.asm b/pwnlib/shellcraft/templates/aarch64/mov.asm index 06a3609e0..b83e0fb03 100644 --- a/pwnlib/shellcraft/templates/aarch64/mov.asm +++ b/pwnlib/shellcraft/templates/aarch64/mov.asm @@ -8,7 +8,6 @@ from pwnlib.util.fiddling import xor_pair from pwnlib.shellcraft import pretty from pwnlib.shellcraft.registers import aarch64 as regs - import six log = getLogger('pwnlib.shellcraft.arm.mov') %> <%page args="dst, src"/> @@ -50,7 +49,7 @@ mov_x15 = None xor = None -if isinstance(src, six.integer_types): +if isinstance(src, int): lobits = dst not in ('x0', 'x10') packed = pack(src) words = group(2, packed) @@ -93,7 +92,7 @@ if dst == 'x15': add ${dst}, ${src}, xzr %elif src == 'x0': add ${dst}, ${src}, xzr, lsl #1 -%elif not isinstance(src, six.integer_types): +%elif not isinstance(src, int): mov ${dst}, ${src} %else: %if src == 0: diff --git a/pwnlib/shellcraft/templates/aarch64/xor.asm b/pwnlib/shellcraft/templates/aarch64/xor.asm index 7a5e95611..32fc47426 100644 --- a/pwnlib/shellcraft/templates/aarch64/xor.asm +++ b/pwnlib/shellcraft/templates/aarch64/xor.asm @@ -1,5 +1,4 @@ <% - import six from pwnlib.shellcraft import pretty, common, aarch64, registers from pwnlib.shellcraft.registers import aarch64 as regs from pwnlib.util.packing import pack, unpack @@ -40,7 +39,7 @@ if not key in regs: key_str = key key_int = key - if isinstance(key, six.integer_types): + if isinstance(key, int): key_str = pack(key, bytes=4) else: key_int = unpack(key, 'all') diff --git a/pwnlib/shellcraft/templates/amd64/linux/egghunter.asm b/pwnlib/shellcraft/templates/amd64/linux/egghunter.asm index fcfecfbc5..d2a573a15 100644 --- a/pwnlib/shellcraft/templates/amd64/linux/egghunter.asm +++ b/pwnlib/shellcraft/templates/amd64/linux/egghunter.asm @@ -1,5 +1,4 @@ <% -import six from pwnlib.shellcraft import amd64, pretty, common from pwnlib.util.packing import pack, unpack from pwnlib.util.lists import group @@ -25,7 +24,7 @@ done = common.label('egghunter_done') next_page = common.label('egghunter_nextpage') egg_str = egg -if isinstance(egg, six.integer_types): +if isinstance(egg, int): egg_str = pack(egg, bytes=4) if len(egg_str) % 4: diff --git a/pwnlib/shellcraft/templates/amd64/linux/stage.asm b/pwnlib/shellcraft/templates/amd64/linux/stage.asm index 6c5a9b4b1..b06a3004e 100644 --- a/pwnlib/shellcraft/templates/amd64/linux/stage.asm +++ b/pwnlib/shellcraft/templates/amd64/linux/stage.asm @@ -1,5 +1,4 @@ <% -import six from pwnlib.shellcraft.amd64 import push from pwnlib.shellcraft.amd64.linux import read, readn, mmap from pwnlib import constants as C @@ -29,7 +28,7 @@ Example: protection = C.PROT_READ | C.PROT_WRITE | C.PROT_EXEC flags = C.MAP_ANONYMOUS | C.MAP_PRIVATE - assert isinstance(fd, six.integer_types) + assert isinstance(fd, int) %> %if length is None: /* How many bytes should we receive? */ diff --git a/pwnlib/shellcraft/templates/amd64/mov.asm b/pwnlib/shellcraft/templates/amd64/mov.asm index e661bc120..a8016809c 100644 --- a/pwnlib/shellcraft/templates/amd64/mov.asm +++ b/pwnlib/shellcraft/templates/amd64/mov.asm @@ -4,7 +4,6 @@ from pwnlib.log import getLogger from pwnlib.shellcraft import eval, pretty, okay from pwnlib.shellcraft.registers import get_register, is_register, bits_required - import six log = getLogger('pwnlib.shellcraft.amd64.mov') %> <%page args="dest, src, stack_allowed = True"/> @@ -149,7 +148,7 @@ else: % else: mov ${dest}, ${src} % endif -% elif isinstance(src, six.integer_types): +% elif isinstance(src, int): ## Special case for zeroes ## XORing the 32-bit register clears the high 32 bits as well % if src == 0: diff --git a/pwnlib/shellcraft/templates/amd64/setregs.asm b/pwnlib/shellcraft/templates/amd64/setregs.asm index 11e8a430c..f7a424095 100644 --- a/pwnlib/shellcraft/templates/amd64/setregs.asm +++ b/pwnlib/shellcraft/templates/amd64/setregs.asm @@ -1,5 +1,4 @@ <% - import six from pwnlib.regsort import regsort from pwnlib.shellcraft import registers, eval from pwnlib.shellcraft.amd64 import mov @@ -51,7 +50,7 @@ if isinstance(edx, str): except NameError: pass -if isinstance(eax, six.integer_types) and isinstance(edx, six.integer_types) and eax >> 63 == edx: +if isinstance(eax, int) and isinstance(edx, int) and eax >> 63 == edx: cdq = True reg_context.pop('rdx') diff --git a/pwnlib/shellcraft/templates/amd64/xor.asm b/pwnlib/shellcraft/templates/amd64/xor.asm index 6e10f811f..e57db734e 100644 --- a/pwnlib/shellcraft/templates/amd64/xor.asm +++ b/pwnlib/shellcraft/templates/amd64/xor.asm @@ -1,5 +1,4 @@ <% - import six from pwnlib.shellcraft import pretty, common, amd64, registers from pwnlib.util.packing import pack, unpack from pwnlib.context import context as ctx @@ -46,7 +45,7 @@ else: key_str = key key_int = key - if isinstance(key, six.integer_types): + if isinstance(key, int): key_str = pack(key, bytes=4) else: key_int = unpack(key, 'all') diff --git a/pwnlib/shellcraft/templates/arm/linux/egghunter.asm b/pwnlib/shellcraft/templates/arm/linux/egghunter.asm index 52ef1f6f8..79d8f8d8c 100644 --- a/pwnlib/shellcraft/templates/arm/linux/egghunter.asm +++ b/pwnlib/shellcraft/templates/arm/linux/egghunter.asm @@ -1,4 +1,3 @@ -<% import six %> <% from pwnlib.shellcraft.arm import mov %> <% from pwnlib.util.packing import unpack %> <% from pwnlib import constants %> @@ -15,7 +14,7 @@ first address of the page that contains that address. <% - if not isinstance(egg, six.integer_types): + if not isinstance(egg, int): if not len(egg) == 4: raise Exception('Egg should be either an integer or a four byte string') egg = unpack(egg) diff --git a/pwnlib/shellcraft/templates/arm/linux/open_file.asm b/pwnlib/shellcraft/templates/arm/linux/open_file.asm index ed914e188..50b62665b 100644 --- a/pwnlib/shellcraft/templates/arm/linux/open_file.asm +++ b/pwnlib/shellcraft/templates/arm/linux/open_file.asm @@ -1,4 +1,3 @@ -<% import six %> <%page args="filepath, flags = 'O_RDONLY', mode = 0644"/> <%docstring>Opens a file. Leaves the file descriptor in r0. @@ -21,7 +20,7 @@ Args: break filepath_out = ', '.join(filepath_out) - if isinstance(mode, six.integer_types): + if isinstance(mode, int): mode = hex(mode) %> %if expr(cpp("%s & O_CREAT" % flags, arch = 'arm', os = 'linux')): diff --git a/pwnlib/shellcraft/templates/arm/mov.asm b/pwnlib/shellcraft/templates/arm/mov.asm index a030fbccb..615f065d5 100644 --- a/pwnlib/shellcraft/templates/arm/mov.asm +++ b/pwnlib/shellcraft/templates/arm/mov.asm @@ -4,7 +4,6 @@ from pwnlib.log import getLogger from pwnlib.shellcraft.registers import arm as regs from pwnlib.util import fiddling - import six log = getLogger('pwnlib.shellcraft.arm.mov') %> <%page args="dst, src"/> @@ -86,7 +85,7 @@ if not src in regs: %> %if src == dst: /* mov ${dst}, ${src} */ -%elif not isinstance(src, six.integer_types): +%elif not isinstance(src, int): mov ${dst}, ${src} %else: %if src == 0: diff --git a/pwnlib/shellcraft/templates/arm/xor.asm b/pwnlib/shellcraft/templates/arm/xor.asm index 6caf7435b..f83ce71bd 100644 --- a/pwnlib/shellcraft/templates/arm/xor.asm +++ b/pwnlib/shellcraft/templates/arm/xor.asm @@ -1,5 +1,4 @@ <% - import six from pwnlib.shellcraft import pretty, common, arm, registers from pwnlib.shellcraft.registers import arm as regs from pwnlib.util.packing import pack, unpack @@ -40,7 +39,7 @@ if not key in regs: key_str = key key_int = key - if isinstance(key, six.integer_types): + if isinstance(key, int): key_str = pack(key, bytes=4) else: key_int = unpack(key, 'all') diff --git a/pwnlib/shellcraft/templates/i386/linux/egghunter.asm b/pwnlib/shellcraft/templates/i386/linux/egghunter.asm index c8bb72c51..c6e5702e5 100644 --- a/pwnlib/shellcraft/templates/i386/linux/egghunter.asm +++ b/pwnlib/shellcraft/templates/i386/linux/egghunter.asm @@ -1,5 +1,4 @@ <% -import six from pwnlib.shellcraft import i386, pretty, common from pwnlib.util.packing import pack, unpack from pwnlib.util.lists import group @@ -25,7 +24,7 @@ done = common.label('egghunter_done') next_page = common.label('egghunter_nextpage') egg_str = egg -if isinstance(egg, six.integer_types): +if isinstance(egg, int): egg_str = pack(egg) if len(egg_str) % 4: diff --git a/pwnlib/shellcraft/templates/i386/linux/stage.asm b/pwnlib/shellcraft/templates/i386/linux/stage.asm index 7687e9a08..bc781243b 100644 --- a/pwnlib/shellcraft/templates/i386/linux/stage.asm +++ b/pwnlib/shellcraft/templates/i386/linux/stage.asm @@ -1,5 +1,4 @@ <% -import six from pwnlib.shellcraft.i386 import push from pwnlib.shellcraft.i386.linux import read, readn, mmap from pwnlib import constants as C @@ -30,7 +29,7 @@ Example: protection = C.PROT_READ | C.PROT_WRITE | C.PROT_EXEC flags = C.MAP_ANONYMOUS | C.MAP_PRIVATE - assert isinstance(fd, six.integer_types) + assert isinstance(fd, int) %> %if length is None: /* How many bytes should we receive? */ diff --git a/pwnlib/shellcraft/templates/i386/mov.asm b/pwnlib/shellcraft/templates/i386/mov.asm index e3f1db511..5a719d872 100644 --- a/pwnlib/shellcraft/templates/i386/mov.asm +++ b/pwnlib/shellcraft/templates/i386/mov.asm @@ -3,7 +3,6 @@ from pwnlib.util import lists, packing, fiddling, misc from pwnlib.log import getLogger from pwnlib.shellcraft.registers import get_register, is_register, bits_required - import six log = getLogger('pwnlib.shellcraft.i386.mov') %> <%page args="dest, src, stack_allowed = True"/> @@ -143,7 +142,7 @@ else: % else: mov ${dest}, ${src} % endif -% elif isinstance(src, six.integer_types): +% elif isinstance(src, int): ## Special case for zeroes % if src == 0: xor ${dest}, ${dest} diff --git a/pwnlib/shellcraft/templates/i386/setregs.asm b/pwnlib/shellcraft/templates/i386/setregs.asm index e05328daa..104e5c7cd 100644 --- a/pwnlib/shellcraft/templates/i386/setregs.asm +++ b/pwnlib/shellcraft/templates/i386/setregs.asm @@ -1,5 +1,4 @@ <% - import six from pwnlib.regsort import regsort from pwnlib.constants import Constant, eval from pwnlib.shellcraft import registers @@ -45,7 +44,7 @@ if isinstance(edx, str): except NameError: pass -if isinstance(eax, six.integer_types) and isinstance(edx, six.integer_types) and eax >> 31 == edx: +if isinstance(eax, int) and isinstance(edx, int) and eax >> 31 == edx: cdq = True reg_context.pop('edx') diff --git a/pwnlib/shellcraft/templates/i386/xor.asm b/pwnlib/shellcraft/templates/i386/xor.asm index 462b133fc..1e3795e59 100644 --- a/pwnlib/shellcraft/templates/i386/xor.asm +++ b/pwnlib/shellcraft/templates/i386/xor.asm @@ -1,5 +1,4 @@ <% - import six from pwnlib.shellcraft import pretty, common, i386, registers from pwnlib.util.packing import pack, unpack from pwnlib.context import context as ctx @@ -46,7 +45,7 @@ else: key_str = key key_int = key - if isinstance(key, six.integer_types): + if isinstance(key, int): key_str = pack(key, bytes=4) else: key_int = unpack(key, 'all') diff --git a/pwnlib/shellcraft/templates/mips/mov.asm b/pwnlib/shellcraft/templates/mips/mov.asm index 9eb795f3a..4d307fc7b 100644 --- a/pwnlib/shellcraft/templates/mips/mov.asm +++ b/pwnlib/shellcraft/templates/mips/mov.asm @@ -4,7 +4,6 @@ from pwnlib.context import context as ctx # Ugly hack, mako will not let it be called context from pwnlib.log import getLogger from pwnlib.shellcraft import mips, registers, pretty, okay - import six log = getLogger('pwnlib.shellcraft.mips.mov') %> <%page args="dst, src"/> @@ -109,7 +108,7 @@ if src_reg == 0: ${mips.mov('$t9', src)} ${mips.mov(dst, '$t9')} %endif -% elif isinstance(src, six.integer_types): +% elif isinstance(src, int): ## Everything else is the general case for moving into registers. <% srcp = packing.pack(src, word_size=32) diff --git a/pwnlib/shellcraft/templates/thumb/linux/stage.asm b/pwnlib/shellcraft/templates/thumb/linux/stage.asm index bc480401a..635c5bf7f 100644 --- a/pwnlib/shellcraft/templates/thumb/linux/stage.asm +++ b/pwnlib/shellcraft/templates/thumb/linux/stage.asm @@ -1,5 +1,4 @@ <% -import six from pwnlib.shellcraft.thumb import push from pwnlib.shellcraft.thumb.linux import read, readn, mmap from pwnlib import constants as C @@ -29,7 +28,7 @@ Example: protection = C.PROT_READ | C.PROT_WRITE | C.PROT_EXEC flags = C.MAP_ANONYMOUS | C.MAP_PRIVATE - assert isinstance(fd, six.integer_types) + assert isinstance(fd, int) %> %if length is None: /* How many bytes should we receive? */ diff --git a/pwnlib/shellcraft/templates/thumb/mov.asm b/pwnlib/shellcraft/templates/thumb/mov.asm index 2ce65b37e..693f73c34 100644 --- a/pwnlib/shellcraft/templates/thumb/mov.asm +++ b/pwnlib/shellcraft/templates/thumb/mov.asm @@ -110,7 +110,7 @@ if not src in registers.arm: %> % if dst == src: /* moving ${src} into ${dst}, but this is a no-op */ -% elif not isinstance(src, six.integer_types): +% elif not isinstance(src, int): mov ${dst}, ${src} % else: <% diff --git a/pwnlib/shellcraft/templates/thumb/push.asm b/pwnlib/shellcraft/templates/thumb/push.asm index 00a65bb33..2636e1589 100644 --- a/pwnlib/shellcraft/templates/thumb/push.asm +++ b/pwnlib/shellcraft/templates/thumb/push.asm @@ -60,7 +60,7 @@ if not is_register and isinstance(value, (six.binary_type, six.text_type)): % if is_register: push {${value}} -% elif isinstance(value, six.integer_types): +% elif isinstance(value, int): /* push ${pretty(value_orig, False)} */ ${re.sub(r'^\s*/.*\n', '', thumb.pushstr(packing.pack(value), False), 1)} % else: diff --git a/pwnlib/tubes/sock.py b/pwnlib/tubes/sock.py index 022eb4814..4751f7d5c 100644 --- a/pwnlib/tubes/sock.py +++ b/pwnlib/tubes/sock.py @@ -3,7 +3,6 @@ import errno import select -import six import socket from pwnlib.log import getLogger @@ -212,7 +211,7 @@ def shutdown_raw(self, direction): @classmethod def _get_family(cls, fam): - if isinstance(fam, six.integer_types): + if isinstance(fam, int): pass elif fam == 'any': fam = socket.AF_UNSPEC @@ -229,7 +228,7 @@ def _get_family(cls, fam): @classmethod def _get_type(cls, typ): - if isinstance(typ, six.integer_types): + if isinstance(typ, int): pass elif typ == "tcp": typ = socket.SOCK_STREAM diff --git a/pwnlib/ui.py b/pwnlib/ui.py index 95f89ad27..2789f6eba 100644 --- a/pwnlib/ui.py +++ b/pwnlib/ui.py @@ -3,7 +3,6 @@ import os import signal -import six import string import struct import subprocess @@ -180,7 +179,7 @@ def options(prompt, opts, default = None): Choice 2 """ - if default is not None and not isinstance(default, six.integer_types): + if default is not None and not isinstance(default, int): raise ValueError('options(): default must be a number or None') if term.term_mode: @@ -294,7 +293,7 @@ def pause(n=None): else: log.info('Paused (press enter to continue)') raw_input('') - elif isinstance(n, six.integer_types): + elif isinstance(n, int): with log.waitfor("Waiting") as l: for i in range(n, 0, -1): l.status('%d... ' % i) diff --git a/pwnlib/util/crc/__init__.py b/pwnlib/util/crc/__init__.py index 80a5c5649..c9e3a98ef 100644 --- a/pwnlib/util/crc/__init__.py +++ b/pwnlib/util/crc/__init__.py @@ -81,13 +81,13 @@ def __init__(self, n): try: for p in n.split('+'): k = safeeval.values(p.strip(), {'x': x, 'X': x}) - assert isinstance(k, (BitPolynom,)+six.integer_types) + assert isinstance(k, (BitPolynom, int)) k = int(k) assert k >= 0 self.n ^= k except (ValueError, NameError, AssertionError): raise ValueError("Not a valid polynomial: %s" % n) - elif isinstance(n, six.integer_types): + elif isinstance(n, int): if n >= 0: self.n = n else: diff --git a/pwnlib/util/cyclic.py b/pwnlib/util/cyclic.py index 316b70ec5..db6d13356 100644 --- a/pwnlib/util/cyclic.py +++ b/pwnlib/util/cyclic.py @@ -217,7 +217,7 @@ def cyclic_find(subseq, alphabet = None, n = None): if n is None: n = context.cyclic_size - if isinstance(subseq, six.integer_types): + if isinstance(subseq, int): if subseq >= 2**(8*n): # Assumption: The user has given an integer that is more than 2**(8n) bits, but would otherwise fit within # a register of size 2**(8m) where m is a multiple of four @@ -339,7 +339,7 @@ def cyclic_metasploit_find(subseq, sets = None): """ sets = sets or [ string.ascii_uppercase.encode(), string.ascii_lowercase.encode(), string.digits.encode() ] - if isinstance(subseq, six.integer_types): + if isinstance(subseq, int): subseq = packing.pack(subseq, 'all', 'little', False) return _gen_find(subseq, metasploit_pattern(sets)) diff --git a/pwnlib/util/fiddling.py b/pwnlib/util/fiddling.py index 51541be2f..e92609f32 100644 --- a/pwnlib/util/fiddling.py +++ b/pwnlib/util/fiddling.py @@ -149,7 +149,7 @@ def bits(s, endian = 'big', zero = 0, one = 1): out += byte else: out += byte[::-1] - elif isinstance(s, six.integer_types): + elif isinstance(s, int): if s < 0: s = s & ((1<> (word_size - k)) n &= (1 << word_size) - 1 diff --git a/pwnlib/util/packing.py b/pwnlib/util/packing.py index 1886da2b6..1fa92a6a3 100644 --- a/pwnlib/util/packing.py +++ b/pwnlib/util/packing.py @@ -115,7 +115,7 @@ def pack(number, word_size = None, endianness = None, sign = None, **kwargs): endianness = context.endianness sign = context.sign - if not isinstance(number, six.integer_types): + if not isinstance(number, int): raise ValueError("pack(): number must be of type (int,long) (got %r)" % type(number)) if not isinstance(sign, bool): @@ -137,7 +137,7 @@ def pack(number, word_size = None, endianness = None, sign = None, **kwargs): if not sign: raise ValueError("pack(): number does not fit within word_size") word_size = ((number + 1).bit_length() | 7) + 1 - elif not isinstance(word_size, six.integer_types) or word_size <= 0: + elif not isinstance(word_size, int) or word_size <= 0: raise ValueError("pack(): word_size must be a positive integer or the string 'all'") if sign: @@ -214,7 +214,7 @@ def unpack(data, word_size = None): # Verify that word_size make sense if word_size == 'all': word_size = len(data) * 8 - elif not isinstance(word_size, six.integer_types) or word_size <= 0: + elif not isinstance(word_size, int) or word_size <= 0: raise ValueError("unpack(): word_size must be a positive integer or the string 'all'") byte_size = (word_size + 7) // 8 @@ -658,7 +658,7 @@ def fill(key): pieces_ = dict() large_key = 2**(context.word_size-8) for k, v in pieces.items(): - if isinstance(k, six.integer_types): + if isinstance(k, int): if k >= large_key: k = fill(pack(k)) elif isinstance(k, (six.text_type, bytearray, bytes)): @@ -733,7 +733,7 @@ def _flat(args, preprocessor, packer, filler, stacklevel=1): val = arg elif isinstance(arg, six.text_type): val = _need_bytes(arg, stacklevel + 1) - elif isinstance(arg, six.integer_types): + elif isinstance(arg, int): val = packer(arg) elif isinstance(arg, bytearray): val = bytes(arg) @@ -1098,7 +1098,7 @@ def dd(dst, src, count = 0, skip = 0, seek = 0, truncate = False): break if isinstance(b, bytes): src_ += b - elif isinstance(b, six.integer_types): + elif isinstance(b, int): if b > 255 or b < 0: raise ValueError("dd(): Source value %d at index %d is not in range [0;255]" % (b, i)) src_ += _p8lu(b) diff --git a/pwnlib/windbg.py b/pwnlib/windbg.py index 588714572..84fb2fbdb 100644 --- a/pwnlib/windbg.py +++ b/pwnlib/windbg.py @@ -106,7 +106,7 @@ def debug(args, windbgscript=None, exe=None, env=None, creationflags=0, **kwargs instruction of the entry point. """ if isinstance( - args, six.integer_types + (tubes.process.process, tubes.ssh.ssh_channel) + args, (int, tubes.process.process, tubes.ssh.ssh_channel) ): log.error("Use windbg.attach() to debug a running process") @@ -187,7 +187,7 @@ def attach(target, windbgscript=None, windbg_args=[]): # let's see if we can find a pid to attach to pid = None - if isinstance(target, six.integer_types): + if isinstance(target, int): # target is a pid, easy peasy pid = target elif isinstance(target, str): From 9c2a75d7de81f1f067af78bd6332c9e5ecdb7ed6 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 14:44:17 +0100 Subject: [PATCH 02/23] Remove usage of `six.string_types` --- pwnlib/adb/adb.py | 2 +- pwnlib/context/__init__.py | 2 +- pwnlib/util/misc.py | 4 ++-- pwnlib/windbg.py | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pwnlib/adb/adb.py b/pwnlib/adb/adb.py index 45d27875c..0ac0494a4 100644 --- a/pwnlib/adb/adb.py +++ b/pwnlib/adb/adb.py @@ -1263,7 +1263,7 @@ def __eq__(self, other): >>> adb.properties.ro.build.version.sdk == "24" True """ - if isinstance(other, six.string_types): + if isinstance(other, str): return str(self) == other return super(Property, self).__eq__(other) diff --git a/pwnlib/context/__init__.py b/pwnlib/context/__init__.py index 64f6ae131..e53f2f20c 100644 --- a/pwnlib/context/__init__.py +++ b/pwnlib/context/__init__.py @@ -1755,7 +1755,7 @@ def update_context_defaults(section): default = ContextType.defaults[key] - if isinstance(default, six.string_types + (int, tuple, list, dict)): + if isinstance(default, (str, int, tuple, list, dict)): value = safeeval.expr(value) else: log.warn("Unsupported configuration option %r in section %r" % (key, 'context')) diff --git a/pwnlib/util/misc.py b/pwnlib/util/misc.py index 58739c151..2a860e015 100644 --- a/pwnlib/util/misc.py +++ b/pwnlib/util/misc.py @@ -397,7 +397,7 @@ def run_in_new_terminal(command, terminal=None, args=None, kill_at_exit=True, pr argv = [which(terminal)] + args - if isinstance(command, six.string_types): + if isinstance(command, str): if ';' in command: log.error("Cannot use commands with semicolon. Create a script and invoke that directly.") argv += [command] @@ -493,7 +493,7 @@ def run_in_new_terminal(command, terminal=None, args=None, kill_at_exit=True, pr # Otherwise it's better to return nothing instead of a know wrong pid. from pwnlib.util.proc import pid_by_name pid = None - ran_program = command.split(' ')[0] if isinstance(command, six.string_types) else command[0] + ran_program = command.split(' ')[0] if isinstance(command, str) else command[0] t = Timeout() with t.countdown(timeout=5): while t.timeout: diff --git a/pwnlib/windbg.py b/pwnlib/windbg.py index 84fb2fbdb..042c49335 100644 --- a/pwnlib/windbg.py +++ b/pwnlib/windbg.py @@ -63,8 +63,6 @@ import subprocess -import six - from pwnlib import tubes from pwnlib.context import LocalContext from pwnlib.context import context @@ -115,7 +113,7 @@ def debug(args, windbgscript=None, exe=None, env=None, creationflags=0, **kwargs return tubes.process.process(args, executable=exe, env=env, creationflags=creationflags) windbgscript = windbgscript or '' - if isinstance(windbgscript, six.string_types): + if isinstance(windbgscript, str): windbgscript = windbgscript.split('\n') # resume main thread windbgscript = ['~0m'] + windbgscript @@ -213,7 +211,7 @@ def attach(target, windbgscript=None, windbg_args=[]): cmd.extend(['-p', str(pid)]) windbgscript = windbgscript or '' - if isinstance(windbgscript, six.string_types): + if isinstance(windbgscript, str): windbgscript = windbgscript.split('\n') if isinstance(windbgscript, list): windbgscript = ';'.join(script.strip() for script in windbgscript if script.strip()) From 9d27ce66a5cca03184873814fe737a63ad59ba46 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:13:42 +0100 Subject: [PATCH 03/23] Remove usage of `six.text_type` --- pwnlib/adb/adb.py | 5 ++--- pwnlib/context/__init__.py | 7 +++---- pwnlib/data/syscalls/generate.py | 4 ++-- pwnlib/elf/elf.py | 3 +-- pwnlib/filesystem/ssh.py | 2 +- pwnlib/gdb.py | 4 ++-- pwnlib/protocols/adb/__init__.py | 11 +++++------ pwnlib/rop/call.py | 8 +++----- pwnlib/rop/rop.py | 9 ++++----- .../templates/aarch64/darwin/syscall.asm | 3 +-- .../templates/aarch64/darwin/syscalls/execve.asm | 4 ++-- .../templates/aarch64/darwin/syscalls/exit.asm | 4 ++-- .../aarch64/darwin/syscalls/getdirentries64.asm | 4 ++-- .../aarch64/darwin/syscalls/getxattr.asm | 4 ++-- .../templates/aarch64/darwin/syscalls/lseek.asm | 4 ++-- .../templates/aarch64/darwin/syscalls/read.asm | 4 ++-- .../templates/aarch64/darwin/syscalls/write.asm | 4 ++-- .../templates/aarch64/freebsd/syscall.asm | 3 +-- .../templates/aarch64/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/pushstr.asm | 3 +-- .../templates/aarch64/pushstr_array.asm | 4 ++-- .../shellcraft/templates/amd64/darwin/syscall.asm | 3 +-- .../templates/amd64/darwin/syscalls/execve.asm | 4 ++-- .../templates/amd64/darwin/syscalls/exit.asm | 4 ++-- .../amd64/darwin/syscalls/getdirentries64.asm | 4 ++-- .../templates/amd64/darwin/syscalls/getxattr.asm | 4 ++-- .../templates/amd64/darwin/syscalls/lseek.asm | 4 ++-- .../templates/amd64/darwin/syscalls/read.asm | 4 ++-- .../templates/amd64/darwin/syscalls/write.asm | 4 ++-- .../templates/amd64/freebsd/syscall.asm | 3 +-- .../shellcraft/templates/amd64/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/amd64/push.asm | 3 +-- pwnlib/shellcraft/templates/amd64/pushstr.asm | 2 +- .../shellcraft/templates/arm/freebsd/syscall.asm | 3 +-- pwnlib/shellcraft/templates/arm/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/arm/pushstr.asm | 3 +-- .../templates/common/linux/syscalls/_llseek.asm | 4 ++-- .../common/linux/syscalls/_newselect.asm | 4 ++-- .../templates/common/linux/syscalls/_sysctl.asm | 4 ++-- .../templates/common/linux/syscalls/accept.asm | 4 ++-- .../templates/common/linux/syscalls/accept4.asm | 4 ++-- .../templates/common/linux/syscalls/access.asm | 4 ++-- .../templates/common/linux/syscalls/acct.asm | 4 ++-- .../templates/common/linux/syscalls/add_key.asm | 4 ++-- .../templates/common/linux/syscalls/adjtimex.asm | 4 ++-- .../common/linux/syscalls/afs_syscall.asm | 4 ++-- .../templates/common/linux/syscalls/alarm.asm | 4 ++-- .../common/linux/syscalls/arch_prctl.asm | 4 ++-- .../linux/syscalls/arch_specific_syscall.asm | 4 ++-- .../common/linux/syscalls/arm_fadvise64_64.asm | 4 ++-- .../common/linux/syscalls/arm_sync_file_range.asm | 4 ++-- .../templates/common/linux/syscalls/bdflush.asm | 4 ++-- .../templates/common/linux/syscalls/bind.asm | 4 ++-- .../templates/common/linux/syscalls/bpf.asm | 4 ++-- .../templates/common/linux/syscalls/break_.asm | 4 ++-- .../templates/common/linux/syscalls/brk.asm | 4 ++-- .../templates/common/linux/syscalls/cachectl.asm | 4 ++-- .../common/linux/syscalls/cacheflush.asm | 4 ++-- .../templates/common/linux/syscalls/capget.asm | 4 ++-- .../templates/common/linux/syscalls/capset.asm | 4 ++-- .../templates/common/linux/syscalls/chdir.asm | 4 ++-- .../templates/common/linux/syscalls/chmod.asm | 4 ++-- .../templates/common/linux/syscalls/chown.asm | 4 ++-- .../templates/common/linux/syscalls/chown32.asm | 4 ++-- .../templates/common/linux/syscalls/chroot.asm | 4 ++-- .../common/linux/syscalls/clock_adjtime.asm | 4 ++-- .../common/linux/syscalls/clock_adjtime64.asm | 4 ++-- .../common/linux/syscalls/clock_getres.asm | 4 ++-- .../common/linux/syscalls/clock_getres_time64.asm | 4 ++-- .../common/linux/syscalls/clock_gettime.asm | 4 ++-- .../common/linux/syscalls/clock_gettime64.asm | 4 ++-- .../common/linux/syscalls/clock_nanosleep.asm | 4 ++-- .../linux/syscalls/clock_nanosleep_time64.asm | 4 ++-- .../common/linux/syscalls/clock_settime.asm | 4 ++-- .../common/linux/syscalls/clock_settime64.asm | 4 ++-- .../templates/common/linux/syscalls/clone.asm | 4 ++-- .../templates/common/linux/syscalls/clone3.asm | 4 ++-- .../templates/common/linux/syscalls/close.asm | 4 ++-- .../common/linux/syscalls/close_range.asm | 4 ++-- .../templates/common/linux/syscalls/connect.asm | 4 ++-- .../common/linux/syscalls/copy_file_range.asm | 4 ++-- .../templates/common/linux/syscalls/creat.asm | 4 ++-- .../common/linux/syscalls/create_module.asm | 4 ++-- .../common/linux/syscalls/delete_module.asm | 4 ++-- .../templates/common/linux/syscalls/dup.asm | 4 ++-- .../templates/common/linux/syscalls/dup2.asm | 4 ++-- .../templates/common/linux/syscalls/dup3.asm | 4 ++-- .../common/linux/syscalls/epoll_create.asm | 4 ++-- .../common/linux/syscalls/epoll_create1.asm | 4 ++-- .../templates/common/linux/syscalls/epoll_ctl.asm | 4 ++-- .../common/linux/syscalls/epoll_ctl_old.asm | 4 ++-- .../common/linux/syscalls/epoll_pwait.asm | 4 ++-- .../common/linux/syscalls/epoll_pwait2.asm | 4 ++-- .../common/linux/syscalls/epoll_wait.asm | 4 ++-- .../common/linux/syscalls/epoll_wait_old.asm | 4 ++-- .../templates/common/linux/syscalls/eventfd.asm | 4 ++-- .../templates/common/linux/syscalls/eventfd2.asm | 4 ++-- .../templates/common/linux/syscalls/execve.asm | 4 ++-- .../templates/common/linux/syscalls/execveat.asm | 4 ++-- .../templates/common/linux/syscalls/exit.asm | 4 ++-- .../common/linux/syscalls/exit_group.asm | 4 ++-- .../templates/common/linux/syscalls/faccessat.asm | 4 ++-- .../common/linux/syscalls/faccessat2.asm | 4 ++-- .../templates/common/linux/syscalls/fadvise64.asm | 4 ++-- .../common/linux/syscalls/fadvise64_64.asm | 4 ++-- .../templates/common/linux/syscalls/fallocate.asm | 4 ++-- .../common/linux/syscalls/fanotify_init.asm | 4 ++-- .../common/linux/syscalls/fanotify_mark.asm | 4 ++-- .../templates/common/linux/syscalls/fchdir.asm | 4 ++-- .../templates/common/linux/syscalls/fchmod.asm | 4 ++-- .../templates/common/linux/syscalls/fchmodat.asm | 4 ++-- .../templates/common/linux/syscalls/fchown.asm | 4 ++-- .../templates/common/linux/syscalls/fchown32.asm | 4 ++-- .../templates/common/linux/syscalls/fchownat.asm | 4 ++-- .../templates/common/linux/syscalls/fcntl.asm | 4 ++-- .../templates/common/linux/syscalls/fcntl64.asm | 4 ++-- .../templates/common/linux/syscalls/fdatasync.asm | 4 ++-- .../templates/common/linux/syscalls/fgetxattr.asm | 4 ++-- .../common/linux/syscalls/finit_module.asm | 4 ++-- .../common/linux/syscalls/flistxattr.asm | 4 ++-- .../templates/common/linux/syscalls/flock.asm | 4 ++-- .../templates/common/linux/syscalls/fork.asm | 4 ++-- .../common/linux/syscalls/fremovexattr.asm | 4 ++-- .../templates/common/linux/syscalls/fsconfig.asm | 4 ++-- .../templates/common/linux/syscalls/fsetxattr.asm | 4 ++-- .../templates/common/linux/syscalls/fsmount.asm | 4 ++-- .../templates/common/linux/syscalls/fsopen.asm | 4 ++-- .../templates/common/linux/syscalls/fspick.asm | 4 ++-- .../templates/common/linux/syscalls/fstat.asm | 4 ++-- .../templates/common/linux/syscalls/fstat64.asm | 4 ++-- .../templates/common/linux/syscalls/fstatat.asm | 4 ++-- .../templates/common/linux/syscalls/fstatat64.asm | 4 ++-- .../templates/common/linux/syscalls/fstatfs.asm | 4 ++-- .../templates/common/linux/syscalls/fstatfs64.asm | 4 ++-- .../templates/common/linux/syscalls/fsync.asm | 4 ++-- .../templates/common/linux/syscalls/ftime.asm | 4 ++-- .../templates/common/linux/syscalls/ftruncate.asm | 4 ++-- .../common/linux/syscalls/ftruncate64.asm | 4 ++-- .../templates/common/linux/syscalls/futex.asm | 4 ++-- .../common/linux/syscalls/futex_time64.asm | 4 ++-- .../templates/common/linux/syscalls/futimesat.asm | 4 ++-- .../common/linux/syscalls/get_kernel_syms.asm | 4 ++-- .../common/linux/syscalls/get_mempolicy.asm | 4 ++-- .../common/linux/syscalls/get_robust_list.asm | 4 ++-- .../common/linux/syscalls/get_thread_area.asm | 4 ++-- .../templates/common/linux/syscalls/getcpu.asm | 4 ++-- .../templates/common/linux/syscalls/getcwd.asm | 4 ++-- .../templates/common/linux/syscalls/getdents.asm | 4 ++-- .../common/linux/syscalls/getdents64.asm | 4 ++-- .../templates/common/linux/syscalls/getegid.asm | 4 ++-- .../templates/common/linux/syscalls/getegid32.asm | 4 ++-- .../templates/common/linux/syscalls/geteuid.asm | 4 ++-- .../templates/common/linux/syscalls/geteuid32.asm | 4 ++-- .../templates/common/linux/syscalls/getgid.asm | 4 ++-- .../templates/common/linux/syscalls/getgid32.asm | 4 ++-- .../templates/common/linux/syscalls/getgroups.asm | 4 ++-- .../common/linux/syscalls/getgroups32.asm | 4 ++-- .../templates/common/linux/syscalls/getitimer.asm | 4 ++-- .../common/linux/syscalls/getpeername.asm | 4 ++-- .../templates/common/linux/syscalls/getpgid.asm | 4 ++-- .../templates/common/linux/syscalls/getpgrp.asm | 4 ++-- .../templates/common/linux/syscalls/getpid.asm | 4 ++-- .../templates/common/linux/syscalls/getpmsg.asm | 4 ++-- .../templates/common/linux/syscalls/getppid.asm | 4 ++-- .../common/linux/syscalls/getpriority.asm | 4 ++-- .../templates/common/linux/syscalls/getrandom.asm | 4 ++-- .../templates/common/linux/syscalls/getresgid.asm | 4 ++-- .../common/linux/syscalls/getresgid32.asm | 4 ++-- .../templates/common/linux/syscalls/getresuid.asm | 4 ++-- .../common/linux/syscalls/getresuid32.asm | 4 ++-- .../templates/common/linux/syscalls/getrlimit.asm | 4 ++-- .../templates/common/linux/syscalls/getrusage.asm | 4 ++-- .../templates/common/linux/syscalls/getsid.asm | 4 ++-- .../common/linux/syscalls/getsockname.asm | 4 ++-- .../common/linux/syscalls/getsockopt.asm | 4 ++-- .../templates/common/linux/syscalls/gettid.asm | 4 ++-- .../common/linux/syscalls/gettimeofday.asm | 4 ++-- .../templates/common/linux/syscalls/getuid.asm | 4 ++-- .../templates/common/linux/syscalls/getuid32.asm | 4 ++-- .../templates/common/linux/syscalls/getxattr.asm | 4 ++-- .../templates/common/linux/syscalls/gtty.asm | 4 ++-- .../common/linux/syscalls/ia32_arch_prctl.asm | 4 ++-- .../common/linux/syscalls/ia32_io_pgetevents.asm | 4 ++-- .../templates/common/linux/syscalls/ia32_rseq.asm | 4 ++-- .../common/linux/syscalls/ia32_statx.asm | 4 ++-- .../templates/common/linux/syscalls/idle.asm | 4 ++-- .../common/linux/syscalls/init_module.asm | 4 ++-- .../common/linux/syscalls/inotify_add_watch.asm | 4 ++-- .../common/linux/syscalls/inotify_init.asm | 4 ++-- .../common/linux/syscalls/inotify_init1.asm | 4 ++-- .../common/linux/syscalls/inotify_rm_watch.asm | 4 ++-- .../templates/common/linux/syscalls/io_cancel.asm | 4 ++-- .../common/linux/syscalls/io_destroy.asm | 4 ++-- .../common/linux/syscalls/io_getevents.asm | 4 ++-- .../common/linux/syscalls/io_pgetevents.asm | 4 ++-- .../linux/syscalls/io_pgetevents_time64.asm | 4 ++-- .../templates/common/linux/syscalls/io_setup.asm | 4 ++-- .../templates/common/linux/syscalls/io_submit.asm | 4 ++-- .../common/linux/syscalls/io_uring_enter.asm | 4 ++-- .../common/linux/syscalls/io_uring_register.asm | 4 ++-- .../common/linux/syscalls/io_uring_setup.asm | 4 ++-- .../templates/common/linux/syscalls/ioctl.asm | 4 ++-- .../templates/common/linux/syscalls/ioperm.asm | 4 ++-- .../templates/common/linux/syscalls/iopl.asm | 4 ++-- .../common/linux/syscalls/ioprio_get.asm | 4 ++-- .../common/linux/syscalls/ioprio_set.asm | 4 ++-- .../templates/common/linux/syscalls/ipc.asm | 4 ++-- .../templates/common/linux/syscalls/kcmp.asm | 4 ++-- .../common/linux/syscalls/kexec_file_load.asm | 4 ++-- .../common/linux/syscalls/kexec_load.asm | 4 ++-- .../templates/common/linux/syscalls/keyctl.asm | 4 ++-- .../templates/common/linux/syscalls/kill.asm | 4 ++-- .../common/linux/syscalls/landlock_add_rule.asm | 4 ++-- .../linux/syscalls/landlock_create_ruleset.asm | 4 ++-- .../linux/syscalls/landlock_restrict_self.asm | 4 ++-- .../templates/common/linux/syscalls/lchown.asm | 4 ++-- .../templates/common/linux/syscalls/lchown32.asm | 4 ++-- .../templates/common/linux/syscalls/lgetxattr.asm | 4 ++-- .../templates/common/linux/syscalls/link.asm | 4 ++-- .../templates/common/linux/syscalls/linkat.asm | 4 ++-- .../templates/common/linux/syscalls/listen.asm | 4 ++-- .../templates/common/linux/syscalls/listxattr.asm | 4 ++-- .../common/linux/syscalls/llistxattr.asm | 4 ++-- .../templates/common/linux/syscalls/lock.asm | 4 ++-- .../common/linux/syscalls/lookup_dcookie.asm | 4 ++-- .../common/linux/syscalls/lremovexattr.asm | 4 ++-- .../templates/common/linux/syscalls/lseek.asm | 4 ++-- .../templates/common/linux/syscalls/lsetxattr.asm | 4 ++-- .../templates/common/linux/syscalls/lstat.asm | 4 ++-- .../templates/common/linux/syscalls/lstat64.asm | 4 ++-- .../templates/common/linux/syscalls/madvise.asm | 4 ++-- .../templates/common/linux/syscalls/madvise1.asm | 4 ++-- .../templates/common/linux/syscalls/mbind.asm | 4 ++-- .../common/linux/syscalls/membarrier.asm | 4 ++-- .../common/linux/syscalls/memfd_create.asm | 4 ++-- .../common/linux/syscalls/migrate_pages.asm | 4 ++-- .../templates/common/linux/syscalls/mincore.asm | 4 ++-- .../templates/common/linux/syscalls/mkdir.asm | 4 ++-- .../templates/common/linux/syscalls/mkdirat.asm | 4 ++-- .../templates/common/linux/syscalls/mknod.asm | 4 ++-- .../templates/common/linux/syscalls/mknodat.asm | 4 ++-- .../templates/common/linux/syscalls/mlock.asm | 4 ++-- .../templates/common/linux/syscalls/mlock2.asm | 4 ++-- .../templates/common/linux/syscalls/mlockall.asm | 4 ++-- .../templates/common/linux/syscalls/mmap.asm | 4 ++-- .../templates/common/linux/syscalls/mmap2.asm | 4 ++-- .../common/linux/syscalls/modify_ldt.asm | 4 ++-- .../templates/common/linux/syscalls/mount.asm | 4 ++-- .../common/linux/syscalls/mount_setattr.asm | 4 ++-- .../common/linux/syscalls/move_mount.asm | 4 ++-- .../common/linux/syscalls/move_pages.asm | 4 ++-- .../templates/common/linux/syscalls/mprotect.asm | 4 ++-- .../templates/common/linux/syscalls/mpx.asm | 4 ++-- .../common/linux/syscalls/mq_getsetattr.asm | 4 ++-- .../templates/common/linux/syscalls/mq_notify.asm | 4 ++-- .../templates/common/linux/syscalls/mq_open.asm | 4 ++-- .../common/linux/syscalls/mq_timedreceive.asm | 4 ++-- .../linux/syscalls/mq_timedreceive_time64.asm | 4 ++-- .../common/linux/syscalls/mq_timedsend.asm | 4 ++-- .../common/linux/syscalls/mq_timedsend_time64.asm | 4 ++-- .../templates/common/linux/syscalls/mq_unlink.asm | 4 ++-- .../templates/common/linux/syscalls/mremap.asm | 4 ++-- .../templates/common/linux/syscalls/msgctl.asm | 4 ++-- .../templates/common/linux/syscalls/msgget.asm | 4 ++-- .../templates/common/linux/syscalls/msgrcv.asm | 4 ++-- .../templates/common/linux/syscalls/msgsnd.asm | 4 ++-- .../templates/common/linux/syscalls/msync.asm | 4 ++-- .../templates/common/linux/syscalls/munlock.asm | 4 ++-- .../common/linux/syscalls/munlockall.asm | 4 ++-- .../templates/common/linux/syscalls/munmap.asm | 4 ++-- .../common/linux/syscalls/name_to_handle_at.asm | 4 ++-- .../templates/common/linux/syscalls/nanosleep.asm | 4 ++-- .../common/linux/syscalls/newfstatat.asm | 4 ++-- .../common/linux/syscalls/nfsservctl.asm | 4 ++-- .../templates/common/linux/syscalls/nice.asm | 4 ++-- .../templates/common/linux/syscalls/oldfstat.asm | 4 ++-- .../templates/common/linux/syscalls/oldlstat.asm | 4 ++-- .../common/linux/syscalls/oldolduname.asm | 4 ++-- .../templates/common/linux/syscalls/oldstat.asm | 4 ++-- .../templates/common/linux/syscalls/olduname.asm | 4 ++-- .../templates/common/linux/syscalls/open.asm | 4 ++-- .../common/linux/syscalls/open_by_handle_at.asm | 4 ++-- .../templates/common/linux/syscalls/open_tree.asm | 4 ++-- .../templates/common/linux/syscalls/openat.asm | 4 ++-- .../templates/common/linux/syscalls/openat2.asm | 4 ++-- .../templates/common/linux/syscalls/pause.asm | 4 ++-- .../common/linux/syscalls/pciconfig_iobase.asm | 4 ++-- .../common/linux/syscalls/pciconfig_read.asm | 4 ++-- .../common/linux/syscalls/pciconfig_write.asm | 4 ++-- .../common/linux/syscalls/perf_event_open.asm | 4 ++-- .../common/linux/syscalls/personality.asm | 4 ++-- .../common/linux/syscalls/pidfd_getfd.asm | 4 ++-- .../common/linux/syscalls/pidfd_open.asm | 4 ++-- .../common/linux/syscalls/pidfd_send_signal.asm | 4 ++-- .../templates/common/linux/syscalls/pipe.asm | 4 ++-- .../templates/common/linux/syscalls/pipe2.asm | 4 ++-- .../common/linux/syscalls/pivot_root.asm | 4 ++-- .../common/linux/syscalls/pkey_alloc.asm | 4 ++-- .../templates/common/linux/syscalls/pkey_free.asm | 4 ++-- .../common/linux/syscalls/pkey_mprotect.asm | 4 ++-- .../templates/common/linux/syscalls/poll.asm | 4 ++-- .../templates/common/linux/syscalls/ppoll.asm | 4 ++-- .../common/linux/syscalls/ppoll_time64.asm | 4 ++-- .../templates/common/linux/syscalls/prctl.asm | 4 ++-- .../templates/common/linux/syscalls/pread.asm | 4 ++-- .../templates/common/linux/syscalls/pread64.asm | 4 ++-- .../templates/common/linux/syscalls/preadv.asm | 4 ++-- .../templates/common/linux/syscalls/preadv2.asm | 4 ++-- .../templates/common/linux/syscalls/prlimit64.asm | 4 ++-- .../common/linux/syscalls/process_madvise.asm | 4 ++-- .../common/linux/syscalls/process_vm_readv.asm | 4 ++-- .../common/linux/syscalls/process_vm_writev.asm | 4 ++-- .../templates/common/linux/syscalls/prof.asm | 4 ++-- .../templates/common/linux/syscalls/profil.asm | 4 ++-- .../templates/common/linux/syscalls/pselect6.asm | 4 ++-- .../common/linux/syscalls/pselect6_time64.asm | 4 ++-- .../templates/common/linux/syscalls/ptrace.asm | 4 ++-- .../templates/common/linux/syscalls/putpmsg.asm | 4 ++-- .../templates/common/linux/syscalls/pwrite.asm | 4 ++-- .../templates/common/linux/syscalls/pwrite64.asm | 4 ++-- .../templates/common/linux/syscalls/pwritev.asm | 4 ++-- .../templates/common/linux/syscalls/pwritev2.asm | 4 ++-- .../common/linux/syscalls/query_module.asm | 4 ++-- .../templates/common/linux/syscalls/quotactl.asm | 4 ++-- .../templates/common/linux/syscalls/read.asm | 4 ++-- .../templates/common/linux/syscalls/readahead.asm | 4 ++-- .../templates/common/linux/syscalls/readdir.asm | 4 ++-- .../templates/common/linux/syscalls/readlink.asm | 4 ++-- .../common/linux/syscalls/readlinkat.asm | 4 ++-- .../templates/common/linux/syscalls/readv.asm | 4 ++-- .../templates/common/linux/syscalls/reboot.asm | 4 ++-- .../templates/common/linux/syscalls/recv.asm | 4 ++-- .../templates/common/linux/syscalls/recvfrom.asm | 4 ++-- .../templates/common/linux/syscalls/recvmmsg.asm | 4 ++-- .../common/linux/syscalls/recvmmsg_time64.asm | 4 ++-- .../templates/common/linux/syscalls/recvmsg.asm | 4 ++-- .../common/linux/syscalls/remap_file_pages.asm | 4 ++-- .../common/linux/syscalls/removexattr.asm | 4 ++-- .../templates/common/linux/syscalls/rename.asm | 4 ++-- .../templates/common/linux/syscalls/renameat.asm | 4 ++-- .../templates/common/linux/syscalls/renameat2.asm | 4 ++-- .../common/linux/syscalls/request_key.asm | 4 ++-- .../common/linux/syscalls/reserved221.asm | 4 ++-- .../common/linux/syscalls/reserved82.asm | 4 ++-- .../common/linux/syscalls/restart_syscall.asm | 4 ++-- .../common/linux/syscalls/riscv_flush_icache.asm | 4 ++-- .../templates/common/linux/syscalls/rmdir.asm | 4 ++-- .../templates/common/linux/syscalls/rseq.asm | 4 ++-- .../linux/syscalls/sched_get_priority_max.asm | 4 ++-- .../linux/syscalls/sched_get_priority_min.asm | 4 ++-- .../common/linux/syscalls/sched_getaffinity.asm | 4 ++-- .../common/linux/syscalls/sched_getattr.asm | 4 ++-- .../common/linux/syscalls/sched_getparam.asm | 4 ++-- .../common/linux/syscalls/sched_getscheduler.asm | 4 ++-- .../linux/syscalls/sched_rr_get_interval.asm | 4 ++-- .../syscalls/sched_rr_get_interval_time64.asm | 4 ++-- .../common/linux/syscalls/sched_setaffinity.asm | 4 ++-- .../common/linux/syscalls/sched_setattr.asm | 4 ++-- .../common/linux/syscalls/sched_setparam.asm | 4 ++-- .../common/linux/syscalls/sched_setscheduler.asm | 4 ++-- .../common/linux/syscalls/sched_yield.asm | 4 ++-- .../templates/common/linux/syscalls/seccomp.asm | 4 ++-- .../templates/common/linux/syscalls/security.asm | 4 ++-- .../templates/common/linux/syscalls/select.asm | 4 ++-- .../templates/common/linux/syscalls/semctl.asm | 4 ++-- .../templates/common/linux/syscalls/semget.asm | 4 ++-- .../templates/common/linux/syscalls/semop.asm | 4 ++-- .../common/linux/syscalls/semtimedop.asm | 4 ++-- .../common/linux/syscalls/semtimedop_time64.asm | 4 ++-- .../templates/common/linux/syscalls/send.asm | 4 ++-- .../templates/common/linux/syscalls/sendfile.asm | 4 ++-- .../common/linux/syscalls/sendfile64.asm | 4 ++-- .../templates/common/linux/syscalls/sendmmsg.asm | 4 ++-- .../templates/common/linux/syscalls/sendmsg.asm | 4 ++-- .../templates/common/linux/syscalls/sendto.asm | 4 ++-- .../common/linux/syscalls/set_mempolicy.asm | 4 ++-- .../common/linux/syscalls/set_robust_list.asm | 4 ++-- .../common/linux/syscalls/set_thread_area.asm | 4 ++-- .../common/linux/syscalls/set_tid_address.asm | 4 ++-- .../common/linux/syscalls/setdomainname.asm | 4 ++-- .../templates/common/linux/syscalls/setfsgid.asm | 4 ++-- .../common/linux/syscalls/setfsgid32.asm | 4 ++-- .../templates/common/linux/syscalls/setfsuid.asm | 4 ++-- .../common/linux/syscalls/setfsuid32.asm | 4 ++-- .../templates/common/linux/syscalls/setgid.asm | 4 ++-- .../templates/common/linux/syscalls/setgid32.asm | 4 ++-- .../templates/common/linux/syscalls/setgroups.asm | 4 ++-- .../common/linux/syscalls/setgroups32.asm | 4 ++-- .../common/linux/syscalls/sethostname.asm | 4 ++-- .../templates/common/linux/syscalls/setitimer.asm | 4 ++-- .../templates/common/linux/syscalls/setns.asm | 4 ++-- .../templates/common/linux/syscalls/setpgid.asm | 4 ++-- .../common/linux/syscalls/setpriority.asm | 4 ++-- .../templates/common/linux/syscalls/setregid.asm | 4 ++-- .../common/linux/syscalls/setregid32.asm | 4 ++-- .../templates/common/linux/syscalls/setresgid.asm | 4 ++-- .../common/linux/syscalls/setresgid32.asm | 4 ++-- .../templates/common/linux/syscalls/setresuid.asm | 4 ++-- .../common/linux/syscalls/setresuid32.asm | 4 ++-- .../templates/common/linux/syscalls/setreuid.asm | 4 ++-- .../common/linux/syscalls/setreuid32.asm | 4 ++-- .../templates/common/linux/syscalls/setrlimit.asm | 4 ++-- .../templates/common/linux/syscalls/setsid.asm | 4 ++-- .../common/linux/syscalls/setsockopt.asm | 4 ++-- .../common/linux/syscalls/settimeofday.asm | 4 ++-- .../templates/common/linux/syscalls/setuid.asm | 4 ++-- .../templates/common/linux/syscalls/setuid32.asm | 4 ++-- .../templates/common/linux/syscalls/setxattr.asm | 4 ++-- .../templates/common/linux/syscalls/sgetmask.asm | 4 ++-- .../templates/common/linux/syscalls/shmat.asm | 4 ++-- .../templates/common/linux/syscalls/shmctl.asm | 4 ++-- .../templates/common/linux/syscalls/shmdt.asm | 4 ++-- .../templates/common/linux/syscalls/shmget.asm | 4 ++-- .../templates/common/linux/syscalls/shutdown.asm | 4 ++-- .../templates/common/linux/syscalls/sigaction.asm | 4 ++-- .../common/linux/syscalls/sigaltstack.asm | 4 ++-- .../templates/common/linux/syscalls/signal.asm | 4 ++-- .../templates/common/linux/syscalls/signalfd.asm | 4 ++-- .../templates/common/linux/syscalls/signalfd4.asm | 4 ++-- .../common/linux/syscalls/sigpending.asm | 4 ++-- .../common/linux/syscalls/sigprocmask.asm | 4 ++-- .../common/linux/syscalls/sigqueueinfo.asm | 4 ++-- .../templates/common/linux/syscalls/sigreturn.asm | 4 ++-- .../common/linux/syscalls/sigsuspend.asm | 4 ++-- .../common/linux/syscalls/sigtimedwait.asm | 4 ++-- .../common/linux/syscalls/sigtimedwait_time64.asm | 4 ++-- .../templates/common/linux/syscalls/socket.asm | 4 ++-- .../common/linux/syscalls/socketcall.asm | 4 ++-- .../common/linux/syscalls/socketcall_accept.asm | 4 ++-- .../common/linux/syscalls/socketcall_bind.asm | 4 ++-- .../common/linux/syscalls/socketcall_connect.asm | 4 ++-- .../linux/syscalls/socketcall_getpeername.asm | 4 ++-- .../linux/syscalls/socketcall_getsockname.asm | 4 ++-- .../linux/syscalls/socketcall_getsockopt.asm | 4 ++-- .../common/linux/syscalls/socketcall_listen.asm | 4 ++-- .../common/linux/syscalls/socketcall_recv.asm | 4 ++-- .../common/linux/syscalls/socketcall_recvfrom.asm | 4 ++-- .../common/linux/syscalls/socketcall_recvmsg.asm | 4 ++-- .../common/linux/syscalls/socketcall_send.asm | 4 ++-- .../common/linux/syscalls/socketcall_sendmsg.asm | 4 ++-- .../common/linux/syscalls/socketcall_sendto.asm | 4 ++-- .../linux/syscalls/socketcall_setsockopt.asm | 4 ++-- .../common/linux/syscalls/socketcall_shutdown.asm | 4 ++-- .../common/linux/syscalls/socketcall_socket.asm | 4 ++-- .../linux/syscalls/socketcall_socketpair.asm | 4 ++-- .../common/linux/syscalls/socketpair.asm | 4 ++-- .../templates/common/linux/syscalls/splice.asm | 4 ++-- .../templates/common/linux/syscalls/ssetmask.asm | 4 ++-- .../templates/common/linux/syscalls/stat.asm | 4 ++-- .../templates/common/linux/syscalls/stat64.asm | 4 ++-- .../templates/common/linux/syscalls/statfs.asm | 4 ++-- .../templates/common/linux/syscalls/statfs64.asm | 4 ++-- .../templates/common/linux/syscalls/statx.asm | 4 ++-- .../templates/common/linux/syscalls/stime.asm | 4 ++-- .../templates/common/linux/syscalls/stty.asm | 4 ++-- .../templates/common/linux/syscalls/swapoff.asm | 4 ++-- .../templates/common/linux/syscalls/swapon.asm | 4 ++-- .../templates/common/linux/syscalls/symlink.asm | 4 ++-- .../templates/common/linux/syscalls/symlinkat.asm | 4 ++-- .../templates/common/linux/syscalls/sync.asm | 4 ++-- .../common/linux/syscalls/sync_file_range.asm | 4 ++-- .../common/linux/syscalls/sync_file_range2.asm | 4 ++-- .../templates/common/linux/syscalls/syncfs.asm | 4 ++-- .../common/linux/syscalls/sys_kexec_load.asm | 4 ++-- .../templates/common/linux/syscalls/syscall.asm | 4 ++-- .../templates/common/linux/syscalls/sysfs.asm | 4 ++-- .../templates/common/linux/syscalls/sysinfo.asm | 4 ++-- .../templates/common/linux/syscalls/syslog.asm | 4 ++-- .../templates/common/linux/syscalls/sysmips.asm | 4 ++-- .../templates/common/linux/syscalls/sysriscv.asm | 4 ++-- .../templates/common/linux/syscalls/tee.asm | 4 ++-- .../templates/common/linux/syscalls/tgkill.asm | 4 ++-- .../common/linux/syscalls/tgsigqueueinfo.asm | 4 ++-- .../templates/common/linux/syscalls/time.asm | 4 ++-- .../common/linux/syscalls/timer_create.asm | 4 ++-- .../common/linux/syscalls/timer_delete.asm | 4 ++-- .../common/linux/syscalls/timer_getoverrun.asm | 4 ++-- .../common/linux/syscalls/timer_gettime.asm | 4 ++-- .../common/linux/syscalls/timer_gettime64.asm | 4 ++-- .../common/linux/syscalls/timer_settime.asm | 4 ++-- .../common/linux/syscalls/timer_settime64.asm | 4 ++-- .../templates/common/linux/syscalls/timerfd.asm | 4 ++-- .../common/linux/syscalls/timerfd_create.asm | 4 ++-- .../common/linux/syscalls/timerfd_gettime.asm | 4 ++-- .../common/linux/syscalls/timerfd_gettime64.asm | 4 ++-- .../common/linux/syscalls/timerfd_settime.asm | 4 ++-- .../common/linux/syscalls/timerfd_settime64.asm | 4 ++-- .../templates/common/linux/syscalls/times.asm | 4 ++-- .../templates/common/linux/syscalls/tkill.asm | 4 ++-- .../templates/common/linux/syscalls/truncate.asm | 4 ++-- .../common/linux/syscalls/truncate64.asm | 4 ++-- .../templates/common/linux/syscalls/tuxcall.asm | 4 ++-- .../common/linux/syscalls/ugetrlimit.asm | 4 ++-- .../templates/common/linux/syscalls/ulimit.asm | 4 ++-- .../templates/common/linux/syscalls/umask.asm | 4 ++-- .../templates/common/linux/syscalls/umount.asm | 4 ++-- .../templates/common/linux/syscalls/umount2.asm | 4 ++-- .../templates/common/linux/syscalls/uname.asm | 4 ++-- .../templates/common/linux/syscalls/unlink.asm | 4 ++-- .../templates/common/linux/syscalls/unlinkat.asm | 4 ++-- .../templates/common/linux/syscalls/unshare.asm | 4 ++-- .../templates/common/linux/syscalls/uselib.asm | 4 ++-- .../common/linux/syscalls/userfaultfd.asm | 4 ++-- .../templates/common/linux/syscalls/ustat.asm | 4 ++-- .../templates/common/linux/syscalls/utime.asm | 4 ++-- .../templates/common/linux/syscalls/utimensat.asm | 4 ++-- .../common/linux/syscalls/utimensat_time64.asm | 4 ++-- .../templates/common/linux/syscalls/utimes.asm | 4 ++-- .../templates/common/linux/syscalls/vfork.asm | 4 ++-- .../templates/common/linux/syscalls/vhangup.asm | 4 ++-- .../templates/common/linux/syscalls/vm86.asm | 4 ++-- .../templates/common/linux/syscalls/vm86old.asm | 4 ++-- .../templates/common/linux/syscalls/vmsplice.asm | 4 ++-- .../templates/common/linux/syscalls/vserver.asm | 4 ++-- .../templates/common/linux/syscalls/wait4.asm | 4 ++-- .../templates/common/linux/syscalls/waitid.asm | 4 ++-- .../templates/common/linux/syscalls/waitpid.asm | 4 ++-- .../templates/common/linux/syscalls/write.asm | 4 ++-- .../templates/common/linux/syscalls/writev.asm | 4 ++-- pwnlib/shellcraft/templates/i386/cgc/syscall.asm | 3 +-- .../shellcraft/templates/i386/freebsd/syscall.asm | 3 +-- .../shellcraft/templates/i386/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/i386/push.asm | 3 +-- pwnlib/shellcraft/templates/i386/pushstr.asm | 4 ++-- .../shellcraft/templates/mips/freebsd/syscall.asm | 3 +-- .../shellcraft/templates/mips/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/mips/push.asm | 4 ++-- pwnlib/shellcraft/templates/mips/pushstr.asm | 3 +-- .../templates/riscv64/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/riscv64/push.asm | 4 ++-- pwnlib/shellcraft/templates/riscv64/pushstr.asm | 3 +-- .../templates/thumb/freebsd/syscall.asm | 3 +-- .../shellcraft/templates/thumb/linux/syscall.asm | 3 +-- pwnlib/shellcraft/templates/thumb/mov.asm | 2 +- pwnlib/shellcraft/templates/thumb/push.asm | 2 +- pwnlib/shellcraft/templates/thumb/pushstr.asm | 3 +-- pwnlib/term/key.py | 2 +- pwnlib/tubes/ssh.py | 8 ++++---- pwnlib/tubes/tube.py | 12 ++++++------ pwnlib/util/crc/__init__.py | 2 +- pwnlib/util/cyclic.py | 3 +-- pwnlib/util/fiddling.py | 5 ++--- pwnlib/util/lists.py | 5 ++--- pwnlib/util/misc.py | 10 +++++----- pwnlib/util/packing.py | 15 +++++++-------- pwnlib/util/web.py | 3 +-- 546 files changed, 1081 insertions(+), 1116 deletions(-) diff --git a/pwnlib/adb/adb.py b/pwnlib/adb/adb.py index 0ac0494a4..e2d8ebce7 100644 --- a/pwnlib/adb/adb.py +++ b/pwnlib/adb/adb.py @@ -54,7 +54,6 @@ import os import re import shutil -import six import stat import tempfile import time @@ -85,7 +84,7 @@ def adb(argv, *a, **kw): >>> adb.adb(['shell', 'uname']) # it is better to use adb.process b'Linux\n' """ - if isinstance(argv, (bytes, six.text_type)): + if isinstance(argv, (bytes, str)): argv = [argv] log.debug("$ " + ' '.join(context.adb + argv)) @@ -838,7 +837,7 @@ def process(argv, *a, **kw): >>> print(adb.process(['cat','/proc/version']).recvall().decode('utf-8')) # doctest: +ELLIPSIS Linux version ... """ - if isinstance(argv, (bytes, six.text_type)): + if isinstance(argv, (bytes, str)): argv = [argv] message = "Starting %s process %r" % ('Android', argv[0]) diff --git a/pwnlib/context/__init__.py b/pwnlib/context/__init__.py index e53f2f20c..5151bd115 100644 --- a/pwnlib/context/__init__.py +++ b/pwnlib/context/__init__.py @@ -15,7 +15,6 @@ import os.path import platform import shutil -import six import socket import string import sys @@ -1040,7 +1039,7 @@ def log_file(self, value): >>> open(bar_txt).readlines()[-1] #doctest: +ELLIPSIS '...:DEBUG:...:Hello from bar!\n' """ - if isinstance(value, (bytes, six.text_type)): + if isinstance(value, (bytes, str)): # check if mode was specified as "[value],[mode]" from pwnlib.util.packing import _need_text value = _need_text(value) @@ -1258,7 +1257,7 @@ def terminal(self, value): Can be a string or an iterable of strings. In the latter case the first entry is the terminal and the rest are default arguments. """ - if isinstance(value, (bytes, six.text_type)): + if isinstance(value, (bytes, str)): return [value] return value @@ -1339,7 +1338,7 @@ def adb_port(self, value): def device(self, device): """Sets the device being operated on. """ - if isinstance(device, (bytes, six.text_type)): + if isinstance(device, (bytes, str)): device = Device(device) if isinstance(device, Device): self.arch = device.arch or self.arch diff --git a/pwnlib/data/syscalls/generate.py b/pwnlib/data/syscalls/generate.py index 4ddfdc5a2..a70dffa64 100644 --- a/pwnlib/data/syscalls/generate.py +++ b/pwnlib/data/syscalls/generate.py @@ -76,8 +76,8 @@ # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/elf/elf.py b/pwnlib/elf/elf.py index d93bfca8b..3ff1b8518 100644 --- a/pwnlib/elf/elf.py +++ b/pwnlib/elf/elf.py @@ -41,7 +41,6 @@ import mmap import os import re -import six import subprocess import tempfile @@ -266,7 +265,7 @@ def __init__(self, path, checksec=True): #: #: See: :attr:`.ContextType.arch` self.arch = self.get_machine_arch() - if isinstance(self.arch, (bytes, six.text_type)): + if isinstance(self.arch, (bytes, str)): self.arch = self.arch.lower() self._sections = None diff --git a/pwnlib/filesystem/ssh.py b/pwnlib/filesystem/ssh.py index 6cf6626b6..63758e3e5 100644 --- a/pwnlib/filesystem/ssh.py +++ b/pwnlib/filesystem/ssh.py @@ -82,7 +82,7 @@ def _s(self, other): return other # We don't want unicode - if isinstance(other, six.text_type): + if isinstance(other, str): return str(other) # We also don't want binary diff --git a/pwnlib/gdb.py b/pwnlib/gdb.py index ef69b3492..c41a46854 100644 --- a/pwnlib/gdb.py +++ b/pwnlib/gdb.py @@ -233,7 +233,7 @@ def debug_shellcode(data, gdbscript=None, vma=None, api=False): >>> io.recvline() b'Hello world!\n' """ - if isinstance(data, six.text_type): + if isinstance(data, str): log.error("Shellcode is cannot be unicode. Did you mean debug_assembly?") tmp_elf = make_elf(data, extract=False, vma=vma) os.chmod(tmp_elf, 0o777) @@ -630,7 +630,7 @@ def debug(args, gdbscript=None, gdb_args=None, exe=None, ssh=None, env=None, por if isinstance(args, (int, tubes.process.process, tubes.ssh.ssh_channel)): log.error("Use gdb.attach() to debug a running process") - if isinstance(args, (bytes, six.text_type)): + if isinstance(args, (bytes, str)): args = [args] orig_args = args diff --git a/pwnlib/protocols/adb/__init__.py b/pwnlib/protocols/adb/__init__.py index bf305c74b..f195da53f 100644 --- a/pwnlib/protocols/adb/__init__.py +++ b/pwnlib/protocols/adb/__init__.py @@ -10,7 +10,6 @@ import logging import functools -import six import stat import time @@ -144,7 +143,7 @@ def wrapper(self, *a, **kw): def send(self, *a, **kw): """Sends data to the ADB server""" - if isinstance(a[0], six.text_type): + if isinstance(a[0], str): a = (a[0].encode('utf-8'),) + a[1:] return self.c.adb_send(*a, **kw) @@ -432,7 +431,7 @@ def list(self, path): @_with_transport @_sync def _list(self, path): - if isinstance(path, six.text_type): + if isinstance(path, str): path = path.encode('utf-8') self.c.flat32(b'LIST', len(path), path) files = {} @@ -486,7 +485,7 @@ def stat(self, path): >>> pwnlib.protocols.adb.AdbClient().stat('/does/not/exist') is None True """ - if isinstance(path, six.text_type): + if isinstance(path, str): path = path.encode('utf-8') self.c.flat32(b'STAT', len(path), path) if self.c.recvn(4) != b'STAT': @@ -530,7 +529,7 @@ def write(self, path, data, mode=0o755, timestamp=None, callback=None): @_with_transport @_sync def _write(self, path, data, mode=0o755, timestamp=None, callback=None): - if isinstance(path, six.text_type): + if isinstance(path, str): path = path.encode('utf-8') path += b',%d' % mode @@ -576,7 +575,7 @@ def read(self, path, filesize=0, callback=lambda *a: True): Return: The data received as a string. """ - if isinstance(path, six.text_type): + if isinstance(path, str): path = path.encode('utf-8') self.c.send(b'RECV' + p32(len(path)) + path) diff --git a/pwnlib/rop/call.py b/pwnlib/rop/call.py index 24323052d..ddca8bb12 100644 --- a/pwnlib/rop/call.py +++ b/pwnlib/rop/call.py @@ -7,8 +7,6 @@ from pwnlib.context import context from pwnlib.util import packing -import six - from pwnlib.util.misc import python_2_bytes_compatible, align @@ -115,7 +113,7 @@ def __init__(self, value, address = 0): if isinstance(v, (list, tuple)): self.size += context.bytes else: - if isinstance(v, six.text_type): + if isinstance(v, str): v = packing._need_bytes(v) try: self.size += align(context.bytes, len(v)) @@ -175,7 +173,7 @@ def resolve(self, addr=None): for i, value in enumerate(self.values): if isinstance(value, int): rv[i] = value - elif isinstance(value, six.text_type): + elif isinstance(value, str): value = packing._need_bytes(value) if isinstance(value, (bytes, bytearray)): value += b'\x00' @@ -227,7 +225,7 @@ class Call(object): args = [] def __init__(self, name, target, args, abi=None, before=()): - assert isinstance(name, (bytes, six.text_type)) + assert isinstance(name, (bytes, str)) # assert isinstance(target, int) assert isinstance(args, (list, tuple)) self.abi = abi or ABI.default() diff --git a/pwnlib/rop/rop.py b/pwnlib/rop/rop.py index 90c98a0cd..57606b3a0 100644 --- a/pwnlib/rop/rop.py +++ b/pwnlib/rop/rop.py @@ -367,7 +367,6 @@ import os import re import shutil -import six import string import struct import sys @@ -603,7 +602,7 @@ def __init__(self, elfs, base = None, badchars = b'', **kwargs): # Permit singular ROP(elf) vs ROP([elf]) if isinstance(elfs, ELF): elfs = [elfs] - elif isinstance(elfs, (bytes, six.text_type)): + elif isinstance(elfs, (bytes, str)): elfs = [ELF(elfs)] #: List of individual ROP gadgets, ROP calls, SROP frames, etc. @@ -843,7 +842,7 @@ def describe(self, object): return str(object) if isinstance(object, int): return self.unresolve(object) - if isinstance(object, (bytes, six.text_type)): + if isinstance(object, (bytes, str)): return repr(object) if isinstance(object, Gadget): return '; '.join(object.insns) @@ -893,7 +892,7 @@ def build(self, base = None, description = None): # Byte blobs can also be added, however they must be # broken down into pointer-width blobs. - elif isinstance(slot, (bytes, six.text_type)): + elif isinstance(slot, (bytes, str)): stack.describe(self.describe(slot)) if not isinstance(slot, bytes): slot = slot.encode() @@ -1014,7 +1013,7 @@ def build(self, base = None, description = None): if isinstance(slot, int): pass - elif isinstance(slot, (bytes, six.text_type)): + elif isinstance(slot, (bytes, str)): pass elif isinstance(slot, AppendedArgument): diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscall.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscall.asm index fb3d2318c..d7da7c0f3 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscall.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import aarch64, pretty from pwnlib.constants import Constant from pwnlib.abi import darwin_aarch64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -28,7 +27,7 @@ Example: svc 0 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm index 1f74b7377..d469389c9 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm index 08e080de0..a5b38a77e 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm index 3e12b01f6..b22a1bf3d 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm index 42806a004..a40751cd4 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm index a5f691716..f8078ad90 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm index b4fe7b4e8..edd6284e3 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm index a20c06995..0dad1f221 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/freebsd/syscall.asm b/pwnlib/shellcraft/templates/aarch64/freebsd/syscall.asm index e08b5b4a2..95960f52e 100644 --- a/pwnlib/shellcraft/templates/aarch64/freebsd/syscall.asm +++ b/pwnlib/shellcraft/templates/aarch64/freebsd/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import aarch64, pretty from pwnlib.constants import Constant from pwnlib.abi import freebsd_aarch64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -28,7 +27,7 @@ Example: svc 0 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/aarch64/linux/syscall.asm b/pwnlib/shellcraft/templates/aarch64/linux/syscall.asm index b0acc3068..0891c3add 100644 --- a/pwnlib/shellcraft/templates/aarch64/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/aarch64/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import aarch64, pretty from pwnlib.constants import eval from pwnlib.abi import linux_aarch64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None, arg6 = None"/> <%docstring> @@ -51,7 +50,7 @@ Example: svc 0 <% - if isinstance(syscall, (str, text_type)) and syscall.startswith('SYS_'): + if isinstance(syscall, str) and syscall.startswith('SYS_'): syscall_repr = syscall[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/aarch64/pushstr.asm b/pwnlib/shellcraft/templates/aarch64/pushstr.asm index c5cf0e15d..06a320974 100644 --- a/pwnlib/shellcraft/templates/aarch64/pushstr.asm +++ b/pwnlib/shellcraft/templates/aarch64/pushstr.asm @@ -1,6 +1,5 @@ <% from pwnlib.util import lists, packing, fiddling %> <% from pwnlib import shellcraft %> -<% import six %> <%page args="string, append_null = True, register1='x14', register2='x15', pretty=None"/> <%docstring> Pushes a string onto the stack. @@ -30,7 +29,7 @@ Examples: b'Hello, world! This is a long string! Wow!' <% -if isinstance(string, six.text_type): +if isinstance(string, str): string = string.encode('utf-8') if append_null and not string.endswith(b'\x00'): diff --git a/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm b/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm index 7b5ed7302..2e1d31570 100644 --- a/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm +++ b/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm @@ -3,7 +3,7 @@ from pwnlib.shellcraft import pretty from pwnlib.util.iters import group from pwnlib.util.packing import _need_bytes - from six import text_type, binary_type + from six import binary_type %> <%docstring> Pushes an array/envp-style array of pointers onto the stack. @@ -24,7 +24,7 @@ Example: <%page args="reg, array, register1='x14', register2='x15'"/> <% -if isinstance(array, (binary_type, text_type)): +if isinstance(array, (binary_type, str)): array = [array] # Convert all items to strings diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscall.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscall.asm index 526d9a4d1..eb9328fb6 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscall.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import amd64, pretty from pwnlib.constants import Constant from pwnlib.abi import darwin_amd64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -82,7 +81,7 @@ Example: <% append_cdq = False - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm index 1f74b7377..d469389c9 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm index 08e080de0..a5b38a77e 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm index 3e12b01f6..b22a1bf3d 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm index 42806a004..a40751cd4 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm index a5f691716..f8078ad90 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm index b4fe7b4e8..edd6284e3 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm index a20c06995..0dad1f221 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/freebsd/syscall.asm b/pwnlib/shellcraft/templates/amd64/freebsd/syscall.asm index c33ea8a97..25bbe1fb9 100644 --- a/pwnlib/shellcraft/templates/amd64/freebsd/syscall.asm +++ b/pwnlib/shellcraft/templates/amd64/freebsd/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import amd64, pretty from pwnlib.constants import Constant from pwnlib.abi import freebsd_amd64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -71,7 +70,7 @@ Example: syscall <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/amd64/linux/syscall.asm b/pwnlib/shellcraft/templates/amd64/linux/syscall.asm index a1c971a1f..f3381901e 100644 --- a/pwnlib/shellcraft/templates/amd64/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/amd64/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import amd64, pretty from pwnlib.constants import Constant from pwnlib.abi import linux_amd64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -101,7 +100,7 @@ Example: <% append_cdq = False - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/amd64/push.asm b/pwnlib/shellcraft/templates/amd64/push.asm index 1792f7ca6..4a94afaa2 100644 --- a/pwnlib/shellcraft/templates/amd64/push.asm +++ b/pwnlib/shellcraft/templates/amd64/push.asm @@ -5,7 +5,6 @@ from pwnlib import constants from pwnlib.shellcraft.registers import amd64 as regs from pwnlib.context import context as ctx # Ugly hack, mako will not let it be called context - from six import text_type import re %> <%page args="value"/> @@ -50,7 +49,7 @@ Example: is_reg = False if value in regs: is_reg = True - if not is_reg and isinstance(value, (str, text_type)): + if not is_reg and isinstance(value, str): try: with ctx.local(arch = 'amd64'): value = constants.eval(value) diff --git a/pwnlib/shellcraft/templates/amd64/pushstr.asm b/pwnlib/shellcraft/templates/amd64/pushstr.asm index 104ae2c51..3760667b4 100644 --- a/pwnlib/shellcraft/templates/amd64/pushstr.asm +++ b/pwnlib/shellcraft/templates/amd64/pushstr.asm @@ -62,7 +62,7 @@ Args: append_null (bool): Whether to append a single NULL-byte before pushing. <% - if isinstance(string, six.text_type): + if isinstance(string, str): string = string.encode('utf-8') if append_null and not string.endswith(b'\x00'): string += b'\x00' diff --git a/pwnlib/shellcraft/templates/arm/freebsd/syscall.asm b/pwnlib/shellcraft/templates/arm/freebsd/syscall.asm index 421f1f1ae..14772e630 100644 --- a/pwnlib/shellcraft/templates/arm/freebsd/syscall.asm +++ b/pwnlib/shellcraft/templates/arm/freebsd/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import arm, pretty from pwnlib.constants import Constant from pwnlib.abi import freebsd_arm_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -28,7 +27,7 @@ Example: svc 0 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/arm/linux/syscall.asm b/pwnlib/shellcraft/templates/arm/linux/syscall.asm index de3f89ad3..72fcc0852 100644 --- a/pwnlib/shellcraft/templates/arm/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/arm/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import arm, pretty from pwnlib.constants import eval from pwnlib.abi import linux_arm_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None, arg6 = None"/> <%docstring> @@ -49,7 +48,7 @@ Example: svc 0 <% - if isinstance(syscall, (str, text_type)) and syscall.startswith('SYS_'): + if isinstance(syscall, str) and syscall.startswith('SYS_'): syscall_repr = syscall[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/arm/pushstr.asm b/pwnlib/shellcraft/templates/arm/pushstr.asm index 8975a4d28..02391c23f 100644 --- a/pwnlib/shellcraft/templates/arm/pushstr.asm +++ b/pwnlib/shellcraft/templates/arm/pushstr.asm @@ -1,7 +1,6 @@ <% from pwnlib.util import lists, packing, fiddling %> <% from pwnlib.shellcraft.arm import push %> <% from pwnlib.shellcraft import pretty %> -<% import six %> <%page args="string, append_null = True, register='r7'"/> <%docstring> Pushes a string onto the stack. @@ -24,7 +23,7 @@ Examples: <% - if isinstance(string, six.text_type): + if isinstance(string, str): string = string.encode('utf-8') if append_null: diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm index 3eedc9c04..1e206c1d3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm index 59d3f454d..3e5056eca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm index c3084db0c..e7ec14a36 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm index e4810e139..7f9ba5e86 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm index d6a635dba..540e46234 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm index f3fd88e0d..ba5f87884 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm index c62eb386f..618f30b5f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm index a9133a04f..7ffd7248c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm index b170de61e..2d084a000 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm index 1da013333..4684511da 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm index df6c709dd..918643d14 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm index 9b8f42e79..bf4f8dfa3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm index 35736ab83..6ec0a1d3c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm index b1d4aa1d4..a33228b95 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm index e65f4afb3..79a1eade1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm index 27eff5293..0eee7611d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm index 0d4823ec4..3f075130f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm index ef074304c..bee9012d7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm index 1a3154c3b..35488ffd3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm index 8d0004dbd..caddc7828 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm index bdf66609a..3b155ae7c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm index 9515bf466..79a4d22e3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm index ba767931b..6c0706c75 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm index 446741a7e..3d517e19d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm index 0ae1b46a3..4256ccc84 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm index 894bd3fbe..a93a497f5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm index df3b319d5..6f4b62f0d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm index 037bcb418..4eeda6099 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm index eabaf7f52..a5ddd4ce8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm index 203d9eee9..775c3226d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm index 99f2c5d4b..9909819be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm index 1d457df04..05430ef0e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm index 8498e48c5..9d5e91f94 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm index 248180a7c..da543f648 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm index 89d1596ef..6df171ea1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm index bd9b1df65..dbeacdd75 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm index 85bda7c76..c7af09e93 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm index 03addde39..a49d73c2e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm index c5f9f772f..5afc6484e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm index 00a037dd6..cd7687443 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm index 11003f6bd..b24bebb6c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm index ea9c2c6d5..4da071063 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm index ecb77a9b6..9ad10ca25 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm index a52f14952..189d63435 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm index 98554b265..673463197 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm index 960f62087..65d484160 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm index 945cf2416..976babfad 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm index 922a3d06d..29309c4a5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm index 60b0d8b05..66ba73ded 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm index f235bc3b4..6fd5811fd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm index e5f64888e..6ea18b139 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm index a5fa95d3d..5722c0d66 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm index aa174e1d8..675d740f9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm index 09a3bcf98..5cd041704 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm index a90c18ac8..e4f8814fc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm index fd8e87fc0..aa4008a92 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm index a06777704..d965ef84f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm index f6f44ba71..166ab3061 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm index 49d2afe21..82f73fd74 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm index 6291327bb..6863c4d1d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm index c280701f7..65d9526cd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm index 56df88bcc..89befd04f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm index 473eee7f0..9bfeb26c6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm index 60b8d4a23..e9a92026a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm index f2e5ed35e..9ae855b54 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm index a1c015538..9ee7f62a7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm index 5d6f05d18..0aac64c33 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm index d364aa019..90e56ccf4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm index 4d4f99609..1428dbf5f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm index 9a4fae4dc..02c3989ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm index 8e26f9fb5..b7084ca90 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm index 573f017e1..0120d4650 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm index b15b46ae9..da873a57c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm index 1e0f14d42..bada6a09b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm index e1505fafe..2b7c3c4cc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm index b7ece230c..4c5312f3b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm index 5dd88c2ac..95763485c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm index ff3b2cef7..b127ead90 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm index 9a51d22fc..e3a7e458c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm index c237bb20e..be0451598 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm index 39ed0e3f5..3ae2a4f11 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm index 804d7dd04..e1ad9bd01 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm index 645f36f8a..abefab0bd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm index 4e0bd4f7f..dce374a84 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm index 3670f5a42..0f75c4406 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm index dedebd9ca..be4105f41 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm index 019d6752e..627e5ca22 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm index 80bb5882e..f56ae3e0f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm index 8ea87914c..dc90cc18d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm index 5b9c1c2e3..2304230aa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm index fe1ea366e..32f5b0eff 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm index e415cb9e7..7d708ea67 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm index 62b18ab5f..e61b683af 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm index 610dbcaee..ece02e0f0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm index 9996e8bdd..2493b0c6d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm index 1ba1bd221..082131128 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm index 36b4f7ff9..7760bb2ae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm index 9f353280b..46d396f67 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm index ef0d54195..81fb7ed51 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm index 60648689a..03be9c4b8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm index f8fe31d3f..6406d309c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm index 0b0a56a76..86bece867 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm index 6512f2fd2..e553415aa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm index 2aff8eb8d..e4efef8ea 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm index 6f8df453d..571705162 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm index 5caafed4d..c2c21b048 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm index a9295e468..42484ef0b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm index 2c86b91ef..8572dc996 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm index 14bb85b4f..485a1e7c6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm index 02f86d445..9dd574894 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm index f98346bf3..36530bba2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm index 0a1818af1..6c9769255 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm index ea51af8d0..572fa9fd8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm index f2e01cfc5..6e9d11562 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm index fde842aa6..4cd4d8a7c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm index ae78ab76d..04adfa7a8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm index 2aed2b383..badaed6a2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm index 2e800d370..8f7e0ad67 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm index 74bb0f55d..12fdc2796 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm index 5b8a42ef7..5421c4f6c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm index be2695244..74371e87d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm index 8f40e60ed..bb77ed5c7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm index f9a0ea4ed..3fe66f64e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm index 7663b2885..7c4a4dac6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm index 6b39026c0..b633a3750 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm index 60b16f950..fb46d978f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm index db65c32db..80feed425 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm index 0d5328462..395c19db7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm index 8087531ef..837c690f5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm index 67aa065c3..49d3d9276 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm index 7dbf29dfc..214b560b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm index f44acdb4f..d43575eff 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm index 88bfbf3db..4e9923bd4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm index ee04bbdbd..1e1d16302 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm index 9ad22fffe..2726d8e7c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm index bee4d43f6..b14304056 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm index 07a0f6bc9..839965589 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm index b2334aa11..86cf45b24 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm index c8f07d5e3..d8fd02bc4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm index da4575ba2..67b0852ae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm index 7be2da334..45befb810 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm index 69c3a0b5c..73a8957b3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm index 9f9dc2dfb..9182f8463 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm index 74c9b57a2..50f5c6676 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm index 33eacdcb6..99eed84a3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm index 189916cce..396e3ca5e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm index 4b6955231..d9f04a354 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm index b6c1e2ae2..01ef46af8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm index e4102c40b..380edd776 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm index 3b95bd578..a583d0287 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm index fd9f99455..7a408e16f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm index 4475ac40a..1a74221d3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm index 50ecf6f6b..9762afb58 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm index 438d17a1a..9042f71c7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm index 0dcf795ae..2e07fd646 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm index 1a058fea9..bd3e6ef6a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm index d2227f9da..94478f6a6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm index 45e5309e5..b113e38fc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm index bd04fa70d..44f73cd93 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm index a710c44d8..5b5007a7b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm index d1b89c2f0..6048debf8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm index 3d7ee9386..e67aa1d03 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm index fd6c60c5f..0fd71f359 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm index 1e8fbe0b9..8fe11dc73 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm index 80038170f..141cecef1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm index 5d6ddf920..465681255 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm index b07f0ff1b..346153868 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm index e3a906816..1d0bce657 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm index 8115fddd5..5ebe884f0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm index e0e84503d..84c827822 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm index 0fe71e4e1..fc0512398 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm index 5dccefea3..35cfdf07a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm index bc839851d..dbbbc038a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm index 92820b487..d4427c529 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm index 77603e94b..5862dad10 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm index 05a1ca3be..d1497b66c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm index 920d91e97..15b8fe9e7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm index 179d2f7f7..776d86695 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm index 0a138bcc2..fbfa038e0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm index 1698624ac..93d439194 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm index 768ab6604..5cfa4d4db 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm index 8917d528d..ca04b1979 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm index e334411be..d55064d59 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm index d297b2a6f..8b00de391 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm index 27e653036..4334454cd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm index f5759491b..23253aeea 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm index e88e1e05c..66e640bd0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm index db1075cbc..bc336547f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm index 3413214a1..9d2a4475e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm index 58a8ad722..7d0549265 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm index f367e155f..b62d0ea33 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm index f7956d934..5f5e0385b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm index 9bb908cd6..36706c3d1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm index b03993f28..6ebad5c4a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm index 622c4666c..12a47f37e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm index d9e067a34..b57d0f95c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm index c5b8ee210..63481a9dc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm index 6dc94e17d..8961f8075 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm index 63cbd15db..6a8cbbb2a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm index 56b1d95a5..22c40b451 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm index f11c171ad..96435f1c5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm index 6d4184054..71c716ff0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm index ad58eb582..a87517430 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm index ea011bae8..1d5aa6bba 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm index 283b824a3..b671c75c1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm index a033065a8..d00d9cbc0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm index 8ee17fefe..0c17359c6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm index 92cbe1a00..ef11f4102 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm index 266bb7df5..4d8a7e68b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm index b510af4c0..fa176a89f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm index d1f7e1f1d..e97d657c5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm index 4b8edba80..1c9aa8515 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm index 33cc2f5af..d892eb196 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm index df5d0474c..6e4db7d48 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm index 2642cd97e..5c910ccaf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm index 9a17360d0..6872b5d87 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm index 9cf1c128d..791cce926 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm index fd25c20f6..3a839a4be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm index 0173bd900..3b4753f1b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm index d01e5c367..340cbe522 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm index 9923b112f..4135edc84 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm index 547189127..3d76f5a25 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm index 0d955e259..25e7e1cca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm index 7d8f3dc76..a2ca75c0f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm index 210664eac..3c40a7635 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm index 68c3312ef..b25d7a37a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm index 4ea7f03be..48cb84219 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm index 56a6debb1..66bfc75cc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm index adcb1b2f7..c7a1fd619 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm index 9656f0c3f..00277fd61 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm index 7e7bd2247..9206dff19 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm index ce5e529bb..03b8f8657 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm index 89c2cb620..4b3258bd6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm index 9fe5f2022..ed2630c77 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm index 5890a006e..47df55102 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm index 7605a85b5..76ed40e8a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm index caac21dbc..e4b7b7ffd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm index 0e703ef4c..910676666 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm index 50f1698e2..f363d039c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm index f6e6e8c65..34fbaa437 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm index 630e68a0c..3f482754c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm index edd8ba6cc..36b8e1747 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm index eb6cdb9cf..bd555a6d8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm index 0b64e97c8..49e6467dd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm index 297ee9488..42e224b40 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm index ace6e8874..f55ac6465 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm index 39360db42..afab687a2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm index bb4c119fc..a439cf71e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm index b32d8b148..6b3f14ea0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm index ede24fab7..24d52e127 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm index f9e95552c..80127a64e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm index f43526b18..cd17891b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm index 866f30c52..ed6faa0c4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm index 963e5065f..4d08bf9d1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm index 8337eaef9..88f45cc5b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm index 0ae267b6b..c496f1552 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm index cbc72413d..4808d4a4c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm index aa7a169d5..280d2e5e6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm index 1872488ba..88a55ad49 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm index 40ac96098..7d1e67ccb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm index 4fb910f08..1c4d6a213 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm index bd8a8d53a..4d4bfc698 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm index e105aff82..2090987be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm index e1d04165d..aa0226e48 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm index c5dfdfd86..0d3327d4a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm index 0cdae7946..b576b8c46 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm index e21ad0f1e..f7ea64761 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm index 7b803fa16..e5a03dcbd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm index 621493ead..8e1d17a49 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm index b18fcd3db..841fbc75f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm index b008afdbf..696b41b11 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm index dfeb1ee86..d7c587215 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm index 3ee6c82b8..b23c387e1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm index 6a6357a2c..4f21a7295 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm index 338b4751f..2b8cda500 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm index d621ea8ef..98e1a6224 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm index ff04c92a9..f9b653f33 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm index 4fdf729c8..2aef257b8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm index bf3c0066c..07aa26173 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm index c7d657798..0adaeead3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm index bb145c804..b8255fce1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm index 566e21649..f8e2cef48 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm index bf3c03cc6..fba434ee2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm index e55e74d72..e984a98cf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm index 72bd4aaca..705230b6a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm index 2f55f2db6..1d68290ec 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm index 17fac6174..fe83cec42 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm index 486c56f51..ceb113366 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm index e6df22e8a..23b016f08 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm index 1efe333e3..0fa5d2ffc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm index a776721d5..82564ad63 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm index 4c0aadef5..b7f85ce97 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm index e8729579e..b26e4ebab 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm index 5369ca059..42603b04b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm index 6864700d9..05b4eb55b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm index fdc2a03f6..44ad52e24 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm index 85621b800..938a5c126 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm index ad072d59f..48d557109 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm index 05d465111..308dcff43 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm index a83867418..770affe52 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm index 1cd3d128f..425c334ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm index 46eff9307..1c974dafa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm index a7d357413..e2ca55ab8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm index 1d44b10b9..28c126a0e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm index 8a7ac1529..c32557f08 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm index 30daef5a9..4ed3b74ff 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm index acbd67929..83d0c2e8c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm index fd2d049ed..54f001901 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm index 36f093533..78e040caf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm index 532c6802b..52911637b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm index effc01603..d42374c30 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm index 934466fb1..c2b067af7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm index bc7db37d4..b2227c17f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm index 98b5f3b09..21a7e1c0d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm index be2045848..41a30e1ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm index aaa683f9a..72070b1ae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm index ab2c2a295..474e1f987 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm index 785352d91..20430e324 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm index 4410a54b8..cdb5ade1f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm index 8f8fc4d1d..1afaf4155 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm index 430b15ca6..a08c64694 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm index c252381ee..2299efeb1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm index b830473e9..02abe601a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm index 70bca5a1f..1051409e2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm index ce9b5a744..33b1f831a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm index e34561170..de971d9e7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm index 590b155f7..08555ecc9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm index f79e38bff..3bf188842 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm index 10f618d19..f8492551f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm index 0ebbc25cd..35b68b05d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm index 442c33e8d..79011232c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm index d05d8eace..bf69f24b7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm index 426e835a3..11563dcdb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm index 2004a1849..9f559d921 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm index 7239231de..69689c3b6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm index 5c2e76143..4de26e00a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm index f0789ce1d..37607deba 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm index b4f06d1c6..f53f915b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm index 39d2ddd21..374f5b599 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm index afae84492..cb778b733 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm index e18a6f191..6f16e9f20 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm index 7338af023..d328d91df 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm index 11ff295be..4e1dc5373 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm index 2f6ad3a38..748286a18 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm index 64a5f507c..0a6968f0f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm index ca825877a..c9a11ea29 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm index 8b4b176c4..dc1c36a85 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm index d94023391..47b017ae0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm index 76c967155..0ef983d1b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm index 68e460152..672444ae6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm index 74962f67d..7b6585851 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm index e4bac6045..1ebac66d5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm index f1ce026e7..f1500fa3d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm index 4c74e4cd9..0088eca5b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm index 15de2a88b..1941461b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm index 2e52b89be..6f270d2fb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm index 2529371da..ccf71afdf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm index f6a3f7aaf..963b5a9be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm index fa6c87207..de6c59d10 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm index f6dd87cba..4db32a5bd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm index 437a7e712..31a9eb17f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm index 521fdedff..1579a139c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm index d8402fc50..8f5f0297f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm index 1846c3338..07b62f0a1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm index 533a719c0..44064eadd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm index 0bec32588..7fbff6e42 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm index 215180fc0..99f75b74e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm index bf81f45c4..a77d721d3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm index c05371680..f70d62343 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm index db7e485ed..d824a5fc2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm index e1a0d0209..a25d74a37 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm index 2b5cb11d5..b8a38991f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm @@ -56,8 +56,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm index 3580171a7..ddf03c743 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm index 5b15dee8d..5bc101069 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm index eb2a0fa5e..74fcbbcb8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm index 932a96427..edf2e6211 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm index d4f0b8422..e5fca83c5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm index 581c79e5d..5ffa0ac15 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm index 95be329dd..17ed34df6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm index b6cc7fe32..279d2e5f3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm index 17d775caf..89e6a2418 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm index aad39bbfa..6bb04f2ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm index e9baec77f..cb7ffb7b6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm index bdfbcfb5d..40e39bdb3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm index 676b30028..0e82fbfbb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm index 8f6101bdd..31123af7d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm index 1610c58e2..40d11d934 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm index 8ecdf2818..429b18837 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm index bfd1dca32..452896550 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm index b8e6800a0..d99f2de9f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm index 082764e97..b0e829672 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm index 7bc3fa69a..fac2d1b7e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm index f935c7290..c01a931d7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm index 57096bdcd..472642bcf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm index a52a450e3..c5f8d9b89 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm index 88366bf8e..4c5686e63 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm index 8e5d86405..a2dcb461c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm index 9a29e9281..e134554d3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm index a7b00be1f..485088cb4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm index a85eefb01..f27ab9bd0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm index 67a461e75..556166884 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm index 1701d4f8b..78886bdbe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm index c283bd3bc..be3e07ac6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm index 602ead26e..37aafd3c8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm index 0d8e37f24..e1f67d94c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm index aeda36e92..700e92866 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm index 96d4b9262..6b16af17b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm index dbdb9e315..be29d2dd5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm index bd2d2cf3c..27bba1320 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm index 666d0fb7e..e58c66afe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm index df825e874..3296b7daf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm @@ -57,8 +57,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm index 9e6623c16..e270942b4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm index 3be17fbe9..1029a3e5d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm index 2b6896671..8a146b350 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm index dbf242535..eb392bc5b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm index 30b0e5ca8..461b71b16 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm index c8a693a04..b801bfcce 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm index a729df423..deb26242d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm index 5a2b8ccaa..e426dc433 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm index 7988e9512..d68eb5b6d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm index 966f5e719..c7964d8ce 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm index 6d7bdec87..ec3cb138c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm index 44a146b94..4d1ba6797 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm index 244804221..2e08b38aa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm index 106f2cdfd..18b00d174 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm index a516eea19..97cb9e6d6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm index 77894516b..63cb7b724 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm index c67f2dd42..9dada7139 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm index 03c6ec0e2..121fc098e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm index c2b3aaa74..d7f318efe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm index a756a0b2d..4231e02dd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm index 19cb3b51d..e432b7499 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm index cea4f4e21..88f2a82f5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm index d65886016..dfeb5c13b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm index 3e45f1246..6140d88cd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm index f8d81c40d..29eae0fcf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm index 2cbb2fb48..dea366fe8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm index fb47c7616..68a102fe7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm index 587fffc00..3da0c93e5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm index 048c02465..566574b89 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm index e00097653..944582c07 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm index 6e0d9b984..0a5e905f1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm index 2eca15382..3e21056ac 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm index 2297b341c..bfe8c7358 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm index 6d2445a43..dee9ff3f7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm index b55c6a3c9..99ce9bc07 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm index 5f4ffe1a0..3d54ad650 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm index eafdab35d..8273af349 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm index 7bb53b938..c619bd830 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm index a10932e40..3a47fa226 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm index 52f33750a..c36a9d490 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm index 055bbffb0..1a96a8ca6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm index 85815e666..ad4fc5a17 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm index 56081278d..8dbda9817 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm index 64676a3f2..4dea61bae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm index c50126577..1c4647550 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm index 33f1743a6..de00a2163 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm index dd14a9509..7cfb468f4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm index 1edda3bc0..5f4ea9120 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm index 6a5e71a1e..cf56e1a24 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm index 4513cc314..de6677050 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm index 4acb894e8..b55e45219 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm index 77c04a43f..39c897f07 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm index 14044bbe3..1a78417d7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm index f7bbf5b76..23bcc52e5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm index 8e55a878c..7a4e7dbb7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm index bf4462517..7dd521a0c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm index 36039daab..be5c5dd2c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm index 33aa64fbc..221eb059f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm index c346e2b74..7ce5264d0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm index 13eb78491..8708e52ee 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm index 30cff2a7a..629f00c71 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm index 0d0444f7e..3471248cb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm index b78351b19..881b9b33a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm index a824d1425..660fe0955 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm @@ -53,8 +53,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm index 269fabceb..1a77b08d5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm index a7256608d..6d5e4caff 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm index 5ce055aee..0122cfedb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm @@ -52,8 +52,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm index c51f92045..e91a7ee2a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm index abeb66dd4..20f1a6a5d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm @@ -55,8 +55,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm index 2a9f09024..e19bfd7ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm index 24e7f17af..65c65071e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm index 0d23c5f58..dec4e260c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm @@ -54,8 +54,8 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, six.text_type)): - if isinstance(arg, six.text_type): + elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/i386/cgc/syscall.asm b/pwnlib/shellcraft/templates/i386/cgc/syscall.asm index d7774cf0e..4be7781b6 100644 --- a/pwnlib/shellcraft/templates/i386/cgc/syscall.asm +++ b/pwnlib/shellcraft/templates/i386/cgc/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import i386 from pwnlib.constants import Constant from pwnlib.abi import linux_i386_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -13,7 +12,7 @@ Any of the arguments can be expressions to be evaluated by :func:`pwnlib.constan <% append_cdq = False - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/i386/freebsd/syscall.asm b/pwnlib/shellcraft/templates/i386/freebsd/syscall.asm index 3bbd24291..eb33cf676 100644 --- a/pwnlib/shellcraft/templates/i386/freebsd/syscall.asm +++ b/pwnlib/shellcraft/templates/i386/freebsd/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import i386, pretty from pwnlib.constants import Constant from pwnlib.abi import freebsd_i386_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -60,7 +59,7 @@ Example: int 0x80 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/i386/linux/syscall.asm b/pwnlib/shellcraft/templates/i386/linux/syscall.asm index 8e493ec27..bf09ab5ee 100644 --- a/pwnlib/shellcraft/templates/i386/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/i386/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import i386, pretty from pwnlib.constants import Constant from pwnlib.abi import linux_i386_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -85,7 +84,7 @@ Example: int 0x80 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/i386/push.asm b/pwnlib/shellcraft/templates/i386/push.asm index 0efa07257..1a785d282 100644 --- a/pwnlib/shellcraft/templates/i386/push.asm +++ b/pwnlib/shellcraft/templates/i386/push.asm @@ -3,7 +3,6 @@ from pwnlib.shellcraft import i386 from pwnlib import constants from pwnlib.shellcraft.registers import get_register, is_register, bits_required - from six import text_type import re %> <%page args="value"/> @@ -49,7 +48,7 @@ Example: value_orig = value is_reg = get_register(value) -if not is_reg and isinstance(value, (str, text_type)): +if not is_reg and isinstance(value, str): try: value = constants.eval(value) except (ValueError, AttributeError): diff --git a/pwnlib/shellcraft/templates/i386/pushstr.asm b/pwnlib/shellcraft/templates/i386/pushstr.asm index ae0ad9668..0119278f4 100644 --- a/pwnlib/shellcraft/templates/i386/pushstr.asm +++ b/pwnlib/shellcraft/templates/i386/pushstr.asm @@ -63,7 +63,7 @@ Args: <% original = string -if isinstance(string, six.text_type): +if isinstance(string, str): string = packing._need_bytes(string, 2, 0x80) else: string = packing.flat(string) @@ -72,7 +72,7 @@ if append_null: string += b'\x00' if isinstance(original, six.binary_type): original += b'\x00' - elif isinstance(original, six.text_type): + elif isinstance(original, str): original += '\x00' if not string: diff --git a/pwnlib/shellcraft/templates/mips/freebsd/syscall.asm b/pwnlib/shellcraft/templates/mips/freebsd/syscall.asm index 391955f75..f8c5bf981 100644 --- a/pwnlib/shellcraft/templates/mips/freebsd/syscall.asm +++ b/pwnlib/shellcraft/templates/mips/freebsd/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import mips, pretty from pwnlib.constants import Constant from pwnlib.abi import freebsd_mips_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -53,7 +52,7 @@ Example: syscall 0x40404 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/mips/linux/syscall.asm b/pwnlib/shellcraft/templates/mips/linux/syscall.asm index 07cf02f6c..ea19cdbea 100644 --- a/pwnlib/shellcraft/templates/mips/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/mips/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import mips, pretty from pwnlib.constants import Constant from pwnlib.abi import linux_mips_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4=None, arg5=None"/> <%docstring> @@ -88,7 +87,7 @@ Example: syscall 0x40404 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/mips/push.asm b/pwnlib/shellcraft/templates/mips/push.asm index 43dc293a9..044eeaf85 100644 --- a/pwnlib/shellcraft/templates/mips/push.asm +++ b/pwnlib/shellcraft/templates/mips/push.asm @@ -3,7 +3,7 @@ from pwnlib.shellcraft import mips from pwnlib import constants from pwnlib.shellcraft import registers - from six import text_type, binary_type + from six import binary_type import re %> <%page args="value"/> @@ -14,7 +14,7 @@ Pushes a value onto the stack. value_orig = value is_reg = value in registers.mips -if not is_reg and isinstance(value, (binary_type, text_type)): +if not is_reg and isinstance(value, (binary_type, str)): try: value = constants.eval(value) except (ValueError, AttributeError): diff --git a/pwnlib/shellcraft/templates/mips/pushstr.asm b/pwnlib/shellcraft/templates/mips/pushstr.asm index e4025a148..2bacfe62a 100644 --- a/pwnlib/shellcraft/templates/mips/pushstr.asm +++ b/pwnlib/shellcraft/templates/mips/pushstr.asm @@ -1,7 +1,6 @@ <% from pwnlib.util import lists, packing, fiddling from pwnlib.shellcraft import mips, pretty - import six %>\ <%page args="string, append_null = True"/> <%docstring> @@ -74,7 +73,7 @@ Args: append_null (bool): Whether to append a single NULL-byte before pushing. <% - if isinstance(string, six.text_type): + if isinstance(string, str): string = string.encode('utf-8') if append_null: string += b'\x00' diff --git a/pwnlib/shellcraft/templates/riscv64/linux/syscall.asm b/pwnlib/shellcraft/templates/riscv64/linux/syscall.asm index 85bd4bdd1..1d6766758 100644 --- a/pwnlib/shellcraft/templates/riscv64/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/riscv64/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import riscv64, pretty from pwnlib.constants import Constant from pwnlib.abi import linux_riscv64_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4=None, arg5=None"/> <%docstring> @@ -79,7 +78,7 @@ Example: ecall <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/riscv64/push.asm b/pwnlib/shellcraft/templates/riscv64/push.asm index 0a9f97adc..9cc6193c3 100644 --- a/pwnlib/shellcraft/templates/riscv64/push.asm +++ b/pwnlib/shellcraft/templates/riscv64/push.asm @@ -2,7 +2,7 @@ from pwnlib.shellcraft import riscv64 from pwnlib import constants from pwnlib.shellcraft import registers - from six import text_type, binary_type + from six import binary_type %> <%page args="value"/> <%docstring> @@ -13,7 +13,7 @@ Register t4 is not guaranteed to be preserved. <% is_reg = value in registers.riscv -if not is_reg and isinstance(value, (binary_type, text_type)): +if not is_reg and isinstance(value, (binary_type, str)): try: value = constants.eval(value) except (ValueError, AttributeError): diff --git a/pwnlib/shellcraft/templates/riscv64/pushstr.asm b/pwnlib/shellcraft/templates/riscv64/pushstr.asm index 252536e27..e7aae9961 100644 --- a/pwnlib/shellcraft/templates/riscv64/pushstr.asm +++ b/pwnlib/shellcraft/templates/riscv64/pushstr.asm @@ -1,7 +1,6 @@ <% from pwnlib.util import lists, packing, fiddling from pwnlib.shellcraft import riscv64, pretty - import six %>\ <%page args="string, append_null = True"/> <%docstring> @@ -71,7 +70,7 @@ Args: append_null (bool): Whether to append a single NULL-byte before pushing. <% - if isinstance(string, six.text_type): + if isinstance(string, str): string = string.encode('utf-8') if append_null: string += b'\x00' diff --git a/pwnlib/shellcraft/templates/thumb/freebsd/syscall.asm b/pwnlib/shellcraft/templates/thumb/freebsd/syscall.asm index ec4238e3a..9598d5da7 100644 --- a/pwnlib/shellcraft/templates/thumb/freebsd/syscall.asm +++ b/pwnlib/shellcraft/templates/thumb/freebsd/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import thumb, pretty from pwnlib.constants import Constant from pwnlib.abi import freebsd_arm_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None"/> <%docstring> @@ -28,7 +27,7 @@ Example: svc 0x41 <% - if isinstance(syscall, (str, text_type, Constant)) and str(syscall).startswith('SYS_'): + if isinstance(syscall, (str, Constant)) and str(syscall).startswith('SYS_'): syscall_repr = str(syscall)[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/thumb/linux/syscall.asm b/pwnlib/shellcraft/templates/thumb/linux/syscall.asm index d0720c3ea..955b43cb6 100644 --- a/pwnlib/shellcraft/templates/thumb/linux/syscall.asm +++ b/pwnlib/shellcraft/templates/thumb/linux/syscall.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import thumb, pretty from pwnlib.constants import eval from pwnlib.abi import linux_arm_syscall as abi - from six import text_type %> <%page args="syscall = None, arg0 = None, arg1 = None, arg2 = None, arg3 = None, arg4 = None, arg5 = None, arg6 = None"/> <%docstring> @@ -57,7 +56,7 @@ Example: <% - if isinstance(syscall, (str, text_type)) and syscall.startswith('SYS_'): + if isinstance(syscall, str) and syscall.startswith('SYS_'): syscall_repr = syscall[4:] + "(%s)" args = [] else: diff --git a/pwnlib/shellcraft/templates/thumb/mov.asm b/pwnlib/shellcraft/templates/thumb/mov.asm index 693f73c34..e6fdac1ae 100644 --- a/pwnlib/shellcraft/templates/thumb/mov.asm +++ b/pwnlib/shellcraft/templates/thumb/mov.asm @@ -60,7 +60,7 @@ Example: <% log = getLogger(__name__) src_orig = src -if isinstance(src, (six.binary_type, six.text_type)): +if isinstance(src, (six.binary_type, str)): src = src.strip() if src.lower() in registers.arm: src = src.lower() diff --git a/pwnlib/shellcraft/templates/thumb/push.asm b/pwnlib/shellcraft/templates/thumb/push.asm index 2636e1589..1dec0cb85 100644 --- a/pwnlib/shellcraft/templates/thumb/push.asm +++ b/pwnlib/shellcraft/templates/thumb/push.asm @@ -50,7 +50,7 @@ Example: value_orig = value is_register = value in registers.arm -if not is_register and isinstance(value, (six.binary_type, six.text_type)): +if not is_register and isinstance(value, (six.binary_type, str)): try: with ctx.local(arch = 'thumb'): value = constants.eval(value) diff --git a/pwnlib/shellcraft/templates/thumb/pushstr.asm b/pwnlib/shellcraft/templates/thumb/pushstr.asm index be227c9d2..1aca76b96 100644 --- a/pwnlib/shellcraft/templates/thumb/pushstr.asm +++ b/pwnlib/shellcraft/templates/thumb/pushstr.asm @@ -1,7 +1,6 @@ <% from pwnlib.shellcraft import thumb, pretty from pwnlib.util import lists, packing - import six %> <%page args="string, append_null = True, register = 'r7'"/> <%docstring> @@ -36,7 +35,7 @@ on your version of binutils. <% - if isinstance(string, six.text_type): + if isinstance(string, str): string = string.encode('utf-8') if append_null: string += b'\x00' diff --git a/pwnlib/term/key.py b/pwnlib/term/key.py index e21477a46..89491328d 100644 --- a/pwnlib/term/key.py +++ b/pwnlib/term/key.py @@ -149,7 +149,7 @@ def __repr__(self): return self.__str__() def __eq__(self, other): - if isinstance(other, (six.text_type, six.binary_type)): + if isinstance(other, (str, six.binary_type)): return Matcher(other)(self) elif isinstance(other, Matcher): return other(self) diff --git a/pwnlib/tubes/ssh.py b/pwnlib/tubes/ssh.py index 6c76746b7..1f2c993cf 100644 --- a/pwnlib/tubes/ssh.py +++ b/pwnlib/tubes/ssh.py @@ -68,7 +68,7 @@ def __init__(self, parent, process = None, tty = False, cwd = None, env = None, self.env = env self.process = process self.cwd = cwd or '.' - if isinstance(cwd, six.text_type): + if isinstance(cwd, str): cwd = packing._need_bytes(cwd, 2, 0x80) env = env or {} @@ -76,7 +76,7 @@ def __init__(self, parent, process = None, tty = False, cwd = None, env = None, if isinstance(process, (list, tuple)): process = b' '.join(sh_string(packing._need_bytes(s, 2, 0x80)) for s in process) - if isinstance(process, six.text_type): + if isinstance(process, str): process = packing._need_bytes(process, 2, 0x80) if process and cwd: @@ -1813,12 +1813,12 @@ def set_working_directory(self, wd = None, symlink = False): """ status = 0 - if symlink and not isinstance(symlink, (six.binary_type, six.text_type)): + if symlink and not isinstance(symlink, (six.binary_type, str)): symlink = os.path.join(self.pwd(), b'*') if not hasattr(symlink, 'encode') and hasattr(symlink, 'decode'): symlink = symlink.decode('utf-8') - if isinstance(wd, six.text_type): + if isinstance(wd, str): wd = packing._need_bytes(wd, 2, 0x80) if not wd: diff --git a/pwnlib/tubes/tube.py b/pwnlib/tubes/tube.py index 22fa29cb8..26303aec7 100644 --- a/pwnlib/tubes/tube.py +++ b/pwnlib/tubes/tube.py @@ -364,7 +364,7 @@ def recvuntil(self, delims, drop=False, timeout=default): """ # Convert string into singleton tupple - if isinstance(delims, (bytes, bytearray, six.text_type)): + if isinstance(delims, (bytes, bytearray, str)): delims = (delims,) delims = tuple(map(packing._need_bytes, delims)) @@ -660,7 +660,7 @@ def recvline_contains(self, items, keepends=None, drop=None, timeout=default): >>> t.recvline_contains((b'car', b'train')) b'bicycle car train' """ - if isinstance(items, (bytes, bytearray, six.text_type)): + if isinstance(items, (bytes, bytearray, str)): items = (items,) items = tuple(map(packing._need_bytes, items)) @@ -698,7 +698,7 @@ def recvline_startswith(self, delims, keepends=None, drop=None, timeout=default) b'World' """ # Convert string into singleton tupple - if isinstance(delims, (bytes, bytearray, six.text_type)): + if isinstance(delims, (bytes, bytearray, str)): delims = (delims,) delims = tuple(map(packing._need_bytes, delims)) @@ -730,7 +730,7 @@ def recvline_endswith(self, delims, keepends=None, drop=None, timeout=default): b'Kaboodle' """ # Convert string into singleton tupple - if isinstance(delims, (bytes, bytearray, six.text_type)): + if isinstance(delims, (bytes, bytearray, str)): delims = (delims,) delims = tuple(packing._need_bytes(delim) + self.newline for delim in delims) @@ -766,7 +766,7 @@ def recvregex(self, regex, exact=False, timeout=default, capture=False): b'Bla blubb blargh\n' """ - if isinstance(regex, (bytes, bytearray, six.text_type)): + if isinstance(regex, (bytes, bytearray, str)): regex = packing._need_bytes(regex) regex = re.compile(regex) @@ -793,7 +793,7 @@ def recvline_regex(self, regex, exact=False, keepends=None, drop=None, timeout=d all data is buffered and an empty string (``''``) is returned. """ - if isinstance(regex, (bytes, bytearray, six.text_type)): + if isinstance(regex, (bytes, bytearray, str)): regex = packing._need_bytes(regex) regex = re.compile(regex) diff --git a/pwnlib/util/crc/__init__.py b/pwnlib/util/crc/__init__.py index c9e3a98ef..d0d7b5488 100644 --- a/pwnlib/util/crc/__init__.py +++ b/pwnlib/util/crc/__init__.py @@ -73,7 +73,7 @@ class BitPolynom(object): def __init__(self, n): - if isinstance(n, (bytes, six.text_type)): + if isinstance(n, (bytes, str)): from pwnlib.util.packing import _need_text n = _need_text(n) self.n = 0 diff --git a/pwnlib/util/cyclic.py b/pwnlib/util/cyclic.py index db6d13356..2c5ac4db1 100644 --- a/pwnlib/util/cyclic.py +++ b/pwnlib/util/cyclic.py @@ -1,7 +1,6 @@ from __future__ import absolute_import from __future__ import division -import six import string from pwnlib.context import context, LocalNoarchContext @@ -362,7 +361,7 @@ def _gen_find(subseq, generator): return -1 def _join_sequence(seq, alphabet): - if isinstance(alphabet, six.text_type): + if isinstance(alphabet, str): return ''.join(seq) elif isinstance(alphabet, bytes): return bytes(bytearray(seq)) diff --git a/pwnlib/util/fiddling.py b/pwnlib/util/fiddling.py index e92609f32..6cf13a7af 100644 --- a/pwnlib/util/fiddling.py +++ b/pwnlib/util/fiddling.py @@ -7,7 +7,6 @@ import random import re import os -import six import string from six import BytesIO @@ -510,7 +509,7 @@ def rol(n, k, word_size = None): if not isinstance(k, int): raise ValueError("rol(): 'k' must be an integer") - if isinstance(n, (bytes, six.text_type, list, tuple)): + if isinstance(n, (bytes, str, list, tuple)): return n[k % len(n):] + n[:k % len(n)] elif isinstance(n, int): k = k % word_size @@ -556,7 +555,7 @@ def isprint(c): """isprint(c) -> bool Return True if a character is printable""" - if isinstance(c, six.text_type): + if isinstance(c, str): c = ord(c) t = bytearray(string.ascii_letters + string.digits + string.punctuation + ' ', 'ascii') return c in t diff --git a/pwnlib/util/lists.py b/pwnlib/util/lists.py index ada0c44f7..7c6226671 100644 --- a/pwnlib/util/lists.py +++ b/pwnlib/util/lists.py @@ -1,7 +1,6 @@ from __future__ import division import collections -import six from six.moves import range @@ -77,8 +76,8 @@ def group(n, lst, underfull_action = 'ignore', fill_value = None): fill_value = (fill_value,) elif isinstance(lst, list): fill_value = [fill_value] - elif isinstance(lst, (bytes, six.text_type)): - if not isinstance(fill_value, (bytes, six.text_type)): + elif isinstance(lst, (bytes, str)): + if not isinstance(fill_value, (bytes, str)): raise ValueError("group(): cannot fill a string with a non-string") else: raise ValueError("group(): 'lst' must be either a tuple, list or string") diff --git a/pwnlib/util/misc.py b/pwnlib/util/misc.py index 2a860e015..d55c6e304 100644 --- a/pwnlib/util/misc.py +++ b/pwnlib/util/misc.py @@ -214,13 +214,13 @@ def normalize_argv_env(argv, env, log, level=2): # - Each string must not contain '\x00' # argv = argv or [] - if isinstance(argv, (six.text_type, six.binary_type)): + if isinstance(argv, (str, six.binary_type)): argv = [argv] if not isinstance(argv, (list, tuple)): log.error('argv must be a list or tuple: %r' % argv) - if not all(isinstance(arg, (six.text_type, bytes, bytearray)) for arg in argv): + if not all(isinstance(arg, (str, bytes, bytearray)) for arg in argv): log.error("argv must be strings or bytes: %r" % argv) # Create a duplicate so we can modify it @@ -247,13 +247,13 @@ def normalize_argv_env(argv, env, log, level=2): env_items = env if env: for k,v in env_items: - if not isinstance(k, (bytes, six.text_type)): + if not isinstance(k, (bytes, str)): log.error('Environment keys must be strings: %r' % k) # Check if = is in the key, Required check since we sometimes call ctypes.execve directly # https://github.com/python/cpython/blob/025995feadaeebeef5d808f2564f0fd65b704ea5/Modules/posixmodule.c#L6476 if b'=' in packing._encode(k): log.error('Environment keys may not contain "=": %r' % (k)) - if not isinstance(v, (bytes, six.text_type)): + if not isinstance(v, (bytes, str)): log.error('Environment values must be strings: %r=%r' % (k,v)) k = packing._need_bytes(k, level, 0x80) # ASCII text is okay v = packing._need_bytes(v, level, 0x80) # ASCII text is okay @@ -771,7 +771,7 @@ def _create_execve_script(argv=None, executable=None, cwd=None, env=None, ignore cwd = cwd or '.' # Validate, since failures on the remote side will suck. - if not isinstance(executable, (six.text_type, six.binary_type, bytearray)): + if not isinstance(executable, (str, six.binary_type, bytearray)): log.error("executable / argv[0] must be a string: %r" % executable) executable = bytearray(packing._need_bytes(executable, min_wrong=0x80)) diff --git a/pwnlib/util/packing.py b/pwnlib/util/packing.py index 1fa92a6a3..a42dde384 100644 --- a/pwnlib/util/packing.py +++ b/pwnlib/util/packing.py @@ -34,7 +34,6 @@ from __future__ import division import collections -import six import struct import sys import warnings @@ -661,7 +660,7 @@ def fill(key): if isinstance(k, int): if k >= large_key: k = fill(pack(k)) - elif isinstance(k, (six.text_type, bytearray, bytes)): + elif isinstance(k, (str, bytearray, bytes)): k = fill(_need_bytes(k, stacklevel, 0x80)) else: raise TypeError("flat(): offset must be of type int or str, but got '%s'" % type(k)) @@ -731,7 +730,7 @@ def _flat(args, preprocessor, packer, filler, stacklevel=1): filler, val = _fit(arg, preprocessor, packer, filler, stacklevel + 1) elif isinstance(arg, bytes): val = arg - elif isinstance(arg, six.text_type): + elif isinstance(arg, str): val = _need_bytes(arg, stacklevel + 1) elif isinstance(arg, int): val = packer(arg) @@ -906,7 +905,7 @@ def flat(*args, **kwargs): length = kwargs.pop('length', None) stacklevel = kwargs.pop('stacklevel', 0) - if isinstance(filler, (str, six.text_type)): + if isinstance(filler, (str, str)): filler = bytearray(_need_bytes(filler)) if kwargs != {}: @@ -1056,7 +1055,7 @@ def dd(dst, src, count = 0, skip = 0, seek = 0, truncate = False): # Otherwise get `src` in canonical form, i.e. a string of at most `count` # bytes - if isinstance(src, six.text_type): + if isinstance(src, str): if count: # The only way to know where the `seek`th byte is, is to decode, but # we only need to decode up to the first `seek + count` code points @@ -1114,7 +1113,7 @@ def dd(dst, src, count = 0, skip = 0, seek = 0, truncate = False): truncate = skip + len(src) # UTF-8 encode unicode `dst` - if isinstance(dst, six.text_type): + if isinstance(dst, str): dst = dst.encode('utf8') utf8 = True else: @@ -1178,7 +1177,7 @@ def _need_bytes(s, level=1, min_wrong=0): return s.encode(encoding, errors) def _need_text(s, level=1): - if isinstance(s, (str, six.text_type)): + if isinstance(s, (str, str)): return s # already text if not isinstance(s, (bytes, bytearray)): @@ -1211,7 +1210,7 @@ def _encode(s): return s.encode(context.encoding) def _decode(b): - if isinstance(b, (str, six.text_type)): + if isinstance(b, (str, str)): return b # already text if context.encoding == 'auto': diff --git a/pwnlib/util/web.py b/pwnlib/util/web.py index 7e98b67ae..a76ff61b7 100644 --- a/pwnlib/util/web.py +++ b/pwnlib/util/web.py @@ -3,7 +3,6 @@ from __future__ import division import os -import six import tempfile from pwnlib.log import getLogger @@ -70,7 +69,7 @@ def wget(url, save=None, timeout=5, **kwargs): # Save to the target file if provided if save: - if not isinstance(save, (bytes, six.text_type)): + if not isinstance(save, (bytes, str)): save = os.path.basename(url) save = save or tempfile.NamedTemporaryFile(dir='.', delete=False).name with open(save,'wb+') as f: From ec88ecbf878bb2324134f27faff4f106bb40e6a0 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:23:59 +0100 Subject: [PATCH 04/23] Remove usage of `six.binary_type` --- pwnlib/data/syscalls/generate.py | 3 +-- pwnlib/filesystem/ssh.py | 2 +- .../shellcraft/templates/aarch64/darwin/syscalls/execve.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm | 3 +-- .../templates/aarch64/darwin/syscalls/getdirentries64.asm | 3 +-- .../shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm | 3 +-- pwnlib/shellcraft/templates/aarch64/pushstr_array.asm | 3 +-- pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm | 3 +-- pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm | 3 +-- .../templates/amd64/darwin/syscalls/getdirentries64.asm | 3 +-- .../shellcraft/templates/amd64/darwin/syscalls/getxattr.asm | 3 +-- pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm | 3 +-- pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm | 3 +-- pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/_newselect.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/access.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/adjtimex.asm | 3 +-- .../templates/common/linux/syscalls/afs_syscall.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/arch_prctl.asm | 3 +-- .../templates/common/linux/syscalls/arch_specific_syscall.asm | 3 +-- .../templates/common/linux/syscalls/arm_fadvise64_64.asm | 3 +-- .../templates/common/linux/syscalls/arm_sync_file_range.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/cachectl.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/cacheflush.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm | 3 +-- .../templates/common/linux/syscalls/clock_adjtime.asm | 3 +-- .../templates/common/linux/syscalls/clock_adjtime64.asm | 3 +-- .../templates/common/linux/syscalls/clock_getres.asm | 3 +-- .../templates/common/linux/syscalls/clock_getres_time64.asm | 3 +-- .../templates/common/linux/syscalls/clock_gettime.asm | 3 +-- .../templates/common/linux/syscalls/clock_gettime64.asm | 3 +-- .../templates/common/linux/syscalls/clock_nanosleep.asm | 3 +-- .../common/linux/syscalls/clock_nanosleep_time64.asm | 3 +-- .../templates/common/linux/syscalls/clock_settime.asm | 3 +-- .../templates/common/linux/syscalls/clock_settime64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/close.asm | 3 +-- .../templates/common/linux/syscalls/close_range.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm | 3 +-- .../templates/common/linux/syscalls/copy_file_range.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm | 3 +-- .../templates/common/linux/syscalls/create_module.asm | 3 +-- .../templates/common/linux/syscalls/delete_module.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm | 3 +-- .../templates/common/linux/syscalls/epoll_create.asm | 3 +-- .../templates/common/linux/syscalls/epoll_create1.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/epoll_ctl.asm | 3 +-- .../templates/common/linux/syscalls/epoll_ctl_old.asm | 3 +-- .../templates/common/linux/syscalls/epoll_pwait.asm | 3 +-- .../templates/common/linux/syscalls/epoll_pwait2.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/epoll_wait.asm | 3 +-- .../templates/common/linux/syscalls/epoll_wait_old.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/eventfd2.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/execveat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/exit_group.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/faccessat.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/faccessat2.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fadvise64.asm | 3 +-- .../templates/common/linux/syscalls/fadvise64_64.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fallocate.asm | 3 +-- .../templates/common/linux/syscalls/fanotify_init.asm | 3 +-- .../templates/common/linux/syscalls/fanotify_mark.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fchmodat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fchown32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fchownat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fdatasync.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fgetxattr.asm | 3 +-- .../templates/common/linux/syscalls/finit_module.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/flistxattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm | 3 +-- .../templates/common/linux/syscalls/fremovexattr.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fsconfig.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fsetxattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fstatat64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/fstatfs64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ftruncate.asm | 3 +-- .../templates/common/linux/syscalls/ftruncate64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm | 3 +-- .../templates/common/linux/syscalls/futex_time64.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/futimesat.asm | 3 +-- .../templates/common/linux/syscalls/get_kernel_syms.asm | 3 +-- .../templates/common/linux/syscalls/get_mempolicy.asm | 3 +-- .../templates/common/linux/syscalls/get_robust_list.asm | 3 +-- .../templates/common/linux/syscalls/get_thread_area.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getdents.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getdents64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getegid32.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/geteuid32.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getgid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getgroups.asm | 3 +-- .../templates/common/linux/syscalls/getgroups32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getitimer.asm | 3 +-- .../templates/common/linux/syscalls/getpeername.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm | 3 +-- .../templates/common/linux/syscalls/getpriority.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getrandom.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getresgid.asm | 3 +-- .../templates/common/linux/syscalls/getresgid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getresuid.asm | 3 +-- .../templates/common/linux/syscalls/getresuid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getrlimit.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getrusage.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm | 3 +-- .../templates/common/linux/syscalls/getsockname.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getsockopt.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm | 3 +-- .../templates/common/linux/syscalls/gettimeofday.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getuid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/getxattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm | 3 +-- .../templates/common/linux/syscalls/ia32_arch_prctl.asm | 3 +-- .../templates/common/linux/syscalls/ia32_io_pgetevents.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ia32_rseq.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ia32_statx.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm | 3 +-- .../templates/common/linux/syscalls/init_module.asm | 3 +-- .../templates/common/linux/syscalls/inotify_add_watch.asm | 3 +-- .../templates/common/linux/syscalls/inotify_init.asm | 3 +-- .../templates/common/linux/syscalls/inotify_init1.asm | 3 +-- .../templates/common/linux/syscalls/inotify_rm_watch.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/io_cancel.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/io_destroy.asm | 3 +-- .../templates/common/linux/syscalls/io_getevents.asm | 3 +-- .../templates/common/linux/syscalls/io_pgetevents.asm | 3 +-- .../templates/common/linux/syscalls/io_pgetevents_time64.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/io_setup.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/io_submit.asm | 3 +-- .../templates/common/linux/syscalls/io_uring_enter.asm | 3 +-- .../templates/common/linux/syscalls/io_uring_register.asm | 3 +-- .../templates/common/linux/syscalls/io_uring_setup.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ioprio_get.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ioprio_set.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm | 3 +-- .../templates/common/linux/syscalls/kexec_file_load.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/kexec_load.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm | 3 +-- .../templates/common/linux/syscalls/landlock_add_rule.asm | 3 +-- .../common/linux/syscalls/landlock_create_ruleset.asm | 3 +-- .../common/linux/syscalls/landlock_restrict_self.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/lchown32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/lgetxattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/link.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/listxattr.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/llistxattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm | 3 +-- .../templates/common/linux/syscalls/lookup_dcookie.asm | 3 +-- .../templates/common/linux/syscalls/lremovexattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/lsetxattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/madvise1.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/membarrier.asm | 3 +-- .../templates/common/linux/syscalls/memfd_create.asm | 3 +-- .../templates/common/linux/syscalls/migrate_pages.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/mlockall.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/modify_ldt.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm | 3 +-- .../templates/common/linux/syscalls/mount_setattr.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/move_mount.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/move_pages.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/mprotect.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm | 3 +-- .../templates/common/linux/syscalls/mq_getsetattr.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/mq_notify.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm | 3 +-- .../templates/common/linux/syscalls/mq_timedreceive.asm | 3 +-- .../common/linux/syscalls/mq_timedreceive_time64.asm | 3 +-- .../templates/common/linux/syscalls/mq_timedsend.asm | 3 +-- .../templates/common/linux/syscalls/mq_timedsend_time64.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/mq_unlink.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/munlockall.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm | 3 +-- .../templates/common/linux/syscalls/name_to_handle_at.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/nanosleep.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/newfstatat.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/nfsservctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/oldfstat.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/oldlstat.asm | 3 +-- .../templates/common/linux/syscalls/oldolduname.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/olduname.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/open.asm | 3 +-- .../templates/common/linux/syscalls/open_by_handle_at.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/open_tree.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm | 3 +-- .../templates/common/linux/syscalls/pciconfig_iobase.asm | 3 +-- .../templates/common/linux/syscalls/pciconfig_read.asm | 3 +-- .../templates/common/linux/syscalls/pciconfig_write.asm | 3 +-- .../templates/common/linux/syscalls/perf_event_open.asm | 3 +-- .../templates/common/linux/syscalls/personality.asm | 3 +-- .../templates/common/linux/syscalls/pidfd_getfd.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pidfd_open.asm | 3 +-- .../templates/common/linux/syscalls/pidfd_send_signal.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pivot_root.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pkey_alloc.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pkey_free.asm | 3 +-- .../templates/common/linux/syscalls/pkey_mprotect.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm | 3 +-- .../templates/common/linux/syscalls/ppoll_time64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/prlimit64.asm | 3 +-- .../templates/common/linux/syscalls/process_madvise.asm | 3 +-- .../templates/common/linux/syscalls/process_vm_readv.asm | 3 +-- .../templates/common/linux/syscalls/process_vm_writev.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pselect6.asm | 3 +-- .../templates/common/linux/syscalls/pselect6_time64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pwrite64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/pwritev2.asm | 3 +-- .../templates/common/linux/syscalls/query_module.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/quotactl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/read.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/readahead.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/readlink.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/readlinkat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/recvfrom.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/recvmmsg.asm | 3 +-- .../templates/common/linux/syscalls/recvmmsg_time64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm | 3 +-- .../templates/common/linux/syscalls/remap_file_pages.asm | 3 +-- .../templates/common/linux/syscalls/removexattr.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/renameat.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/renameat2.asm | 3 +-- .../templates/common/linux/syscalls/request_key.asm | 3 +-- .../templates/common/linux/syscalls/reserved221.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/reserved82.asm | 3 +-- .../templates/common/linux/syscalls/restart_syscall.asm | 3 +-- .../templates/common/linux/syscalls/riscv_flush_icache.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm | 3 +-- .../common/linux/syscalls/sched_get_priority_max.asm | 3 +-- .../common/linux/syscalls/sched_get_priority_min.asm | 3 +-- .../templates/common/linux/syscalls/sched_getaffinity.asm | 3 +-- .../templates/common/linux/syscalls/sched_getattr.asm | 3 +-- .../templates/common/linux/syscalls/sched_getparam.asm | 3 +-- .../templates/common/linux/syscalls/sched_getscheduler.asm | 3 +-- .../templates/common/linux/syscalls/sched_rr_get_interval.asm | 3 +-- .../common/linux/syscalls/sched_rr_get_interval_time64.asm | 3 +-- .../templates/common/linux/syscalls/sched_setaffinity.asm | 3 +-- .../templates/common/linux/syscalls/sched_setattr.asm | 3 +-- .../templates/common/linux/syscalls/sched_setparam.asm | 3 +-- .../templates/common/linux/syscalls/sched_setscheduler.asm | 3 +-- .../templates/common/linux/syscalls/sched_yield.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/security.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/select.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/semtimedop.asm | 3 +-- .../templates/common/linux/syscalls/semtimedop_time64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/send.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sendfile.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sendfile64.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sendmmsg.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm | 3 +-- .../templates/common/linux/syscalls/set_mempolicy.asm | 3 +-- .../templates/common/linux/syscalls/set_robust_list.asm | 3 +-- .../templates/common/linux/syscalls/set_thread_area.asm | 3 +-- .../templates/common/linux/syscalls/set_tid_address.asm | 3 +-- .../templates/common/linux/syscalls/setdomainname.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setfsgid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setfsgid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setfsuid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setfsuid32.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setgid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setgroups.asm | 3 +-- .../templates/common/linux/syscalls/setgroups32.asm | 3 +-- .../templates/common/linux/syscalls/sethostname.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setitimer.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm | 3 +-- .../templates/common/linux/syscalls/setpriority.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setregid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setregid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setresgid.asm | 3 +-- .../templates/common/linux/syscalls/setresgid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setresuid.asm | 3 +-- .../templates/common/linux/syscalls/setresuid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setreuid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setreuid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setrlimit.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setsockopt.asm | 3 +-- .../templates/common/linux/syscalls/settimeofday.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setuid32.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/setxattr.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sgetmask.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/shutdown.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sigaction.asm | 3 +-- .../templates/common/linux/syscalls/sigaltstack.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/signalfd.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/signalfd4.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sigpending.asm | 3 +-- .../templates/common/linux/syscalls/sigprocmask.asm | 3 +-- .../templates/common/linux/syscalls/sigqueueinfo.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sigreturn.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sigsuspend.asm | 3 +-- .../templates/common/linux/syscalls/sigtimedwait.asm | 3 +-- .../templates/common/linux/syscalls/sigtimedwait_time64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/socketcall.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_accept.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_bind.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_connect.asm | 3 +-- .../common/linux/syscalls/socketcall_getpeername.asm | 3 +-- .../common/linux/syscalls/socketcall_getsockname.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_getsockopt.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_listen.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_recv.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_recvfrom.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_recvmsg.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_send.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_sendmsg.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_sendto.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_setsockopt.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_shutdown.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_socket.asm | 3 +-- .../templates/common/linux/syscalls/socketcall_socketpair.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/socketpair.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ssetmask.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/statfs64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/symlinkat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm | 3 +-- .../templates/common/linux/syscalls/sync_file_range.asm | 3 +-- .../templates/common/linux/syscalls/sync_file_range2.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm | 3 +-- .../templates/common/linux/syscalls/sys_kexec_load.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/sysriscv.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm | 3 +-- .../templates/common/linux/syscalls/tgsigqueueinfo.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/time.asm | 3 +-- .../templates/common/linux/syscalls/timer_create.asm | 3 +-- .../templates/common/linux/syscalls/timer_delete.asm | 3 +-- .../templates/common/linux/syscalls/timer_getoverrun.asm | 3 +-- .../templates/common/linux/syscalls/timer_gettime.asm | 3 +-- .../templates/common/linux/syscalls/timer_gettime64.asm | 3 +-- .../templates/common/linux/syscalls/timer_settime.asm | 3 +-- .../templates/common/linux/syscalls/timer_settime64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm | 3 +-- .../templates/common/linux/syscalls/timerfd_create.asm | 3 +-- .../templates/common/linux/syscalls/timerfd_gettime.asm | 3 +-- .../templates/common/linux/syscalls/timerfd_gettime64.asm | 3 +-- .../templates/common/linux/syscalls/timerfd_settime.asm | 3 +-- .../templates/common/linux/syscalls/timerfd_settime64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/times.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/truncate.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/truncate64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/ugetrlimit.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/unlinkat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm | 3 +-- .../templates/common/linux/syscalls/userfaultfd.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/utimensat.asm | 3 +-- .../templates/common/linux/syscalls/utimensat_time64.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm | 3 +-- .../shellcraft/templates/common/linux/syscalls/vmsplice.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/write.asm | 3 +-- pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm | 3 +-- pwnlib/shellcraft/templates/i386/pushstr.asm | 2 +- pwnlib/shellcraft/templates/mips/push.asm | 3 +-- pwnlib/shellcraft/templates/riscv64/mov.asm | 1 - pwnlib/shellcraft/templates/riscv64/push.asm | 3 +-- pwnlib/shellcraft/templates/thumb/mov.asm | 3 +-- pwnlib/shellcraft/templates/thumb/push.asm | 3 +-- pwnlib/term/key.py | 2 +- pwnlib/tubes/ssh.py | 3 +-- pwnlib/util/crc/__init__.py | 3 +-- pwnlib/util/misc.py | 4 ++-- 510 files changed, 510 insertions(+), 1016 deletions(-) diff --git a/pwnlib/data/syscalls/generate.py b/pwnlib/data/syscalls/generate.py index a70dffa64..a03df51eb 100644 --- a/pwnlib/data/syscalls/generate.py +++ b/pwnlib/data/syscalls/generate.py @@ -18,7 +18,6 @@ import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> ''' @@ -76,7 +75,7 @@ # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/filesystem/ssh.py b/pwnlib/filesystem/ssh.py index 63758e3e5..ecf20be6a 100644 --- a/pwnlib/filesystem/ssh.py +++ b/pwnlib/filesystem/ssh.py @@ -86,7 +86,7 @@ def _s(self, other): return str(other) # We also don't want binary - if isinstance(other, six.binary_type): + if isinstance(other, bytes): return str(_decode(other)) def _new(self, path, *a, **kw): diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm index d469389c9..092eb85d2 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/execve.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>execve(path, argv, envp) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm index a5b38a77e..8f194f099 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/exit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>exit(status) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm index b22a1bf3d..1c30947d1 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getdirentries64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getdirentries64(fd, buf, bufsize, position) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm index a40751cd4..4f4e159d1 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/getxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getxattr(path, name, value, size) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm index f8078ad90..40e75b3c2 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/lseek.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lseek(fd, offset, whence) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm index edd6284e3..c4c0de06a 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/read.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>read(fd, buf, nbytes) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm index 0dad1f221..9bd2178aa 100644 --- a/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm +++ b/pwnlib/shellcraft/templates/aarch64/darwin/syscalls/write.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>write(fd, buf, n) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm b/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm index 2e1d31570..e03a0fac6 100644 --- a/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm +++ b/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm @@ -3,7 +3,6 @@ from pwnlib.shellcraft import pretty from pwnlib.util.iters import group from pwnlib.util.packing import _need_bytes - from six import binary_type %> <%docstring> Pushes an array/envp-style array of pointers onto the stack. @@ -24,7 +23,7 @@ Example: <%page args="reg, array, register1='x14', register2='x15'"/> <% -if isinstance(array, (binary_type, str)): +if isinstance(array, (bytes, str)): array = [array] # Convert all items to strings diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm index d469389c9..092eb85d2 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/execve.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>execve(path, argv, envp) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm index a5b38a77e..8f194f099 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/exit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>exit(status) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm index b22a1bf3d..1c30947d1 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getdirentries64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getdirentries64(fd, buf, bufsize, position) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm index a40751cd4..4f4e159d1 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/getxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getxattr(path, name, value, size) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm index f8078ad90..40e75b3c2 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/lseek.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lseek(fd, offset, whence) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm index edd6284e3..c4c0de06a 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/read.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>read(fd, buf, nbytes) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm index 0dad1f221..9bd2178aa 100644 --- a/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm +++ b/pwnlib/shellcraft/templates/amd64/darwin/syscalls/write.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>write(fd, buf, n) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm index 1e206c1d3..175711e16 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/_llseek.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>_llseek(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm index 3e5056eca..2ec0f8fad 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/_newselect.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>_newselect(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm index e7ec14a36..d24ae8bc0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/_sysctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>_sysctl(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm index 7f9ba5e86..f504143b3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/accept.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>accept(fd, addr, addr_len) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm index 540e46234..d9f75446b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/accept4.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>accept4(fd, addr, addr_len, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm index ba5f87884..fa9ad22ae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/access.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>access(name, type) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm index 618f30b5f..e6a49878d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/acct.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>acct(name) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm index 7ffd7248c..f7aa0eba9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/add_key.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>add_key(type, description, payload, plen, keyring) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm index 2d084a000..0b3677112 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/adjtimex.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>adjtimex(ntx) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm index 4684511da..6d0e172b9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/afs_syscall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>afs_syscall(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm index 918643d14..a2a35cc72 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/alarm.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>alarm(seconds) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm index bf4f8dfa3..1720a13a2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_prctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>arch_prctl(code, addr) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm index 6ec0a1d3c..bc85766fb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arch_specific_syscall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>arch_specific_syscall(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm index a33228b95..f6374b75f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_fadvise64_64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>arm_fadvise64_64(fd, advice, offset, length) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm index 79a1eade1..f261896d8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/arm_sync_file_range.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>arm_sync_file_range(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm index 0eee7611d..abf28b925 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/bdflush.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>bdflush(func, data) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm index 3f075130f..ad0c16a13 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/bind.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>bind(fd, addr, length) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm index bee9012d7..ff1bc2b36 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/bpf.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>bpf(cmd, attr, size) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm index 35488ffd3..182dfa776 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/break_.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>break(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm index caddc7828..8ad5c5941 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/brk.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>brk(addr) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm index 3b155ae7c..8b817ecdb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/cachectl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>cachectl(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm index 79a4d22e3..eca0ee7b2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/cacheflush.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>cacheflush(addr, nbytes, cache) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm index 6c0706c75..670fcbb43 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/capget.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>capget(hdrp, datap) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm index 3d517e19d..cf8e2d2f5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/capset.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>capset(hdrp, datap) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm index 4256ccc84..42aabd1df 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chdir.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>chdir(path) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm index a93a497f5..2bf58da10 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chmod.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>chmod(file, mode) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm index 6f4b62f0d..8237bed94 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chown.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>chown(file, owner, group) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm index 4eeda6099..d4b57924c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chown32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>chown32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm index a5ddd4ce8..323ea555c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/chroot.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>chroot(path) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm index 775c3226d..c45c01d30 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_adjtime(clock_id, utx) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm index 9909819be..9f2d39a6b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_adjtime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_adjtime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm index 05430ef0e..1c02ec57e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_getres(clock_id, res) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm index 9d5e91f94..9aad41efa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_getres_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_getres_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm index da543f648..3780a9080 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_gettime(clock_id, tp) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm index 6df171ea1..67814097f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_gettime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_gettime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm index dbeacdd75..0fef73ec7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_nanosleep(clock_id, flags, req, rem) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm index c7af09e93..915692f7b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_nanosleep_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_nanosleep_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm index a49d73c2e..b761f6fca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_settime(clock_id, tp) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm index 5afc6484e..296f96ad9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clock_settime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clock_settime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm index cd7687443..1fce732fe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clone.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clone(fn, child_stack, flags, arg, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm index b24bebb6c..de7f31fbb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/clone3.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>clone3(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm index 4da071063..a39683715 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/close.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>close(fd) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm index 9ad10ca25..a38076145 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/close_range.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>close_range(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm index 189d63435..708f3808c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/connect.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>connect(fd, addr, length) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm index 673463197..8299c0d0e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/copy_file_range.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>copy_file_range(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm index 65d484160..0ff37400f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/creat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>creat(file, mode) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm index 976babfad..3ff5729aa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/create_module.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>create_module(name, size) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm index 29309c4a5..885831b20 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/delete_module.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>delete_module(name) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm index 66ba73ded..25be8feab 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/dup.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>dup(fd) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm index 6fd5811fd..05a1b8730 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/dup2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>dup2(fd, fd2) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm index 6ea18b139..2b0367b98 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/dup3.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>dup3(fd, fd2, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm index 5722c0d66..87c909e17 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_create(size) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm index 675d740f9..f7536c1ce 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_create1.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_create1(flags) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm index 5cd041704..a03cd9775 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_ctl(epfd, op, fd, event) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm index e4f8814fc..88f9a9bc8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_ctl_old.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_ctl_old(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm index aa4008a92..99f49f020 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_pwait(epfd, events, maxevents, timeout, ss) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm index d965ef84f..ad714810a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_pwait2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_pwait2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm index 166ab3061..c6341d2ad 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_wait(epfd, events, maxevents, timeout) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm index 82f73fd74..34441190c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/epoll_wait_old.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>epoll_wait_old(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm index 6863c4d1d..bf62506b9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>eventfd(count, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm index 65d9526cd..2654fe88a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/eventfd2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>eventfd2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm index 89befd04f..6485e97b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/execve.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>execve(path, argv, envp) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm index 9bfeb26c6..363452639 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/execveat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>execveat(dirfd, pathname, argv, envp, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm index e9a92026a..f0d498538 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/exit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>exit(status) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm index 9ae855b54..3e1ddaf2b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/exit_group.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>exit_group(status) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm index 9ee7f62a7..5cdd30cfa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>faccessat(fd, file, type, flag) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm index 0aac64c33..7b44b9dd6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/faccessat2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>faccessat2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm index 90e56ccf4..f62fd0fad 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fadvise64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm index 1428dbf5f..791afbac6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fadvise64_64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fadvise64_64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm index 02c3989ca..b8973810c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fallocate.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fallocate(fd, mode, offset, length) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm index b7084ca90..fb15839b5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_init.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fanotify_init(flags, event_f_flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm index 0120d4650..cce74d2d4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fanotify_mark.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fanotify_mark(fanotify_fd, flags, mask, dfd, pathname) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm index da873a57c..bfac5c2cb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchdir.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fchdir(fd) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm index bada6a09b..204563b1c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmod.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fchmod(fd, mode) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm index 2b7c3c4cc..338c2ae44 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchmodat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fchmodat(fd, file, mode, flag) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm index 4c5312f3b..b701924c0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fchown(fd, owner, group) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm index 95763485c..0c0aa022e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchown32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fchown32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm index b127ead90..03a471de9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fchownat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fchownat(fd, file, owner, group, flag) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm index e3a7e458c..5b77786e7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fcntl(fd, cmd, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm index be0451598..869fb568d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fcntl64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fcntl64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm index 3ae2a4f11..cc21ce57c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fdatasync.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fdatasync(fildes) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm index e1ad9bd01..fb6fdbae9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fgetxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fgetxattr(fd, name, value, size) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm index abefab0bd..f8d6daa40 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/finit_module.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>finit_module(fd, param_values, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm index dce374a84..a44c8c38b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/flistxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>flistxattr(fd, list, size) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm index 0f75c4406..5f14548b9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/flock.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>flock(fd, operation) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm index be4105f41..de85b461c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fork.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fork() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm index 627e5ca22..89d8a1cb1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fremovexattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fremovexattr(fd, name) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm index f56ae3e0f..19f335833 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsconfig.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fsconfig(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm index dc90cc18d..efb26791d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsetxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fsetxattr(fd, name, value, size, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm index 2304230aa..d2f6005e4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsmount.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fsmount(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm index 32f5b0eff..d7c9531ae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsopen.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fsopen(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm index 7d708ea67..47503b2be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fspick.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fspick(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm index e61b683af..a24944c3c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fstat(fd, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm index ece02e0f0..4d979ebb7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstat64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fstat64(fd, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm index 2493b0c6d..9f2f68061 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fstatat(fd, file, buf, flag) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm index 082131128..55d893b9b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatat64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fstatat64(fd, file, buf, flag) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm index 7760bb2ae..145483b57 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fstatfs(fildes, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm index 46d396f67..d8f3531eb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fstatfs64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fstatfs64(fildes, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm index 81fb7ed51..003f22fa3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/fsync.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>fsync(fd) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm index 03be9c4b8..1003e8194 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ftime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ftime(timebuf) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm index 6406d309c..14047c853 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ftruncate(fd, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm index 86bece867..39b61a7c9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ftruncate64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ftruncate64(fd, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm index e553415aa..8be81f5ec 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/futex.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>futex(uaddr, futex_op, val, timeout, uaddr2, val3) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm index e4efef8ea..e928dac92 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/futex_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>futex_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm index 571705162..4dc01d32d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/futimesat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>futimesat(fd, file, tvp) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm index c2c21b048..0acedc810 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_kernel_syms.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>get_kernel_syms(table) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm index 42484ef0b..6fab70999 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_mempolicy.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>get_mempolicy(mode, nodemask, maxnode, addr, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm index 8572dc996..fd93b5f06 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_robust_list.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>get_robust_list(pid, head_ptr, len_ptr) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm index 485a1e7c6..365f73b51 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/get_thread_area.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>get_thread_area(u_info) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm index 9dd574894..f210c7cc1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getcpu.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getcpu(cpu, node, tcache) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm index 36530bba2..0a744e19a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getcwd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getcwd(buf, size) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm index 6c9769255..02cfb4b5e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getdents(fd, dirp, count) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm index 572fa9fd8..e0c44f4f6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getdents64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getdents64(fd, dirp, count) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm index 6e9d11562..9c97c9afa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getegid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm index 4cd4d8a7c..6595c29eb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getegid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getegid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm index 04adfa7a8..497be1b56 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>geteuid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm index badaed6a2..b2fa87221 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/geteuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>geteuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm index 8f7e0ad67..0f60df58c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getgid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm index 12fdc2796..7a826944b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getgid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm index 5421c4f6c..0faf9ee02 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getgroups(size, list) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm index 74371e87d..08579a9e4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getgroups32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getgroups32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm index bb77ed5c7..9f5d4af5a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getitimer.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getitimer(which, value) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm index 3fe66f64e..6da5b8224 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpeername.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getpeername(fd, addr, length) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm index 7c4a4dac6..6dfa8f81f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getpgid(pid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm index b633a3750..4ce6251bb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpgrp.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getpgrp() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm index fb46d978f..1dcd7853a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getpid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm index 80feed425..e32891266 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getpmsg(fildes, ctlptr, dataptr, bandp, flagsp) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm index 395c19db7..2ab1544f4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getppid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getppid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm index 837c690f5..e445f3e72 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getpriority.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getpriority(which, who) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm index 49d3d9276..82e09f653 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getrandom.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getrandom(buf, buflen, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm index 214b560b0..159b64879 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getresgid(rgid, egid, sgid) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm index d43575eff..5e3c6e4b9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresgid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getresgid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm index 4e9923bd4..2f448dc58 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getresuid(ruid, euid, suid) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm index 1e1d16302..fb9efdd40 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getresuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getresuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm index 2726d8e7c..fdd938593 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getrlimit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getrlimit(resource, rlimits) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm index b14304056..5bb9a0ea0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getrusage.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getrusage(who, usage) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm index 839965589..8c9908b20 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getsid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getsid(pid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm index 86cf45b24..50c08a4fc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getsockname(fd, addr, length) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm index d8fd02bc4..90dd34445 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getsockopt.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getsockopt(fd, level, optname, optval, optlen) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm index 67b0852ae..7648a39cd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/gettid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>gettid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm index 45befb810..1b5213d7d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/gettimeofday.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>gettimeofday(tv, tz) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm index 73a8957b3..fe1401b92 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getuid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm index 9182f8463..83496e2a5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm index 50f5c6676..12eb7a737 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/getxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>getxattr(path, name, value, size) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm index 99eed84a3..0a29daee5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/gtty.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>gtty(fd, params) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm index 396e3ca5e..62e6b5bca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_arch_prctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ia32_arch_prctl(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm index d9f04a354..97ec8d83d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_io_pgetevents.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ia32_io_pgetevents(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm index 01ef46af8..33e4b74c6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_rseq.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ia32_rseq(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm index 380edd776..fb6771e6f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ia32_statx.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ia32_statx(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm index a583d0287..6b6b92db1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/idle.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>idle() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm index 7a408e16f..370539e19 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/init_module.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>init_module(name, image) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm index 1a74221d3..d983e25a7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_add_watch.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>inotify_add_watch(fd, name, mask) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm index 9762afb58..ab913aa79 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>inotify_init() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm index 9042f71c7..48188cf90 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_init1.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>inotify_init1(flags) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm index 2e07fd646..420438e09 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/inotify_rm_watch.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>inotify_rm_watch(fd, wd) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm index bd3e6ef6a..58772eba6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_cancel.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_cancel(ctx_id, iocb, result) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm index 94478f6a6..5a8b2e154 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_destroy.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_destroy(ctx_id) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm index b113e38fc..14aeaee31 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_getevents.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_getevents(ctx_id, min_nr, nr, events, timeout) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm index 44f73cd93..cd3682fce 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_pgetevents(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm index 5b5007a7b..1b043124a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_pgetevents_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_pgetevents_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm index 6048debf8..b307d4582 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_setup.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_setup(nr_events, ctx_idp) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm index e67aa1d03..30ef410f2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_submit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_submit(ctx_id, nr, iocbpp) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm index 0fd71f359..aa291eaf9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_enter.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_uring_enter(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm index 8fe11dc73..4fdbbbc68 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_register.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_uring_register(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm index 141cecef1..ccac418ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/io_uring_setup.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>io_uring_setup(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm index 465681255..29c79a850 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ioctl(fd, request, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm index 346153868..870e52898 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioperm.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ioperm(from_, num, turn_on) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm index 1d0bce657..52986c1ab 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/iopl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>iopl(level) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm index 5ebe884f0..6058a3522 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_get.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ioprio_get(which, who) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm index 84c827822..969ffd4dc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ioprio_set.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ioprio_set(which, who, ioprio) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm index fc0512398..49bf65916 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ipc.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ipc(call, first, second, third, ptr, fifth) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm index 35cfdf07a..13be1ce01 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kcmp.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>kcmp(pid1, pid2, type, idx1, idx2) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm index dbbbc038a..691bab97f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_file_load.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>kexec_file_load(kernel_fd, initrd_fd, cmdline_len, cmdline, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm index d4427c529..d15aff463 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kexec_load.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>kexec_load(entry, nr_segments, segments, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm index 5862dad10..99ad8c7c7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/keyctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>keyctl(cmd, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm index d1497b66c..a7202ba76 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/kill.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>kill(pid, sig) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm index 15b8fe9e7..08f8ca529 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_add_rule.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>landlock_add_rule(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm index 776d86695..9e357d494 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_create_ruleset.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>landlock_create_ruleset(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm index fbfa038e0..3728fb05a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/landlock_restrict_self.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>landlock_restrict_self(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm index 93d439194..23fab01ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lchown(file, owner, group) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm index 5cfa4d4db..8330bc604 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lchown32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lchown32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm index ca04b1979..2828d8265 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lgetxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lgetxattr(path, name, value, size) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm index d55064d59..24ec26b92 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/link.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>link(from_, to) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm index 8b00de391..6f05affc0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/linkat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>linkat(fromfd, from_, tofd, to, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm index 4334454cd..3b1c720ee 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/listen.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>listen(fd, n) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm index 23253aeea..ae66e622a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/listxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>listxattr(path, list, size) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm index 66e640bd0..f28a9327b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/llistxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>llistxattr(path, list, size) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm index bc336547f..3e8e96a33 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lock.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lock(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm index 9d2a4475e..cc48209d9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lookup_dcookie.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lookup_dcookie(cookie, buffer, length) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm index 7d0549265..8f175591d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lremovexattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lremovexattr(path, name) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm index b62d0ea33..3dd96b172 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lseek.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lseek(fd, offset, whence) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm index 5f5e0385b..87e3d3e51 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lsetxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lsetxattr(path, name, value, size, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm index 36706c3d1..a556acb1f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lstat(file, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm index 6ebad5c4a..dfe5580ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/lstat64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>lstat64(file, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm index 12a47f37e..6b6ce16f0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>madvise(addr, length, advice) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm index b57d0f95c..c2c58a6e9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/madvise1.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>madvise1(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm index 63481a9dc..a8fbbe123 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mbind.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mbind(addr, length, mode, nodemask, maxnode, flags) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm index 8961f8075..41dd32db7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/membarrier.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>membarrier(cmd, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm index 6a8cbbb2a..ed330476a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/memfd_create.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>memfd_create(name, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm index 22c40b451..f3922d6a7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/migrate_pages.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>migrate_pages(pid, maxnode, old_nodes, new_nodes) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm index 96435f1c5..cff4eebc6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mincore.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mincore(start, length, vec) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm index 71c716ff0..0f97e09ae 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdir.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mkdir(path, mode) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm index a87517430..7b3a37c86 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mkdirat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mkdirat(fd, path, mode) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm index 1d5aa6bba..648e3de03 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mknod.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mknod(path, mode, dev) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm index b671c75c1..8b8172a1f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mknodat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mknodat(fd, path, mode, dev) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm index d00d9cbc0..0aad786e0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mlock(addr, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm index 0c17359c6..52ea5da5b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mlock2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mlock2(addr, length, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm index ef11f4102..9d18cf310 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mlockall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mlockall(flags) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm index 4d8a7e68b..06b5b68f5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mmap(addr, length, prot, flags, fd, offset) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm index fa176a89f..10f8986e6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mmap2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mmap2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm index e97d657c5..d1d4766ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/modify_ldt.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>modify_ldt(func, ptr, bytecount) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm index 1c9aa8515..fca9f2b68 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mount.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mount(special_file, dir, fstype, rwflag, data) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm index d892eb196..cfd0d7c8b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mount_setattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mount_setattr(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm index 6e4db7d48..33f6a4f6f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/move_mount.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>move_mount(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm index 5c910ccaf..9a124c364 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/move_pages.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>move_pages(pid, count, pages, nodes, status, flags) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm index 6872b5d87..dccee5ad0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mprotect.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mprotect(addr, length, prot) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm index 791cce926..65c0331c8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mpx.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mpx(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm index 3a839a4be..b3cad7c6f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_getsetattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_getsetattr(mqdes, newattr, oldattr) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm index 3b4753f1b..ee43e5ebb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_notify.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_notify(mqdes, notification) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm index 340cbe522..561cd9ff1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_open.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_open(name, oflag, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm index 4135edc84..978cf6699 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm index 3d76f5a25..a2e62b217 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedreceive_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_timedreceive_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm index 25e7e1cca..b5f984089 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, abs_timeout) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm index a2ca75c0f..444b0a825 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_timedsend_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_timedsend_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm index 3c40a7635..53ff3bfbe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mq_unlink.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mq_unlink(name) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm index b25d7a37a..84702e7bb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/mremap.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>mremap(addr, old_len, new_len, flags, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm index 48cb84219..e808ccbe8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>msgctl(msqid, cmd, buf) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm index 66bfc75cc..189cad71c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgget.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>msgget(key, msgflg) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm index c7a1fd619..6159b639d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgrcv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>msgrcv(msqid, msgp, msgsz, msgtyp, msgflg) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm index 00277fd61..6067b9c0b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msgsnd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>msgsnd(msqid, msgp, msgsz, msgflg) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm index 9206dff19..6fb02386d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/msync.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>msync(addr, length, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm index 03b8f8657..65fd91bc8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/munlock.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>munlock(addr, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm index 4b3258bd6..12ec428b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/munlockall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>munlockall() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm index ed2630c77..c427b57d6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/munmap.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>munmap(addr, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm index 47df55102..55f9475eb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/name_to_handle_at.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>name_to_handle_at(dfd, name, handle, mnt_id, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm index 76ed40e8a..39939df26 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/nanosleep.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>nanosleep(requested_time, remaining) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm index e4b7b7ffd..75451dab0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/newfstatat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>newfstatat(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm index 910676666..027fab522 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/nfsservctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>nfsservctl(cmd, argp, resp) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm index f363d039c..9c007985a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/nice.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>nice(inc) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm index 34fbaa437..9f7b89e01 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldfstat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>oldfstat(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm index 3f482754c..b4796038c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldlstat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>oldlstat(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm index 36b8e1747..a16635d0f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldolduname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>oldolduname(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm index bd555a6d8..d35c3dcdc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/oldstat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>oldstat(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm index 49e6467dd..0e5313f5f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/olduname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>olduname(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm index 42e224b40..696c5f660 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/open.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>open(file, oflag, mode) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm index f55ac6465..05caeacb3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/open_by_handle_at.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>open_by_handle_at(mountdirfd, handle, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm index afab687a2..cc6b631ab 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/open_tree.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>open_tree(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm index a439cf71e..aa20a4c8a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/openat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>openat(fd, file, oflag, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm index 6b3f14ea0..466d699e0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/openat2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>openat2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm index 24d52e127..955d2eabb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pause.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pause() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm index 80127a64e..dc7b140e9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_iobase.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pciconfig_iobase(which, bus, devfn) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm index cd17891b0..70b5e0693 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_read.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pciconfig_read(bus, dfn, off, length, buf) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm index ed6faa0c4..6278e4dd1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pciconfig_write.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pciconfig_write(bus, dfn, off, length, buf) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm index 4d08bf9d1..635d63ba2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/perf_event_open.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>perf_event_open(attr, pid, cpu, group_fd, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm index 88f45cc5b..ab08e059e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/personality.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>personality(persona) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm index c496f1552..53e3d1720 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_getfd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pidfd_getfd(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm index 4808d4a4c..3a233de2d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_open.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pidfd_open(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm index 280d2e5e6..56038ca55 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pidfd_send_signal.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pidfd_send_signal(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm index 88a55ad49..12d3ecd7b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pipe(pipedes) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm index 7d1e67ccb..a672e577a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pipe2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pipe2(pipedes, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm index 1c4d6a213..c0d6e1a16 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pivot_root.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pivot_root(new_root, put_old) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm index 4d4bfc698..8e129e4a3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_alloc.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pkey_alloc(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm index 2090987be..0ae96bba6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_free.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pkey_free(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm index aa0226e48..c91f253aa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pkey_mprotect.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pkey_mprotect(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm index 0d3327d4a..b1a159100 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/poll.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>poll(fds, nfds, timeout) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm index b576b8c46..a2e148df3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ppoll(fds, nfds, timeout, ss) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm index f7ea64761..09fc039bf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ppoll_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ppoll_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm index e5a03dcbd..d6299bc15 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/prctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>prctl(option, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm index 8e1d17a49..91fa5035c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pread.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pread(fd, buf, nbytes, offset) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm index 841fbc75f..d4c3b2f21 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pread64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pread64(fd, buf, nbytes, offset) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm index 696b41b11..3c677140b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>preadv(fd, iovec, count, offset) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm index d7c587215..2d7602c60 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/preadv2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>preadv2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm index b23c387e1..4cfa35295 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/prlimit64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>prlimit64(pid, resource, new_limit, old_limit) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm index 4f21a7295..a1611f7ea 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/process_madvise.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>process_madvise(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm index 2b8cda500..7d6bb9876 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_readv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>process_vm_readv(pid, lvec, liovcnt, rvec, riovcnt, flags) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm index 98e1a6224..eec6ff76e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/process_vm_writev.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>process_vm_writev(pid, lvec, liovcnt, rvec, riovcnt, flags) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm index f9b653f33..ef50b068d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/prof.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>prof(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm index 2aef257b8..f0e26c936 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/profil.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>profil(sample_buffer, size, offset, scale) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm index 07aa26173..9e7e5b7a4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pselect6(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm index 0adaeead3..6db219289 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pselect6_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pselect6_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm index b8255fce1..5c848c3d9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ptrace.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ptrace(request, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm index f8e2cef48..f67ec697b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/putpmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>putpmsg(fildes, ctlptr, dataptr, band, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm index fba434ee2..310871b45 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pwrite(fd, buf, n, offset) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm index e984a98cf..ef6ec060a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwrite64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pwrite64(fd, buf, n, offset) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm index 705230b6a..32ac2cbb6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pwritev(fd, iovec, count, offset) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm index 1d68290ec..1f4a512bc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/pwritev2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>pwritev2(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm index fe83cec42..dbfcbd113 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/query_module.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>query_module(name, which, buf, bufsize, ret) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm index ceb113366..5723200d3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/quotactl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>quotactl(cmd, special, id, addr) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm index 23b016f08..11bb6feb0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/read.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>read(fd, buf, nbytes) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm index 0fa5d2ffc..c22e2c7f3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readahead.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>readahead(fd, offset, count) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm index 82564ad63..13f3d2ae0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readdir.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>readdir(dirp) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm index b7f85ce97..d564cc150 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readlink.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>readlink(path, buf, length) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm index b26e4ebab..40dbd2a2d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readlinkat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>readlinkat(fd, path, buf, length) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm index 42603b04b..eb61e63b4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/readv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>readv(fd, iovec, count) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm index 05b4eb55b..8d4788839 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/reboot.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>reboot(howto) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm index 44ad52e24..ad7022053 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>recv(fd, buf, n, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm index 938a5c126..322e3ea45 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvfrom.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>recvfrom(fd, buf, n, flags, addr, addr_len) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm index 48d557109..fd4f258e4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>recvmmsg(fd, vmessages, vlen, flags, tmo) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm index 308dcff43..b93603e1b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmmsg_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>recvmmsg_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm index 770affe52..25c966a42 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/recvmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>recvmsg(fd, message, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm index 425c334ca..e0c663539 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/remap_file_pages.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>remap_file_pages(start, size, prot, pgoff, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm index 1c974dafa..c246610c2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/removexattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>removexattr(path, name) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm index e2ca55ab8..6cbf5a8a3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/rename.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>rename(old, new) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm index 28c126a0e..63fd0f75f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>renameat(oldfd, old, newfd, new) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm index c32557f08..117db88a3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/renameat2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>renameat2(olddirfd, oldpath, newdirfd, newpath, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm index 4ed3b74ff..a78e69ae8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/request_key.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>request_key(type, description, callout_info, keyring) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm index 83d0c2e8c..5eb6adc47 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved221.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>reserved221(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm index 54f001901..397f4b7ba 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/reserved82.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>reserved82(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm index 78e040caf..2fbc9f791 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/restart_syscall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>restart_syscall() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm index 52911637b..34c56cf06 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/riscv_flush_icache.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>riscv_flush_icache(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm index d42374c30..b2f025e8c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/rmdir.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>rmdir(path) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm index c2b067af7..1246e5bab 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/rseq.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>rseq(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm index b2227c17f..5a9a153de 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_max.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_get_priority_max(algorithm) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm index 21a7e1c0d..6c17d6704 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_get_priority_min.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_get_priority_min(algorithm) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm index 41a30e1ca..ff626b7eb 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getaffinity.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_getaffinity(pid, cpusetsize, cpuset) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm index 72070b1ae..2d610e0d8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_getattr(pid, attr, size, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm index 474e1f987..a4bcbacd5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getparam.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_getparam(pid, param) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm index 20430e324..df8c8f18d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_getscheduler.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_getscheduler(pid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm index cdb5ade1f..913bfa33f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_rr_get_interval(pid, t) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm index 1afaf4155..13cee65e1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_rr_get_interval_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_rr_get_interval_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm index a08c64694..2f68dd438 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setaffinity.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_setaffinity(pid, cpusetsize, cpuset) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm index 2299efeb1..7b77a7c45 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_setattr(pid, attr, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm index 02abe601a..92f6ec61e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setparam.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_setparam(pid, param) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm index 1051409e2..cc9794820 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_setscheduler.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_setscheduler(pid, policy, param) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm index 33b1f831a..3e398ad06 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sched_yield.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sched_yield() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm index de971d9e7..36a78fcb0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/seccomp.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>seccomp(operation, flags, args) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm index 08555ecc9..e7c23b75c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/security.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>security(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm index 3bf188842..482a28731 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/select.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>select(nfds, readfds, writefds, exceptfds, timeout) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm index f8492551f..f62f589b0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>semctl(semid, semnum, cmd, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm index 35b68b05d..3f74d66ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semget.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>semget(key, nsems, semflg) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm index 79011232c..0cc3b8ac4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semop.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>semop(semid, sops, nsops) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm index bf69f24b7..9950d668f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>semtimedop(semid, sops, nsops, timeout) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm index 11563dcdb..e657e5610 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/semtimedop_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>semtimedop_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm index 9f559d921..3ecc0249b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/send.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>send(fd, buf, n, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm index 69689c3b6..0b6b99f35 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sendfile(out_fd, in_fd, offset, count) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm index 4de26e00a..e0c30269e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendfile64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sendfile64(out_fd, in_fd, offset, count) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm index 37607deba..84de123be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sendmmsg(fd, vmessages, vlen, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm index f53f915b0..585c9f159 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sendmsg(fd, message, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm index 374f5b599..7b56cbac0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sendto.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sendto(fd, buf, n, flags, addr, addr_len) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm index cb778b733..22eae18ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_mempolicy.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>set_mempolicy(mode, nodemask, maxnode) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm index 6f16e9f20..fa4cf2d77 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_robust_list.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>set_robust_list(head, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm index d328d91df..7133f5d77 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_thread_area.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>set_thread_area(u_info) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm index 4e1dc5373..0203f7750 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/set_tid_address.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>set_tid_address(tidptr) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm index 748286a18..8fbbdb275 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setdomainname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setdomainname(name, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm index 0a6968f0f..a9093115d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setfsgid(gid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm index c9a11ea29..0118c3f32 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsgid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setfsgid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm index dc1c36a85..78a27f9c7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setfsuid(uid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm index 47b017ae0..80b891055 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setfsuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setfsuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm index 0ef983d1b..45f95689d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setgid(gid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm index 672444ae6..dad3c81a4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setgid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm index 7b6585851..eb4014076 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setgroups(n, groups) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm index 1ebac66d5..1c1cd209c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setgroups32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setgroups32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm index f1500fa3d..48295f818 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sethostname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sethostname(name, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm index 0088eca5b..a2788c0ce 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setitimer.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setitimer(which, new, old) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm index 1941461b0..5409fd788 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setns.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setns(fd, nstype) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm index 6f270d2fb..cd7d342a7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setpgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setpgid(pid, pgid) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm index ccf71afdf..79b094df5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setpriority.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setpriority(which, who, prio) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm index 963b5a9be..6dff6ffa5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setregid(rgid, egid) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm index de6c59d10..1a963545b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setregid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setregid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm index 4db32a5bd..bd2accd1f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setresgid(rgid, egid, sgid) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm index 31a9eb17f..8186f1bb5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresgid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setresgid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm index 1579a139c..d404f455f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setresuid(ruid, euid, suid) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm index 8f5f0297f..ff235d60a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setresuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setresuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm index 07b62f0a1..8948c047e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setreuid(ruid, euid) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm index 44064eadd..f48f9b8ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setreuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setreuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm index 7fbff6e42..49c8807ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setrlimit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setrlimit(resource, rlimits) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm index 99f75b74e..977411624 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setsid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setsid() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm index a77d721d3..48d3912e5 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setsockopt.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setsockopt(fd, level, optname, optval, optlen) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm index f70d62343..6ce6b7a68 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/settimeofday.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>settimeofday(tv, tz) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm index d824a5fc2..e66e51f0f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setuid(uid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm index a25d74a37..1e248ed91 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setuid32.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setuid32(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm index b8a38991f..25d6d17b7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/setxattr.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>setxattr(path, name, value, size, flags) -> str @@ -56,7 +55,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm index ddf03c743..a55317e30 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sgetmask.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sgetmask() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm index 5bc101069..c3f60ebb1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>shmat(shmid, shmaddr, shmflg) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm index 74fcbbcb8..41f32cd5a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmctl.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>shmctl(shmid, cmd, buf) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm index edf2e6211..8a8ff6e01 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmdt.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>shmdt(shmaddr) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm index e5fca83c5..6c270d332 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shmget.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>shmget(key, size, shmflg) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm index 5ffa0ac15..5a18df833 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/shutdown.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>shutdown(ctx) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm index 17ed34df6..6043a5317 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaction.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigaction(sig, act, oact) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm index 279d2e5f3..128c2a898 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigaltstack.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigaltstack(ss, oss) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm index 89e6a2418..f3752a2c0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/signal.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>signal(sig, handler) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm index 6bb04f2ef..3f2b0b7aa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>signalfd(fd, mask, flags) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm index cb7ffb7b6..b6de1b709 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/signalfd4.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>signalfd4(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm index 40e39bdb3..38223c1b4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigpending.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigpending(set) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm index 0e82fbfbb..93a3a74e9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigprocmask.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigprocmask(how, set, oset) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm index 31123af7d..87def35e7 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigqueueinfo.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigqueueinfo(tgid, sig, uinfo) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm index 40d11d934..5254a4bf0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigreturn.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigreturn(scp) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm index 429b18837..5c43526e8 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigsuspend.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigsuspend(set) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm index 452896550..cbe3fd69e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigtimedwait(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm index d99f2de9f..76e958496 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sigtimedwait_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sigtimedwait_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm index b0e829672..28659c7b1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socket.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socket(domain, type, protocol) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm index fac2d1b7e..e999be634 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall(call, args) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm index c01a931d7..0a464ede9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_accept.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_accept(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm index 472642bcf..f2904ed06 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_bind.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_bind(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm index c5f8d9b89..d474f8a3b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_connect.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_connect(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm index 4c5686e63..c8df47b15 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getpeername.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_getpeername(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm index a2dcb461c..9d57242da 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_getsockname(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm index e134554d3..25d100718 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_getsockopt.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_getsockopt(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm index 485088cb4..86ce2e5ba 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_listen.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_listen(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm index f27ab9bd0..5ccd4b3be 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_recv(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm index 556166884..869daff0a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvfrom.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_recvfrom(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm index 78886bdbe..3a2c37679 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_recvmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_recvmsg(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm index be3e07ac6..e865fc237 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_send.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_send(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm index 37aafd3c8..9017c0573 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendmsg.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_sendmsg(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm index e1f67d94c..6b2d8657a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_sendto.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_sendto(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm index 700e92866..b272d6e07 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_setsockopt.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_setsockopt(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm index 6b16af17b..0c604eae9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_shutdown.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_shutdown(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm index be29d2dd5..0402f8b96 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socket.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_socket(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm index 27bba1320..766aa157a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketcall_socketpair.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketcall_socketpair(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm index e58c66afe..d39976227 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/socketpair.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>socketpair(domain, type, protocol, fds) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm index 3296b7daf..87ece621e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/splice.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>splice(fdin, offin, fdout, offout, length, flags) -> str @@ -57,7 +56,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm index e270942b4..37032f0ce 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ssetmask.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ssetmask(newmask) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm index 1029a3e5d..639a0cac1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>stat(file, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm index 8a146b350..50518394a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stat64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>stat64(file, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm index eb392bc5b..0f77f8171 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>statfs(file, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm index 461b71b16..a90b8ed85 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/statfs64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>statfs64(file, buf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm index b801bfcce..f2005e720 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/statx.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>statx(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm index deb26242d..327024738 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>stime(when) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm index e426dc433..a29a579de 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/stty.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>stty(fd, params) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm index d68eb5b6d..1dbcf4109 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/swapoff.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>swapoff(path) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm index c7964d8ce..c9b898d0e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/swapon.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>swapon(path, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm index ec3cb138c..6560803ab 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/symlink.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>symlink(from_, to) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm index 4d1ba6797..4fc610879 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/symlinkat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>symlinkat(from_, tofd, to) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm index 2e08b38aa..076297c76 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sync.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sync() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm index 18b00d174..f2121c883 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sync_file_range(fd, offset, count, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm index 97cb9e6d6..8d68935d9 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sync_file_range2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sync_file_range2(fd, flags, offset, nbytes) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm index 63cb7b724..10b11573f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/syncfs.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>syncfs(fd) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm index 9dada7139..9c57d49e1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sys_kexec_load.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sys_kexec_load(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm index 121fc098e..930eb1a0a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/syscall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>syscall(sysno, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm index d7f318efe..9233887ef 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysfs.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sysfs(option) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm index 4231e02dd..dcfc3766e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysinfo.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sysinfo(info) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm index e432b7499..93ce11ffe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/syslog.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>syslog(pri, fmt, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm index 88f2a82f5..63ee45371 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysmips.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sysmips(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm index dfeb5c13b..fc7be2a91 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/sysriscv.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>sysriscv(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm index 6140d88cd..7618e11fa 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tee.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>tee(fdin, fdout, length, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm index 29eae0fcf..04258d1cf 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tgkill.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>tgkill(tgid, tid, sig) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm index dea366fe8..b9a6a2717 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tgsigqueueinfo.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>tgsigqueueinfo(tgid, tid, sig, uinfo) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm index 68a102fe7..5b37ff4a6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/time.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>time(timer) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm index 3da0c93e5..e22e4326d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_create.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_create(clock_id, evp, timerid) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm index 566574b89..489dbf7b3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_delete.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_delete(timerid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm index 944582c07..83df673dc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_getoverrun.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_getoverrun(timerid) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm index 0a5e905f1..dc01109a4 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_gettime(timerid, value) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm index 3e21056ac..ba677f97d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_gettime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_gettime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm index bfe8c7358..b9b0b4e9d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_settime(timerid, flags, value, ovalue) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm index dee9ff3f7..c0fbee60c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timer_settime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timer_settime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm index 99ce9bc07..93c9082fd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timerfd(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm index 3d54ad650..58a4a7ffc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_create.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timerfd_create(clock_id, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm index 8273af349..f93b56806 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timerfd_gettime(ufd, otmr) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm index c619bd830..1f336885b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_gettime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timerfd_gettime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm index 3a47fa226..f38a50379 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timerfd_settime(ufd, flags, utmr, otmr) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm index c36a9d490..7c2e8ea1d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/timerfd_settime64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>timerfd_settime64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm index 1a96a8ca6..1210da6b2 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/times.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>times(buffer) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm index ad4fc5a17..3f2c3cf4e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tkill.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>tkill(tid, sig) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm index 8dbda9817..0bf79ffbd 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>truncate(file, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm index 4dea61bae..606608426 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/truncate64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>truncate64(file, length) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm index 1c4647550..aba7ae917 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/tuxcall.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>tuxcall(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm index de00a2163..d2cca431d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ugetrlimit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ugetrlimit(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm index 7cfb468f4..3dad61508 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ulimit.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ulimit(cmd, vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm index 5f4ea9120..3ecfae28f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/umask.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>umask(mask) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm index cf56e1a24..eb7b3670f 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/umount.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>umount(special_file) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm index de6677050..56e1415e6 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/umount2.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>umount2(special_file, flags) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm index b55e45219..90408ea49 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/uname.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>uname(name) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm index 39c897f07..26df35350 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/unlink.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>unlink(name) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm index 1a78417d7..6421f9691 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/unlinkat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>unlinkat(fd, name, flag) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm index 23bcc52e5..9c0c392c3 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/unshare.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>unshare(flags) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm index 7a4e7dbb7..688cc7ffe 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/uselib.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>uselib(library) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm index 7dd521a0c..f45ea526c 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/userfaultfd.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>userfaultfd(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm index be5c5dd2c..39a80158e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/ustat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>ustat(dev, ubuf) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm index 221eb059f..4c24a7ad0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utime.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>utime(file, file_times) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm index 7ce5264d0..cb996ddd0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>utimensat(fd, path, times, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm index 8708e52ee..4c8083d33 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utimensat_time64.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>utimensat_time64(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm index 629f00c71..ffa6dd1ca 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/utimes.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>utimes(file, tvp) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm index 3471248cb..07cdb384d 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vfork.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>vfork() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm index 881b9b33a..6bd4863e0 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vhangup.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>vhangup() -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm index 660fe0955..620360769 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>vm86(fn, v86) -> str @@ -53,7 +52,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm index 1a77b08d5..009791571 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vm86old.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>vm86old(info) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm index 6d5e4caff..298a4d9bc 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vmsplice.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>vmsplice(fdout, iov, count, flags) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm index 0122cfedb..31ec6f435 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/vserver.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>vserver(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4, vararg_5) -> str @@ -52,7 +51,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm index e91a7ee2a..8d17e5313 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/wait4.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>wait4(pid, stat_loc, options, usage) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm index 20f1a6a5d..c140d3a5a 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/waitid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>waitid(idtype, id, infop, options) -> str @@ -55,7 +54,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm index e19bfd7ef..31eec14b1 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/waitpid.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>waitpid(pid, stat_loc, options) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm index 65c65071e..fa853e44e 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/write.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>write(fd, buf, n) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm b/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm index dec4e260c..49721ce1b 100644 --- a/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm +++ b/pwnlib/shellcraft/templates/common/linux/syscalls/writev.asm @@ -3,7 +3,6 @@ import collections import pwnlib.abi import pwnlib.constants import pwnlib.shellcraft -import six %> <%docstring>writev(fd, iovec, count) -> str @@ -54,7 +53,7 @@ Returns: # The argument is not a register. It is a string value, and we # are expecting a string value - elif name in can_pushstr and isinstance(arg, (six.binary_type, str)): + elif name in can_pushstr and isinstance(arg, (bytes, str)): if isinstance(arg, str): arg = arg.encode('utf-8') string_arguments[name] = arg diff --git a/pwnlib/shellcraft/templates/i386/pushstr.asm b/pwnlib/shellcraft/templates/i386/pushstr.asm index 0119278f4..13093ca93 100644 --- a/pwnlib/shellcraft/templates/i386/pushstr.asm +++ b/pwnlib/shellcraft/templates/i386/pushstr.asm @@ -70,7 +70,7 @@ else: if append_null: string += b'\x00' - if isinstance(original, six.binary_type): + if isinstance(original, bytes): original += b'\x00' elif isinstance(original, str): original += '\x00' diff --git a/pwnlib/shellcraft/templates/mips/push.asm b/pwnlib/shellcraft/templates/mips/push.asm index 044eeaf85..ca29b818e 100644 --- a/pwnlib/shellcraft/templates/mips/push.asm +++ b/pwnlib/shellcraft/templates/mips/push.asm @@ -3,7 +3,6 @@ from pwnlib.shellcraft import mips from pwnlib import constants from pwnlib.shellcraft import registers - from six import binary_type import re %> <%page args="value"/> @@ -14,7 +13,7 @@ Pushes a value onto the stack. value_orig = value is_reg = value in registers.mips -if not is_reg and isinstance(value, (binary_type, str)): +if not is_reg and isinstance(value, (bytes, str)): try: value = constants.eval(value) except (ValueError, AttributeError): diff --git a/pwnlib/shellcraft/templates/riscv64/mov.asm b/pwnlib/shellcraft/templates/riscv64/mov.asm index 8005b47d1..4feaff586 100644 --- a/pwnlib/shellcraft/templates/riscv64/mov.asm +++ b/pwnlib/shellcraft/templates/riscv64/mov.asm @@ -4,7 +4,6 @@ from pwnlib.context import context as ctx # Ugly hack, mako will not let it be called context from pwnlib.log import getLogger from pwnlib.shellcraft import riscv64, registers, pretty, okay - import six log = getLogger('pwnlib.shellcraft.riscv64.mov') %> <%page args="dst, src"/> diff --git a/pwnlib/shellcraft/templates/riscv64/push.asm b/pwnlib/shellcraft/templates/riscv64/push.asm index 9cc6193c3..10f6ded49 100644 --- a/pwnlib/shellcraft/templates/riscv64/push.asm +++ b/pwnlib/shellcraft/templates/riscv64/push.asm @@ -2,7 +2,6 @@ from pwnlib.shellcraft import riscv64 from pwnlib import constants from pwnlib.shellcraft import registers - from six import binary_type %> <%page args="value"/> <%docstring> @@ -13,7 +12,7 @@ Register t4 is not guaranteed to be preserved. <% is_reg = value in registers.riscv -if not is_reg and isinstance(value, (binary_type, str)): +if not is_reg and isinstance(value, (bytes, str)): try: value = constants.eval(value) except (ValueError, AttributeError): diff --git a/pwnlib/shellcraft/templates/thumb/mov.asm b/pwnlib/shellcraft/templates/thumb/mov.asm index e6fdac1ae..2bf11ce48 100644 --- a/pwnlib/shellcraft/templates/thumb/mov.asm +++ b/pwnlib/shellcraft/templates/thumb/mov.asm @@ -3,7 +3,6 @@ from pwnlib.log import getLogger from pwnlib.util import fiddling from pwnlib.context import context as ctx # Ugly hack, mako will not let it be called context - import six %> <%page args="dst, src"/> <%docstring> @@ -60,7 +59,7 @@ Example: <% log = getLogger(__name__) src_orig = src -if isinstance(src, (six.binary_type, str)): +if isinstance(src, (bytes, str)): src = src.strip() if src.lower() in registers.arm: src = src.lower() diff --git a/pwnlib/shellcraft/templates/thumb/push.asm b/pwnlib/shellcraft/templates/thumb/push.asm index 1dec0cb85..a2939cf0c 100644 --- a/pwnlib/shellcraft/templates/thumb/push.asm +++ b/pwnlib/shellcraft/templates/thumb/push.asm @@ -3,7 +3,6 @@ from pwnlib.shellcraft import thumb, registers, pretty from pwnlib import constants from pwnlib.context import context as ctx # Ugly hack, mako will not let it be called context - import six import re %> <%page args="value"/> @@ -50,7 +49,7 @@ Example: value_orig = value is_register = value in registers.arm -if not is_register and isinstance(value, (six.binary_type, str)): +if not is_register and isinstance(value, (bytes, str)): try: with ctx.local(arch = 'thumb'): value = constants.eval(value) diff --git a/pwnlib/term/key.py b/pwnlib/term/key.py index 89491328d..9358b6829 100644 --- a/pwnlib/term/key.py +++ b/pwnlib/term/key.py @@ -149,7 +149,7 @@ def __repr__(self): return self.__str__() def __eq__(self, other): - if isinstance(other, (str, six.binary_type)): + if isinstance(other, (str, bytes)): return Matcher(other)(self) elif isinstance(other, Matcher): return other(self) diff --git a/pwnlib/tubes/ssh.py b/pwnlib/tubes/ssh.py index 1f2c993cf..a22accb47 100644 --- a/pwnlib/tubes/ssh.py +++ b/pwnlib/tubes/ssh.py @@ -5,7 +5,6 @@ import os import re import shutil -import six import string import sys import tarfile @@ -1813,7 +1812,7 @@ def set_working_directory(self, wd = None, symlink = False): """ status = 0 - if symlink and not isinstance(symlink, (six.binary_type, str)): + if symlink and not isinstance(symlink, (bytes, str)): symlink = os.path.join(self.pwd(), b'*') if not hasattr(symlink, 'encode') and hasattr(symlink, 'decode'): symlink = symlink.decode('utf-8') diff --git a/pwnlib/util/crc/__init__.py b/pwnlib/util/crc/__init__.py index d0d7b5488..5bb37b722 100644 --- a/pwnlib/util/crc/__init__.py +++ b/pwnlib/util/crc/__init__.py @@ -20,7 +20,6 @@ from __future__ import absolute_import from __future__ import division -import six import sys import types @@ -297,7 +296,7 @@ def generic_crc(data, polynom, width, init, refin, refout, xorout): # refin is not meaningful in this case inlen = len(data) p = BitPolynom(int(''.join('1' if v else '0' for v in data), 2)) - elif isinstance(data, six.binary_type): + elif isinstance(data, bytes): inlen = len(data)*8 if refin: data = fiddling.bitswap(data) diff --git a/pwnlib/util/misc.py b/pwnlib/util/misc.py index d55c6e304..0f990f79d 100644 --- a/pwnlib/util/misc.py +++ b/pwnlib/util/misc.py @@ -214,7 +214,7 @@ def normalize_argv_env(argv, env, log, level=2): # - Each string must not contain '\x00' # argv = argv or [] - if isinstance(argv, (str, six.binary_type)): + if isinstance(argv, (str, bytes)): argv = [argv] if not isinstance(argv, (list, tuple)): @@ -771,7 +771,7 @@ def _create_execve_script(argv=None, executable=None, cwd=None, env=None, ignore cwd = cwd or '.' # Validate, since failures on the remote side will suck. - if not isinstance(executable, (str, six.binary_type, bytearray)): + if not isinstance(executable, (str, bytes, bytearray)): log.error("executable / argv[0] must be a string: %r" % executable) executable = bytearray(packing._need_bytes(executable, min_wrong=0x80)) From b5b0f668114578d458684c4a4891bb53d886b74e Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:26:46 +0100 Subject: [PATCH 05/23] Remove usage of `from six.moves import range` --- pwnlib/fmtstr.py | 1 - pwnlib/memleak.py | 2 -- pwnlib/tubes/tube.py | 2 -- pwnlib/util/fiddling.py | 1 - pwnlib/util/lists.py | 2 -- pwnlib/util/packing.py | 2 -- 6 files changed, 10 deletions(-) diff --git a/pwnlib/fmtstr.py b/pwnlib/fmtstr.py index 975efb250..85e59d1d0 100644 --- a/pwnlib/fmtstr.py +++ b/pwnlib/fmtstr.py @@ -98,7 +98,6 @@ def send_payload(payload): import logging import re from operator import itemgetter -from six.moves import range from sortedcontainers import SortedList from pwnlib.log import getLogger diff --git a/pwnlib/memleak.py b/pwnlib/memleak.py index f767b72c8..46871ab26 100644 --- a/pwnlib/memleak.py +++ b/pwnlib/memleak.py @@ -5,8 +5,6 @@ import functools import string -from six.moves import range - from pwnlib.context import context from pwnlib.log import getLogger from pwnlib.util.packing import pack, _p8lu diff --git a/pwnlib/tubes/tube.py b/pwnlib/tubes/tube.py index 26303aec7..c13610bf3 100644 --- a/pwnlib/tubes/tube.py +++ b/pwnlib/tubes/tube.py @@ -13,8 +13,6 @@ import threading import time -from six.moves import range - from pwnlib import atexit from pwnlib import term from pwnlib.context import context diff --git a/pwnlib/util/fiddling.py b/pwnlib/util/fiddling.py index 6cf13a7af..a5ddad1c4 100644 --- a/pwnlib/util/fiddling.py +++ b/pwnlib/util/fiddling.py @@ -10,7 +10,6 @@ import string from six import BytesIO -from six.moves import range from pwnlib.context import LocalNoarchContext from pwnlib.context import context diff --git a/pwnlib/util/lists.py b/pwnlib/util/lists.py index 7c6226671..5ee47487e 100644 --- a/pwnlib/util/lists.py +++ b/pwnlib/util/lists.py @@ -2,8 +2,6 @@ import collections -from six.moves import range - def partition(lst, f, save_keys = False): """partition(lst, f, save_keys = False) -> list diff --git a/pwnlib/util/packing.py b/pwnlib/util/packing.py index a42dde384..bcce8cf52 100644 --- a/pwnlib/util/packing.py +++ b/pwnlib/util/packing.py @@ -38,8 +38,6 @@ import sys import warnings -from six.moves import range - from pwnlib.context import LocalNoarchContext from pwnlib.context import context from pwnlib.log import getLogger From d25d251d5251461ef550423bcca9766293c79e00 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:29:04 +0100 Subject: [PATCH 06/23] Remove usage of `from six.moves import configparser` --- pwnlib/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnlib/config.py b/pwnlib/config.py index 06b9514b0..01981ea0b 100644 --- a/pwnlib/config.py +++ b/pwnlib/config.py @@ -35,7 +35,7 @@ from __future__ import absolute_import from __future__ import division -from six.moves import configparser +import configparser import os registered_configs = {} From 75f19e56091fc2f7c683166e8685f4f6ceb02c32 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:30:07 +0100 Subject: [PATCH 07/23] Remove usage of `six.class_types` --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 4754954bd..136c56733 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -362,7 +362,7 @@ def linkcode_resolve(domain, info): if isinstance(val, property): val = val.fget - if isinstance(val, (types.ModuleType, types.MethodType, types.FunctionType, types.TracebackType, types.FrameType, types.CodeType) + six.class_types): + if isinstance(val, (types.ModuleType, types.MethodType, types.FunctionType, types.TracebackType, types.FrameType, types.CodeType, type)): try: lines, first = inspect.getsourcelines(val) filename += '#L%d-L%d' % (first, first + len(lines) - 1) From 4f03b9c1d1b1e88441fba61a959dcbfa7be033cc Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:35:45 +0100 Subject: [PATCH 08/23] Remove usage of `from six.moves import urllib` --- pwnlib/libcdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnlib/libcdb.py b/pwnlib/libcdb.py index 4f00e677e..600a3a940 100644 --- a/pwnlib/libcdb.py +++ b/pwnlib/libcdb.py @@ -88,7 +88,7 @@ def provider_libcdb(hex_encoded_id, search_type): # Deferred import because it's slow import requests - from six.moves import urllib + import urllib.parse # Build the URL using the requested hash type url_base = "{}/libcdb/libcdb/raw/master/hashes/{}/".format(GITLAB_LIBCDB_URL, search_type) @@ -306,7 +306,7 @@ def _search_debuginfo_by_hash(base_url, hex_encoded_id): """ # Deferred import because it's slow import requests - from six.moves import urllib + import urllib.parse # Check if we tried this buildid before. cache, cache_valid = _check_elf_cache('libcdb_dbg', hex_encoded_id, 'build_id') From 0a259c27da958c91e816c350a6e2afba03f0706e Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:38:41 +0100 Subject: [PATCH 09/23] Remove usage of `six.int2byte` --- pwnlib/encoders/i386/delta.py | 3 +-- pwnlib/encoders/mips/xor.py | 5 ++--- pwnlib/util/sh_string.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pwnlib/encoders/i386/delta.py b/pwnlib/encoders/i386/delta.py index e3d272917..0f7806531 100644 --- a/pwnlib/encoders/i386/delta.py +++ b/pwnlib/encoders/i386/delta.py @@ -1,7 +1,6 @@ from __future__ import absolute_import from __future__ import division -import six import collections from random import choice from random import randint @@ -59,7 +58,7 @@ def __call__(self, raw_bytes, avoid, pcreg=''): table = collections.defaultdict(lambda: []) endchar = bytearray() - not_bad = lambda x: six.int2byte(x) not in avoid + not_bad = lambda x: bytes((x,)) not in avoid not_bad_or_term = lambda x: not_bad(x) and x != self.terminator for i in filter(not_bad_or_term, range(0, 256)): diff --git a/pwnlib/encoders/mips/xor.py b/pwnlib/encoders/mips/xor.py index bd2fcbc83..f662481fd 100644 --- a/pwnlib/encoders/mips/xor.py +++ b/pwnlib/encoders/mips/xor.py @@ -25,7 +25,6 @@ from __future__ import absolute_import from __future__ import division -import six from pwnlib import asm from pwnlib import shellcraft from pwnlib.context import context @@ -128,8 +127,8 @@ def __call__(self, raw_bytes, avoid, pcreg=''): sizehi = size >> 8 decoder = decoders[context.endian] - decoder = decoder.replace(b'SIZ1', six.int2byte(sizehi)) - decoder = decoder.replace(b'SIZ2', six.int2byte(sizelo)) + decoder = decoder.replace(b'SIZ1', bytes((sizehi,))) + decoder = decoder.replace(b'SIZ2', bytes((sizelo,))) key, data = xor_key(raw_bytes, avoid=avoid) diff --git a/pwnlib/util/sh_string.py b/pwnlib/util/sh_string.py index 52699edd2..6ec541271 100644 --- a/pwnlib/util/sh_string.py +++ b/pwnlib/util/sh_string.py @@ -258,7 +258,7 @@ def test_all(): test('ab') ## test('a b') ## test(r"a\'b") ## - everything_1 = b''.join(six.int2byte(c) for c in range(1,256)) + everything_1 = b''.join(bytes((c,)) for c in range(1,256)) for s in everything_1: test(s) test(s*4) @@ -271,7 +271,7 @@ def test_all(): test(everything_1) test(everything_1 * 2) test(everything_1 * 4) - everything_2 = b''.join(six.int2byte(c) * 2 for c in range(1,256)) ## + everything_2 = b''.join(bytes((c,)) * 2 for c in range(1,256)) ## test(everything_2) test(randoms(1000, everything_1)) From 7408fe0ffbf120bcbd5cc1169bb45999c6a6d05a Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:41:03 +0100 Subject: [PATCH 10/23] Remove usage of `six.indexbytes` --- pwnlib/shellcraft/templates/amd64/pushstr.asm | 3 +-- pwnlib/shellcraft/templates/i386/pushstr.asm | 3 +-- pwnlib/util/safeeval.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pwnlib/shellcraft/templates/amd64/pushstr.asm b/pwnlib/shellcraft/templates/amd64/pushstr.asm index 3760667b4..6c35743a9 100644 --- a/pwnlib/shellcraft/templates/amd64/pushstr.asm +++ b/pwnlib/shellcraft/templates/amd64/pushstr.asm @@ -1,7 +1,6 @@ <% from pwnlib.util import lists, packing, fiddling from pwnlib.shellcraft import pretty - import six %>\ <%page args="string, append_null = True"/> <%docstring> @@ -72,7 +71,7 @@ Args: def okay(s): return b'\n' not in s and b'\0' not in s - if six.indexbytes(string, -1) >= 128: + if string[-1] >= 128: extend = b'\xff' else: extend = b'\x00' diff --git a/pwnlib/shellcraft/templates/i386/pushstr.asm b/pwnlib/shellcraft/templates/i386/pushstr.asm index 13093ca93..796b3c137 100644 --- a/pwnlib/shellcraft/templates/i386/pushstr.asm +++ b/pwnlib/shellcraft/templates/i386/pushstr.asm @@ -1,7 +1,6 @@ <% from pwnlib.util import lists, packing, fiddling from pwnlib.shellcraft import pretty, okay - import six %> <%page args="string, append_null = True"/> <%docstring> @@ -78,7 +77,7 @@ if append_null: if not string: return -if six.indexbytes(string, -1) >= 128: +if string[-1] >= 128: extend = b'\xff' else: extend = b'\x00' diff --git a/pwnlib/util/safeeval.py b/pwnlib/util/safeeval.py index 35694976d..0e0cbac49 100644 --- a/pwnlib/util/safeeval.py +++ b/pwnlib/util/safeeval.py @@ -21,8 +21,6 @@ _values_codes = _expr_codes + ['LOAD_NAME'] -import six - def _get_opcodes(codeobj): """_get_opcodes(codeobj) -> [opcodes] @@ -39,7 +37,7 @@ def _get_opcodes(codeobj): opcodes = [] s = codeobj.co_code while i < len(s): - code = six.indexbytes(s, i) + code = s[i] opcodes.append(code) if code >= dis.HAVE_ARGUMENT: i += 3 From cc50e7dcdaccee13ab39401ca7c7f95c53ec6e27 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:43:29 +0100 Subject: [PATCH 11/23] Remove usage of `from six.moves import builtins` --- pwnlib/pep237.py | 2 +- pwnlib/term/readline.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnlib/pep237.py b/pwnlib/pep237.py index 70212f3be..599eaa1e6 100644 --- a/pwnlib/pep237.py +++ b/pwnlib/pep237.py @@ -7,7 +7,7 @@ # https://www.python.org/dev/peps/pep-0237/ # https://mail.python.org/pipermail/python-dev/2006-June/065918.html # -from six.moves import builtins +import builtins original_hex = builtins.hex diff --git a/pwnlib/term/readline.py b/pwnlib/term/readline.py index d9c03c4fe..a3165d01c 100644 --- a/pwnlib/term/readline.py +++ b/pwnlib/term/readline.py @@ -482,7 +482,7 @@ def init(): global safeeval # defer imports until initialization import sys - from six.moves import builtins + import builtins from pwnlib.util import safeeval class Wrapper: From c4ab1fab1c843354bcdbac3073aaf28ffcf7ae72 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:49:04 +0100 Subject: [PATCH 12/23] Remove usage of `from six import BytesIO` --- pwn/toplevel.py | 2 +- pwnlib/elf/elf.py | 3 +-- pwnlib/libcdb.py | 6 +++--- pwnlib/tubes/tube.py | 2 +- pwnlib/util/fiddling.py | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pwn/toplevel.py b/pwn/toplevel.py index 92b01ad1d..1df508b69 100644 --- a/pwn/toplevel.py +++ b/pwn/toplevel.py @@ -74,7 +74,7 @@ # Promote these modules, so that "from pwn import *" will let you access them from six.moves import cPickle as pickle, cStringIO as StringIO -from six import BytesIO +from io import BytesIO log = getLogger("pwnlib.exploit") error = log.error diff --git a/pwnlib/elf/elf.py b/pwnlib/elf/elf.py index 3ff1b8518..f099fb79f 100644 --- a/pwnlib/elf/elf.py +++ b/pwnlib/elf/elf.py @@ -44,9 +44,8 @@ import subprocess import tempfile -from six import BytesIO - from collections import namedtuple, defaultdict +from io import BytesIO from elftools.elf.constants import P_FLAGS from elftools.elf.constants import SHN_INDICES diff --git a/pwnlib/libcdb.py b/pwnlib/libcdb.py index 600a3a940..1d477af57 100644 --- a/pwnlib/libcdb.py +++ b/pwnlib/libcdb.py @@ -441,7 +441,7 @@ def unstrip_libc(filename): return True def _extract_tarfile(cache_dir, data_filename, tarball): - from six import BytesIO + from io import BytesIO import tarfile # Handle zstandard compression, since tarfile only supports gz, bz2, and xz. if data_filename.endswith('.zst') or data_filename.endswith('.zstd'): @@ -528,7 +528,7 @@ def _extract_debfile(cache_dir, package_filename, package): return _extract_tarfile(cache_dir, data_filename, tarball) else: import unix_ar - from six import BytesIO + from io import BytesIO ar_file = unix_ar.open(BytesIO(package)) try: data_filename = next(filter(lambda f: f.name.startswith(b'data.tar'), ar_file.infolist())).name.decode() @@ -538,7 +538,7 @@ def _extract_debfile(cache_dir, package_filename, package): ar_file.close() def _extract_pkgfile(cache_dir, package_filename, package): - from six import BytesIO + from io import BytesIO return _extract_tarfile(cache_dir, package_filename, BytesIO(package)) def _find_libc_package_lib_url(libc): diff --git a/pwnlib/tubes/tube.py b/pwnlib/tubes/tube.py index c13610bf3..cef527b8d 100644 --- a/pwnlib/tubes/tube.py +++ b/pwnlib/tubes/tube.py @@ -1223,7 +1223,7 @@ def upload_manually(self, data, target_path = './payload', prompt = b'$', chunk_ compressed_path = target_path + '.xz' elif compression_mode == 'gzip': import gzip - from six import BytesIO + from io import BytesIO f = BytesIO() with gzip.GzipFile(fileobj=f, mode='wb', compresslevel=9) as g: g.write(data) diff --git a/pwnlib/util/fiddling.py b/pwnlib/util/fiddling.py index a5ddad1c4..967892fd1 100644 --- a/pwnlib/util/fiddling.py +++ b/pwnlib/util/fiddling.py @@ -9,7 +9,7 @@ import os import string -from six import BytesIO +from io import BytesIO from pwnlib.context import LocalNoarchContext from pwnlib.context import context From 988fb7e5d53701b1afb31b4f530e9dad5c351565 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:49:37 +0100 Subject: [PATCH 13/23] Remove usage of `six.unichr` --- pwnlib/term/key.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pwnlib/term/key.py b/pwnlib/term/key.py index 9358b6829..421c67249 100644 --- a/pwnlib/term/key.py +++ b/pwnlib/term/key.py @@ -4,7 +4,6 @@ import errno import os import select -import six import string import sys @@ -284,7 +283,7 @@ def _csi_ss3(cmd, args): return k def _csi_u(cmd, args): - k = Key(kc.TYPE_UNICODE, six.unichr(args[0])) + k = Key(kc.TYPE_UNICODE, chr(args[0])) if len(args) > 1 and args[1]: k.mods |= args[1] - 1 return k @@ -457,17 +456,17 @@ def _peek_simple(): if c0 == 0: k.code = u' ' elif chr(c0 + 0x40) in string.ascii_uppercase: - k.code = six.unichr(c0 + 0x60) + k.code = chr(c0 + 0x60) else: - k.code = six.unichr(c0 + 0x40) + k.code = chr(c0 + 0x40) k.mods |= kc.MOD_CTRL elif c0 == 0x7f: # print('del\r') k = Key(kc.TYPE_KEYSYM, kc.KEY_DEL) elif c0 >= 0x20 and c0 < 0x80: - k = Key(kc.TYPE_UNICODE, six.unichr(c0)) + k = Key(kc.TYPE_UNICODE, chr(c0)) else: - k = Key(kc.TYPE_UNICODE, six.unichr(c0 - 0x40), kc.MOD_CTRL | kc.MOD_ALT) + k = Key(kc.TYPE_UNICODE, chr(c0 - 0x40), kc.MOD_CTRL | kc.MOD_ALT) else: # utf8 n = 0 if c0 & 0b11100000 == 0b11000000: From bfed6733229ef6047db15a80fc6356a8bde4df70 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:51:41 +0100 Subject: [PATCH 14/23] Remove usage of `six.print_` --- pwnlib/term/readline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnlib/term/readline.py b/pwnlib/term/readline.py index a3165d01c..5564c3e47 100644 --- a/pwnlib/term/readline.py +++ b/pwnlib/term/readline.py @@ -379,7 +379,7 @@ def readline(_size=-1, prompt='', float=True, priority=10): # XXX circular imports from pwnlib.term import term_mode if not term_mode: - six.print_(prompt, end='', flush=True) + print(prompt, end='', flush=True) return getattr(sys.stdin, 'buffer', sys.stdin).readline(_size).rstrip(b'\n') show_suggestions = False eof = False From ec12ebf166456e69bbfa8dea32a5e86a95130a5a Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:54:29 +0100 Subject: [PATCH 15/23] Remove usage of `from six.moves.queue import Queue` --- pwnlib/tubes/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnlib/tubes/server.py b/pwnlib/tubes/server.py index 6f630f5bb..5bb5deb3b 100644 --- a/pwnlib/tubes/server.py +++ b/pwnlib/tubes/server.py @@ -9,7 +9,7 @@ from pwnlib.log import getLogger from pwnlib.tubes.sock import sock from pwnlib.tubes.remote import remote -from six.moves.queue import Queue +from queue import Queue log = getLogger(__name__) From 333efe698d1d1e75a62eb47632bc4cbefe628867 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 15:58:30 +0100 Subject: [PATCH 16/23] Remove usage of `six.get_function_defaults` and `six.get_function_code` --- pwnlib/commandline/shellcraft.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pwnlib/commandline/shellcraft.py b/pwnlib/commandline/shellcraft.py index ae24e4c1f..f5f6fd6cf 100644 --- a/pwnlib/commandline/shellcraft.py +++ b/pwnlib/commandline/shellcraft.py @@ -3,7 +3,6 @@ import argparse import os -import six import sys import types @@ -280,8 +279,8 @@ def main(args): code_array = [] for (name, func, func_args) in funcs: - defargs = len(six.get_function_defaults(func) or ()) - reqargs = six.get_function_code(func).co_argcount - defargs + defargs = len(func.__defaults__ or ()) + reqargs = func.__code__.co_argcount - defargs if len(func_args) < reqargs: if defargs > 0: From 6f9760016ee993f0efc71a63bc74521616561c1d Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 16:02:18 +0100 Subject: [PATCH 17/23] Remove usage of `six.b` --- pwnlib/util/sh_string.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pwnlib/util/sh_string.py b/pwnlib/util/sh_string.py index 6ec541271..096b6e9e5 100644 --- a/pwnlib/util/sh_string.py +++ b/pwnlib/util/sh_string.py @@ -241,7 +241,6 @@ from __future__ import absolute_import from __future__ import division -import six import string import subprocess @@ -299,7 +298,7 @@ def test(original): if not isinstance(input, str): input = input.decode('latin1') - cmdstr = six.b('/bin/echo %s' % input) + cmdstr = ('/bin/echo %s' % input).encode('latin1') SUPPORTED_SHELLS = [ ['ash', '-c', cmdstr], From 7b6560f41d6f2f881269a4179913af4e24aaa673 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 16:05:37 +0100 Subject: [PATCH 18/23] Remove usage of itertools/builtins from `six.moves` --- pwnlib/util/iters.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pwnlib/util/iters.py b/pwnlib/util/iters.py index a044e3079..c64f41120 100644 --- a/pwnlib/util/iters.py +++ b/pwnlib/util/iters.py @@ -11,7 +11,6 @@ import random import time from itertools import * -from six.moves import map, filter, filterfalse, range, zip, zip_longest from pwnlib.context import context from pwnlib.log import getLogger @@ -53,11 +52,8 @@ 'cycle' , 'dropwhile' , 'groupby' , - 'filter' , 'filterfalse' , - 'map' , 'islice' , - 'zip' , 'zip_longest' , 'permutations' , 'product' , From b633165947c89d1313151a9a806f09832be84b3c Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 16:07:36 +0100 Subject: [PATCH 19/23] Remove usage of `pickle` and `StringIO` from `six.moves` --- pwn/toplevel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwn/toplevel.py b/pwn/toplevel.py index 1df508b69..227680629 100644 --- a/pwn/toplevel.py +++ b/pwn/toplevel.py @@ -73,8 +73,8 @@ # Promote these modules, so that "from pwn import *" will let you access them -from six.moves import cPickle as pickle, cStringIO as StringIO -from io import BytesIO +import pickle +from io import BytesIO, StringIO log = getLogger("pwnlib.exploit") error = log.error From e0e20c6d717b104d3c2b546b426541219eb1e79a Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 16:19:17 +0100 Subject: [PATCH 20/23] Remove code guarded by `six.PY2` --- pwnlib/commandline/cyclic.py | 7 +-- pwnlib/encoders/i386/ascii_shellcode.py | 7 +-- pwnlib/filesystem/path.py | 6 +-- pwnlib/filesystem/ssh.py | 13 +----- pwnlib/gdb.py | 8 +--- pwnlib/libcdb.py | 60 ++++--------------------- pwnlib/term/readline.py | 7 +-- pwnlib/tubes/tube.py | 5 +-- 8 files changed, 18 insertions(+), 95 deletions(-) diff --git a/pwnlib/commandline/cyclic.py b/pwnlib/commandline/cyclic.py index c7a5060f6..62ed61335 100644 --- a/pwnlib/commandline/cyclic.py +++ b/pwnlib/commandline/cyclic.py @@ -2,7 +2,6 @@ from __future__ import division import argparse -import six import string import sys @@ -11,6 +10,7 @@ from pwn import * from pwnlib.commandline import common +from pwnlib.util.packing import _encode parser = common.parser_commands.add_parser( 'cyclic', @@ -64,10 +64,7 @@ def main(args): subsize = args.length if args.lookup: - pat = args.lookup - - if six.PY3: - pat = bytes(pat, encoding='utf-8') + pat = _encode(args.lookup) try: pat = int(pat, 0) diff --git a/pwnlib/encoders/i386/ascii_shellcode.py b/pwnlib/encoders/i386/ascii_shellcode.py index 993cfbb1d..7071d30ff 100644 --- a/pwnlib/encoders/i386/ascii_shellcode.py +++ b/pwnlib/encoders/i386/ascii_shellcode.py @@ -6,8 +6,6 @@ from itertools import product -import six - from pwnlib.context import LocalContext from pwnlib.context import context from pwnlib.encoders.encoder import Encoder @@ -43,10 +41,7 @@ def __init__(self, slop=20, max_subs=4): there are, the bigger the packed shellcode will be. Defaults to 4. """ - if six.PY2: - super(AsciiShellcodeEncoder, self).__init__() - elif six.PY3: - super().__init__() + super().__init__() self.slop = slop self.max_subs = max_subs diff --git a/pwnlib/filesystem/path.py b/pwnlib/filesystem/path.py index 032bf77c6..40c04fc9a 100644 --- a/pwnlib/filesystem/path.py +++ b/pwnlib/filesystem/path.py @@ -1,10 +1,6 @@ -import six import tempfile -if six.PY3: - from pathlib import * -else: - from pathlib2 import * +from pathlib import * @classmethod def mktemp(cls): diff --git a/pwnlib/filesystem/ssh.py b/pwnlib/filesystem/ssh.py index ecf20be6a..46b8cc23e 100644 --- a/pwnlib/filesystem/ssh.py +++ b/pwnlib/filesystem/ssh.py @@ -5,7 +5,6 @@ Emulates pathlib as much as possible, but does so through duck typing. """ import os -import six import sys import tempfile import time @@ -14,10 +13,7 @@ from pwnlib.util.misc import read, write from pwnlib.util.packing import _encode, _decode -if six.PY3: - from pathlib import * -else: - from pathlib2 import * +from pathlib import * class SSHPath(PosixPath): r"""Represents a file that exists on a remote filesystem. @@ -399,14 +395,9 @@ def resolve(self, strict=False): path = self.absolute().path path = os.path.normpath(path) - if six.PY2: - error_type = IOError - else: - error_type = FileNotFoundError - try: return self._new(self.ssh.sftp.normalize(path)) - except error_type as e: + except FileNotFoundError as e: raise ValueError("Could not normalize path: %r" % path) def stat(self): diff --git a/pwnlib/gdb.py b/pwnlib/gdb.py index c41a46854..2983b4568 100644 --- a/pwnlib/gdb.py +++ b/pwnlib/gdb.py @@ -146,8 +146,6 @@ import psutil import random import re -import six -import six.moves import socket import tempfile from threading import Event @@ -1285,10 +1283,6 @@ def preexec_fn(): # connect to the GDB Python API bridge from rpyc import BgServingThread from rpyc.utils.factory import unix_connect - if six.PY2: - retriable = socket.error - else: - retriable = ConnectionRefusedError, FileNotFoundError t = Timeout() with t.countdown(10): @@ -1296,7 +1290,7 @@ def preexec_fn(): try: conn = unix_connect(socket_path) break - except retriable: + except (ConnectionRefusedError, FileNotFoundError): time.sleep(0.1) else: # Check to see if RPyC is installed at all in GDB diff --git a/pwnlib/libcdb.py b/pwnlib/libcdb.py index 1d477af57..068d91924 100644 --- a/pwnlib/libcdb.py +++ b/pwnlib/libcdb.py @@ -6,7 +6,6 @@ import os import time -import six import tempfile import struct import sys @@ -453,19 +452,6 @@ def _extract_tarfile(cache_dir, data_filename, tarball): tarball.close() tarball = decompressed_tar - if six.PY2 and data_filename.endswith('.xz'): - # Python 2's tarfile doesn't support xz, so we need to decompress it first. - # Shell out to xz, since the Python 2 pylzma module is broken. - # (https://github.com/fancycode/pylzma/issues/67) - if not which('xz'): - log.error('Couldn\'t find "xz" in PATH. Please install xz first.') - import subprocess - try: - uncompressed_tarball = subprocess.check_output(['xz', '--decompress', '--stdout', tarball.name]) - tarball = BytesIO(uncompressed_tarball) - except subprocess.CalledProcessError: - log.error('Failed to decompress xz archive.') - with tarfile.open(fileobj=tarball) as tar_file: # Find the library folder in the archive (e.g. /lib/x86_64-linux-gnu/) lib_dir = None @@ -499,43 +485,15 @@ def _extract_tarfile(cache_dir, data_filename, tarball): def _extract_debfile(cache_dir, package_filename, package): # Extract data.tar in the .deb archive. - if sys.version_info < (3, 6): - if not which('ar'): - log.error('Missing command line tool "ar" to extract .deb archive. Please install "ar" first.') - - import atexit - import shutil - import subprocess - - # Use mkdtemp instead of TemporaryDirectory because the latter is not available in Python 2. - tempdir = tempfile.mkdtemp(prefix=".pwntools-tmp") - atexit.register(shutil.rmtree, tempdir) - with tempfile.NamedTemporaryFile(mode='wb', dir=tempdir) as debfile: - debfile.write(package) - debfile.flush() - try: - files_in_deb = subprocess.check_output(['ar', 't', debfile.name]).split(b'\n') - except subprocess.CalledProcessError: - log.error('Failed to list files in .deb archive.') - [data_filename] = filter(lambda f: f.startswith(b'data.tar'), files_in_deb) - - try: - subprocess.check_call(['ar', 'x', debfile.name, data_filename], cwd=tempdir) - except subprocess.CalledProcessError: - log.error('Failed to extract data.tar from .deb archive.') - - with open(os.path.join(tempdir, data_filename), 'rb') as tarball: - return _extract_tarfile(cache_dir, data_filename, tarball) - else: - import unix_ar - from io import BytesIO - ar_file = unix_ar.open(BytesIO(package)) - try: - data_filename = next(filter(lambda f: f.name.startswith(b'data.tar'), ar_file.infolist())).name.decode() - tarball = ar_file.open(data_filename) - return _extract_tarfile(cache_dir, data_filename, tarball) - finally: - ar_file.close() + import unix_ar + from io import BytesIO + ar_file = unix_ar.open(BytesIO(package)) + try: + data_filename = next(filter(lambda f: f.name.startswith(b'data.tar'), ar_file.infolist())).name.decode() + tarball = ar_file.open(data_filename) + return _extract_tarfile(cache_dir, data_filename, tarball) + finally: + ar_file.close() def _extract_pkgfile(cache_dir, package_filename, package): from io import BytesIO diff --git a/pwnlib/term/readline.py b/pwnlib/term/readline.py index 5564c3e47..82536b6eb 100644 --- a/pwnlib/term/readline.py +++ b/pwnlib/term/readline.py @@ -4,7 +4,6 @@ from __future__ import print_function import io -import six import sys import os @@ -497,8 +496,4 @@ def __getattr__(self, k): return getattr(self._fd, k) sys.stdin = Wrapper(sys.stdin) - if six.PY2: - builtins.raw_input = raw_input - builtins.input = eval_input - else: - builtins.input = str_input + builtins.input = str_input diff --git a/pwnlib/tubes/tube.py b/pwnlib/tubes/tube.py index cef527b8d..92bd7eda3 100644 --- a/pwnlib/tubes/tube.py +++ b/pwnlib/tubes/tube.py @@ -6,7 +6,6 @@ import logging import os import re -import six import string import subprocess import sys @@ -1197,9 +1196,7 @@ def upload_manually(self, data, target_path = './payload', prompt = b'$', chunk_ # Detect available compression utility, fallback to uncompressed upload. compression_mode = None - possible_compression = ['gzip'] - if six.PY3: - possible_compression.insert(0, 'xz') + possible_compression = ('xz', 'gzip') if not prompt: self.sendline("echo {}".format(end_marker).encode()) if compression == 'auto': From 1a68b1f4bc8554454431da413acb73d65eb3ec84 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 16:23:46 +0100 Subject: [PATCH 21/23] Remove `python_2_bytes_compatible` decorator --- docs/source/filesystem.rst | 1 - pwnlib/filepointer.py | 2 -- pwnlib/rop/call.py | 3 +-- pwnlib/rop/rop.py | 2 -- pwnlib/util/misc.py | 12 ------------ 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/docs/source/filesystem.rst b/docs/source/filesystem.rst index 26cc62ce3..755120d66 100644 --- a/docs/source/filesystem.rst +++ b/docs/source/filesystem.rst @@ -1,7 +1,6 @@ .. testsetup:: * import time - import six from pwnlib.context import context from pwnlib.tubes.ssh import ssh from pwnlib.filesystem import * diff --git a/pwnlib/filepointer.py b/pwnlib/filepointer.py index 8b05781e3..d92fa72d9 100644 --- a/pwnlib/filepointer.py +++ b/pwnlib/filepointer.py @@ -27,7 +27,6 @@ from pwnlib.context import context from pwnlib.log import getLogger -from pwnlib.util.misc import python_2_bytes_compatible from pwnlib.util.packing import pack log = getLogger(__name__) @@ -98,7 +97,6 @@ def update_var(l): return var -@python_2_bytes_compatible class FileStructure(object): r""" Crafts a FILE structure, with default values for some fields, like _lock which should point to null ideally, set. diff --git a/pwnlib/rop/call.py b/pwnlib/rop/call.py index ddca8bb12..be6992f7a 100644 --- a/pwnlib/rop/call.py +++ b/pwnlib/rop/call.py @@ -7,7 +7,7 @@ from pwnlib.context import context from pwnlib.util import packing -from pwnlib.util.misc import python_2_bytes_compatible, align +from pwnlib.util.misc import align class Unresolved(object): @@ -56,7 +56,6 @@ class StackAdjustment(Unresolved): pass -@python_2_bytes_compatible class AppendedArgument(Unresolved): r""" Encapsulates information about a pointer argument, and the data diff --git a/pwnlib/rop/rop.py b/pwnlib/rop/rop.py index 57606b3a0..1ce5b43fa 100644 --- a/pwnlib/rop/rop.py +++ b/pwnlib/rop/rop.py @@ -391,7 +391,6 @@ from pwnlib.util import packing from pwnlib.util.cyclic import cyclic from pwnlib.util.packing import pack -from pwnlib.util.misc import python_2_bytes_compatible log = getLogger(__name__) __all__ = ['ROP'] @@ -472,7 +471,6 @@ def dump(self): return '\n'.join(rv) -@python_2_bytes_compatible class ROP(object): r"""Class which simplifies the generation of ROP-chains. diff --git a/pwnlib/util/misc.py b/pwnlib/util/misc.py index 0f990f79d..68148aaae 100644 --- a/pwnlib/util/misc.py +++ b/pwnlib/util/misc.py @@ -6,7 +6,6 @@ import os import re import signal -import six import socket import stat import string @@ -695,17 +694,6 @@ def register_sizes(regs, in_sizes): return lists.concat(regs), sizes, bigger, smaller - -def python_2_bytes_compatible(klass): - """ - A class decorator that defines __str__ methods under Python 2. - Under Python 3 it does nothing. - """ - if six.PY2: - if '__str__' not in klass.__dict__: - klass.__str__ = klass.__bytes__ - return klass - def _create_execve_script(argv=None, executable=None, cwd=None, env=None, ignore_environ=None, stdin=0, stdout=1, stderr=2, preexec_fn=None, preexec_args=(), aslr=None, setuid=None, shell=False, log=log): From b7a43730e20689ab053b2db276cc0339000023c5 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Fri, 17 Jan 2025 16:38:45 +0100 Subject: [PATCH 22/23] =?UTF-8?q?Remove=20`six`=20dependency=20from=20pypr?= =?UTF-8?q?oject.toml=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/source/conf.py | 2 -- pyproject.toml | 1 - 2 files changed, 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 136c56733..37be01df3 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,6 @@ import os import doctest import signal -import six import subprocess import sys @@ -71,7 +70,6 @@ def filter(self, record): import sys, os os.environ['PWNLIB_NOTERM'] = '1' os.environ['PWNLIB_RANDOMIZE'] = '0' -import six import pwnlib.update import pwnlib.util.fiddling import logging diff --git a/pyproject.toml b/pyproject.toml index a5b493d22..3918fc127 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ dependencies = [ "intervaltree>=3.0", "sortedcontainers", "unicorn>=2.0.1", - "six>=1.12.0", "rpyc", "colored_traceback", "unix-ar; python_version>='3.6'", From 879c18652d0a2c6cc14d966608694a0b9b5e0b6e Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Sun, 26 Jan 2025 23:12:35 +0100 Subject: [PATCH 23/23] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3325d935..9a930736f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ The table below shows which release corresponds to each branch, and what date th - [#2526][2526] Properly make use of extra arguments in `packing` utilities. `sign` parameter requires keyword syntax to specify it. - [#2517][2517] Allow to passthru kwargs on `ssh.__getattr__` convenience function to fix SSH motd problems - [#2527][2527] Allow setting debugger path via `context.gdb_binary` +- [#2535][2535] Remove `six` Python 2 compatibility layer dependency [2519]: https://github.com/Gallopsled/pwntools/pull/2519 [2507]: https://github.com/Gallopsled/pwntools/pull/2507 @@ -89,6 +90,7 @@ The table below shows which release corresponds to each branch, and what date th [2526]: https://github.com/Gallopsled/pwntools/pull/2526 [2517]: https://github.com/Gallopsled/pwntools/pull/2517 [2527]: https://github.com/Gallopsled/pwntools/pull/2527 +[2535]: https://github.com/Gallopsled/pwntools/pull/2535 ## 4.15.0 (`beta`)