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

Need pin code for iBeacon #2

Open
gexqin opened this issue Jul 5, 2016 · 1 comment
Open

Need pin code for iBeacon #2

gexqin opened this issue Jul 5, 2016 · 1 comment

Comments

@gexqin
Copy link

gexqin commented Jul 5, 2016

Hi your script very good. I test it and I find security issues. Since no pin code so I can use LightBlue app connect to ibeacon and when I connect it the script crash until I run script again.

@cinaeds
Copy link

cinaeds commented Dec 5, 2017

The code line

if 'SUDO_UID' in os.environ.keys():

should be changed to

if 'SUDO_UID' in os.environ.keys() or os.geteuid() == 0:

In fact you may be able to get to get rid of SUDO_UID - and test for both sudo and root with just os.geteuid() == 0 - I don't know. I don't use sudo. But I would presume sudo is just setting the euid to be root in a manner similar to su.

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

No branches or pull requests

2 participants