Skip to content

Instantly share code, notes, and snippets.

@alessaba
Last active December 24, 2015 12:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alessaba/bc3421de03cb3db40be5 to your computer and use it in GitHub Desktop.
Save alessaba/bc3421de03cb3db40be5 to your computer and use it in GitHub Desktop.
JailbreakTest.py
# coding: utf-8
import os
def is_device_jailbroken():
try:
os.listdir('/private')
except OSError:
return False
return True
print 'Is my device jailbroken:', is_device_jailbroken()
@controversial
Copy link

Cool script, clever.

@alessaba
Copy link
Author

@cclauss You're right. Changed that line :-)
@The-Penultimate-Defenestrator Thanks :-)

@Tkizzy
Copy link

Tkizzy commented Dec 21, 2015

Cool! thanks.

@cclauss
Copy link

cclauss commented Dec 21, 2015

It would be easier to consume if it was defined as a function...

import os

def is_device_jailbroken():
    try:
        os.listdir('/private')
    except OSError:
        return False
    return True

print('Is my device jailbroken: '+ str(is_device_jailbroken()))

@alessaba
Copy link
Author

Yea, if you want...

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