forked from pwndbg/pwndbg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b987b41
commit 269b47f
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
sudo: required | ||
dist: trusty | ||
language: python | ||
install: | ||
- sudo apt-get -y install gdb | ||
- lsb_release -a | ||
- pip install -r requirements.txt | ||
- sudo ./setup.sh | ||
script: nosetests ./tests/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import subprocess | ||
import tempfile | ||
import unittest | ||
|
||
def pywrite(data): | ||
return write(data, suffix='.py') | ||
|
||
def write(data, suffix=''): | ||
t = tempfile.NamedTemporaryFile(delete=False, suffix=suffix) | ||
t.write(data.encode('utf-8')) | ||
return t | ||
|
||
def run_gdb_with_script(pybefore='', pyafter=''): | ||
command = ['gdb','--silent','--nx','--nh'] | ||
|
||
if pybefore: | ||
command += ['--command', pywrite(pybefore).name] | ||
|
||
command += ['--command', 'gdbinit.py'] | ||
|
||
if pyafter: | ||
command += ['--command', pywrite(pyafter).name] | ||
|
||
command += ['--eval-command', 'quit'] | ||
|
||
return subprocess.check_output(command, stderr=subprocess.STDOUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import common | ||
|
||
def test_loads_wivout_crashing_bruv(): | ||
output = common.run_gdb_with_script() | ||
assert 'Type pwndbg for a list' in output, output |