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

Hinsight.py not executable after pypi installation #52

Open
aarontp opened this issue Nov 5, 2020 · 2 comments
Open

Hinsight.py not executable after pypi installation #52

aarontp opened this issue Nov 5, 2020 · 2 comments
Assignees
Labels

Comments

@aarontp
Copy link

aarontp commented Nov 5, 2020

Describe the problem
hindisght.py isn't executable directly from pypi package. There are a couple small issues: The first one is that it doesn't have the executable bit set. After making it executable though, it still complains about the interpreter not existing, which looks like it comes from windows newlines in the file. Executing directly with python works just fine.

Screenshots or Console Output

$ virtualenv hindsighttest
$ . hindsighttest/bin/activate
$ pip install pyhindsight
$ which hindsight
$ chmod 755 hindsighttest/bin/hindsight.py
$ hindsight.py -h
/usr/bin/env: ‘python3\r’: No such file or directory

$ hexdump -C hindsighttest/bin/hindsight.py | head -n 2
00000000  23 21 2f 75 73 72 2f 62  69 6e 2f 65 6e 76 20 70  |#!/usr/bin/env p|
00000010  79 74 68 6f 6e 33 0d 0a  0d 0a 22 22 22 48 69 6e  |ython3...."""Hin|

Expected behavior
Hindsight being executable after installation.

To Reproduce
See console output.

hindsight.log Snippet
N/A

System Details

$ uname -a
Linux myhostname 5.7.17-1-amd64 #1 SMP Debian 5.7.17-1 (2020-09-16) x86_64 GNU/Linux

Additional context
N/A

@obsidianforensics
Copy link
Owner

I believe this is fixed in the latest release, with one possible exception. It does seem that when pyhindsight is installed via pip on systems with /tmp set to noexec, the scripts (hindsight.py and hindsight_gui.py) lose their executable bit setting (pypa/pip#6364).

If you have thoughts or other ideas on how to fix any install issues, I'd very much like to hear them.

@aarontp
Copy link
Author

aarontp commented Jun 9, 2023

FYI, I ran into this again today. After creating a shell with pipenv and doing pip install pyhindsight, the file was not executable. FWIW, my /tmp dir is not set to noexec.

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

No branches or pull requests

2 participants