Skip to content
Permalink
Browse files

Merge branch 'beta' into dev

  • Loading branch information...
Arusekk committed Aug 28, 2019
2 parents 58a846c + cebd26d commit b784d3a6837dc683a4d3d775ed5b7752988e86f4
Showing with 10 additions and 9 deletions.
  1. +2 −1 pwnlib/gdb.py
  2. +8 −8 pwnlib/tubes/tube.py
@@ -476,7 +476,8 @@ def get_gdb_arch():
'powerpc': 'powerpc:common',
'powerpc64': 'powerpc:common64',
'mips64': 'mips:isa64',
'thumb': 'arm'
'thumb': 'arm',
'sparc64': 'sparc:v9'
}.get(context.arch, context.arch)

def binary():
@@ -733,37 +733,37 @@ def sendlines(self, lines=[]):
def sendafter(self, delim, data, timeout = default):
"""sendafter(delim, data, timeout = default) -> str
A combination of ``recvuntil(delim, timeout)`` and ``send(data)``.
A combination of ``recvuntil(delim, timeout=timeout)`` and ``send(data)``.
"""

res = self.recvuntil(delim, timeout)
res = self.recvuntil(delim, timeout=timeout)
self.send(data)
return res

def sendlineafter(self, delim, data, timeout = default):
"""sendlineafter(delim, data, timeout = default) -> str
A combination of ``recvuntil(delim, timeout)`` and ``sendline(data)``."""
A combination of ``recvuntil(delim, timeout=timeout)`` and ``sendline(data)``."""

res = self.recvuntil(delim, timeout)
res = self.recvuntil(delim, timeout=timeout)
self.sendline(data)
return res

def sendthen(self, delim, data, timeout = default):
"""sendthen(delim, data, timeout = default) -> str
A combination of ``send(data)`` and ``recvuntil(delim, timeout)``."""
A combination of ``send(data)`` and ``recvuntil(delim, timeout=timeout)``."""

self.send(data)
return self.recvuntil(delim, timeout)
return self.recvuntil(delim, timeout=timeout)

def sendlinethen(self, delim, data, timeout = default):
"""sendlinethen(delim, data, timeout = default) -> str
A combination of ``sendline(data)`` and ``recvuntil(delim, timeout)``."""
A combination of ``sendline(data)`` and ``recvuntil(delim, timeout=timeout)``."""

self.send(data + self.newline)
return self.recvuntil(delim, timeout)
return self.recvuntil(delim, timeout=timeout)

def interactive(self, prompt = term.text.bold_red('$') + ' '):
"""interactive(prompt = pwnlib.term.text.bold_red('$') + ' ')

0 comments on commit b784d3a

Please sign in to comment.
You can’t perform that action at this time.