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
# coding: utf-8 | |
import os | |
def is_device_jailbroken(): | |
try: | |
os.listdir('/private') | |
except OSError: | |
return False | |
return True |
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
# coding: utf-8 | |
import subprocess | |
jailbroken=True | |
try: | |
subprocess.call(["ls", "-l"]) | |
except OSError: | |
jailbroken=False | |
print 'Is my device jailbroken: '+ str(jailbroken) |
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
# coding: utf-8 | |
from objc_util import * | |
AVAudioSession = ObjCClass('AVAudioSession') | |
shared_session = AVAudioSession.sharedInstance() | |
category_set = shared_session.setCategory_error_('AVAudioSessionCategoryPlayAndRecord', None) | |
settings = ObjCClass('NSMutableDictionary').dictionary() | |
kAudioFormatMPEG4AAC = 1633772320 | |
settings.setObject_forKey_(kAudioFormatMPEG4AAC,'AVFormatIDKey') |
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
# coding: utf-8 | |
from objc_util import * | |
import ctypes | |
import webbrowser | |
def parse_encoding(enc): | |
type_names={'c':'char', | |
'i':'int', | |
's':'short', | |
'l':'long', |
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
# coding: utf-8 | |
from objc_util import * | |
from console import input_alert,hud_alert | |
badgesting = input_alert('App Badge','Not more than 5 charaters') | |
UIApplication.sharedApplication().setApplicationBadgeString_(badgesting[:5]) | |
hud_alert('Badge Set!') |
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
# coding: utf-8 | |
from objc_util import * | |
ObjCClass('NSBundle').bundleWithPath_('/System/Library/Frameworks/LocalAuthentication.framework').load() | |
context = ObjCClass('LAContext').alloc().init() | |
policy = 1 #put 1 if you want to auth with password, 2 with passcode | |
reason = 'We need you fingerprint to ste...ehm... to log you in' | |
def funct(_cmd,success,error): | |
if success: |
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
# coding: utf-8 | |
from objc_util import * | |
import ui | |
@on_main_thread | |
def main(): | |
app=ObjCClass('UIApplication').sharedApplication() #Si accede all app in se | |
root_vc=app.keyWindow().rootViewController() #si accede alla view di base | |
mainView=root_vc.detailViewController().view() #Si acccede alla view principale |
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
typedef enum _UIBackgroundStyle { | |
UIBackgroundStyleDefault, | |
UIBackgroundStyleTransparent, | |
UIBackgroundStyleLightBlur, | |
UIBackgroundStyleDarkBlur, | |
UIBackgroundStyleDarkTranslucent | |
} UIBackgroundStyle; | |
@interface UIApplication (UIBackgroundStyle) | |
-(void)_setBackgroundStyle:(UIBackgroundStyle)style; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
#Sender (for Mac OS X) | |
# For details, in Mac OS X Terminal type: man pbcopy | |
import subprocess, sys | |
import prowlpy | |
def getClipboardData(): # Only works for data types: {txt | rtf | ps} | |
p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE) |