Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pwndbg: init at 2018-04-06 #38502

Merged
merged 1 commit into from Apr 6, 2018
Merged

pwndbg: init at 2018-04-06 #38502

merged 1 commit into from Apr 6, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Apr 6, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member Author

Mic92 commented Apr 6, 2018

cc @bennofs

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pwndbg

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/bin
patching script interpreter paths in /nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/share/pwndbg/pwndbg/file.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/heap.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/elf.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/checksec.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/share/pwndbg/pwndbg/chain.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06/share/pwndbg/pwndbg/__init__.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
checking for references to /build in /nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06...
/nix/store/8wwbvag84i5j85gr4fxzgsv07a84ij56-pwndbg-2018-04-06

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: pwndbg

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pwndbg

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/bin
patching script interpreter paths in /nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/share/pwndbg/pwndbg/file.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/checksec.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/elf.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/heap.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/share/pwndbg/pwndbg/chain.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06/share/pwndbg/pwndbg/__init__.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
checking for references to /tmp/nix-build-pwndbg-2018-04-06.drv-0 in /nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06...
/nix/store/gmbcqq1gh26nrvcsrx9srhdbp5ynn4sy-pwndbg-2018-04-06


preFixup = ''
sed -i "/import sys/a import sys; sys.path.extend('$PYTHONPATH'.split(':'))" \
$out/share/pwndbg/gdbinit.py
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh if there is a more appropriate method to inject PYTHONPATH in a non-script, let me know.

@Mic92 Mic92 merged commit 315f06d into NixOS:master Apr 6, 2018
@Mic92 Mic92 deleted the pwndbg branch April 6, 2018 10:11
@Mic92
Copy link
Member Author

Mic92 commented Apr 6, 2018

cc @maloi

'';

preFixup = ''
sed -i "/import sys/a import sys; sys.path.insert(0, '$PYTHONPATH'.split(':'))" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This insert looks wrong, since insert takes a single element to insert (not a list of elements). sys.path[0:0] = '$PYTHONPATH'.split(':') should do what we want though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The weird thing seems, that it seems not to make a difference.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it doesn't work with the insert. Maybe you have the packages already installed in your global python env? I'll push the fix.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, I should probably remove pwntools again.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pwndbg

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/bin
patching script interpreter paths in /nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/share/pwndbg/pwndbg/__init__.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/share/pwndbg/pwndbg/chain.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/checksec.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/elf.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/heap.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06/share/pwndbg/pwndbg/file.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
checking for references to /build in /nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06...
/nix/store/5nv6a5nd85xhw0h58vzdjsnj8a7f6x9r-pwndbg-2018-04-06

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: pwndbg

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pwndbg

Partial log (click to expand)

stripping (with command strip and flags -S) in /nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/bin
patching script interpreter paths in /nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/share/pwndbg/pwndbg/file.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/heap.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/elf.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/share/pwndbg/pwndbg/commands/checksec.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/share/pwndbg/pwndbg/chain.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06/share/pwndbg/pwndbg/__init__.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
checking for references to /build in /nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06...
/nix/store/w793rjwk7vwdiphf5lyk6xq727bpab7d-pwndbg-2018-04-06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants