You Are Here:

Community: Developer Discussion Boards

#1 Old Thumbs up [announce] envy module for 3rd : Testing capabilities ! - 2007-11-21, 16:14

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Hello everybody ;

Here's a new version of envy module with a GREAT addition feature :
You can now testing if your scriptshell is unsigned with dev cert (13) or selfsigned (5 caps) or amazing with any capabilities

Syntax used is very versatile.

Code:
from envy import *
# testing selfsigned
print has_capabilities(SELFSIGNED) # return 1 if True / 0 if false
print has_capabilities('selfsigned') 
print has_capabilities('ALL-ReadDeviceData-WriteDeviceData-TrustedUI-ProtServ-SwEvent-Location-SurroundingsDD-PowerMgmt-NetworkControl-CommDD-MultimediaDD-DiskAdmin-DRM-TCB-AllFiles') print has_capabilities((ECapabilityReadUserData,ECapabilityWriteUserData,ECapabilityUserEnvironment,ECapabilityNetworkServices,ECapabilityLocalServices)) print has_capabilities('ReadUserData+WriteUserData+UserEnvironment+NetworkServices+LocalServices')

# testing unsigned
print has_capabilities('unsigned') 

# testing your against any capabilities set
print has_capabilities('ALL-TCB-AllFiles')

# Display capacity in Python Script shell or your standalone app if running from this location !

print app_capabilities()
A selfsigned version is now working but it only contains capabilities features and not the function for preventing red key to abort Python (need unsigned for this !)

links :
envy 3rd 1.0.2 selfsigned
envy 3rd 1.0.2 unsigned


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#2 Old Re: [announce] envy module for 3rd : Testing capabilities ! - 2007-11-22, 09:25

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Hi Cyke64,

Finally Tested Your new release of Envy module on my device (Signed envy)
Talking about the example you provided here , it returned the following error
Quote:
Traceback (most recent call last):
File "C:\private\2000b1a5\default.py", line 81, in menu_action
f()
File "C:\private\2000b1a5\default.py", line 65, in query_and_exec
execfile(script_list[index][1].encode('utf-8'), script_namespace.namespace)
File "c:\python\envydibofinal.py", line 5
print has_capabilities('ALL-ReadDeviceData-WriteDeviceData-TrustedUI-ProtServ-SwEvent-Location-SurroundingsDD-PowerMgmt-NetworkControl-CommDD-MultimediaDD-DiskAdmin-DRM-TCB-AllFiles') print has_capabilities((ECapabilityReadUserData,ECapabilityWriteUserData,ECapabilityUserEnvironment,ECapabilityNetworkServices,ECapabilityLocalServices)) print has_capabilities('ReadUserData+WriteUserData+UserEnvironment+NetworkServices+LocalServices')
^
SyntaxError: invalid syntax
But then I edited the code to this
Code:
print has_capabilities(SELFSIGNED) # return 1 if True / 0 if false
print has_capabilities('selfsigned') 
print has_capabilities('ALL-ReadDeviceData-WriteDeviceData-TrustedUI-ProtServ-SwEvent-Location-SurroundingsDD-PowerMgmt-NetworkControl-CommDD-MultimediaDD-DiskAdmin-DRM-TCB-AllFiles') 
print has_capabilities((ECapabilityReadUserData,ECapabilityWriteUserData,ECapabilityUserEnvironment,ECapabilityNetworkServices,ECapabilityLocalServices)) 
print has_capabilities('ReadUserData+WriteUserData+UserEnvironment+NetworkServices+LocalServices')
Just started print on new line...(I guess you forgot to press enter)
Then I get five 1s and two 0s.
5 ones are for LocalServices,Network Services,ReadUserData,UserEnvi and WriteUserData...So these are the capabilities...
Now I am going to sign my script shell after posting this..

Also tested the code for envy that You had mailed me for Betatesting
It again returns 5 capabilities (Just as indicated by 1s) and that the application is selfsigned at present...

Also it returns a YES at the end...
Quote:
if has_capabilities(app_capabilities()):
print 'YES' # always True !
Was wondering what was that for?


Best Regards
croozeus
Reply With Quote

#3 Old Re: [announce] envy module for 3rd : Testing capabilities ! - 2007-12-04, 19:24

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Hello ,

I think that envy 1.0.2 with the new feature : has_capabilities()
is really useful !!!

Today I try my new module cenrep 1.3.0 and I have errors with setting functions

I only discover why when I launch this statement :

envy.has_capabilities('unsigned')

I return 0 (false) So I have installed a selfsigned Python Shell !!! So it's very useful

Thank envy

Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#4 Old Re: [announce] envy module for 3rd : Testing capabilities ! - 2007-12-05, 11:10

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Hi,

Well thats an application of envy....
Moreover also i have to use it in all my apps to avoid exiting on red key
Its really useful!

Thanks Cyke

Best Regards
croozeus
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
[announce] sysagent module cyke64 Python 7 2009-01-28 13:52
[announce] envy module for 3rd : prevent red key from aborting Python ! cyke64 Python 4 2008-04-14 04:23
Carbide.j 1.5 and Netbeans 5.5 beta 2 ovjo12 Mobile Java Tools & SDKs 5 2007-06-11 06:43
S60 2nd to 3rd/ PlatformSecurity / Capabilities jarkoos Installation, Certification and Security 4 2007-04-14 15:08
[announce] Enhanced Graphics module GameDude Python 10 2007-03-18 19:44

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia