You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old [Announce] Open Signed Online automation tool - 2008-07-10, 09:03

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
Hi,

during the development of Ped, I found it frustrating having to go to symbiansigned.com every time I wanted to sign a sis and then playing around with e-mails. So I came up with a tool to automate the process of signing a sis file using the Open Signed Online.

The tool is a Python script that takes all the needed info including the unsigned sis file as parameters and spits out a signed one.

The tricky parts are:
- Open Signed Online uses a captcha, you have to retype a security code from a picture during every submission,
- the service sends you back info including the signed sis download link using e-mails.

The first problem was solved by using wxPython to display a dialog with picture and text field to let you solve the captcha. So although this is a command line utility, it needs user interaction during every run. There's not much I can do about this.

The second issue was solved by giving the tool both e-mail address to pass to Symbian Signed as well as POP3 server address/login/password so it can log into the e-mail account and process the messages sent by Symbian Signed. The messages are then automatically deleted.

The signing session could look like this:
Quote:
c:\Python25\Projects\opensignsis>opensignsis.py --imei=123456789012345 --email=foo.bar@gmail.com --server=pop.gmail.com --ssl --verbose PythonScriptShell_1_4_4_3rdEd_unsigned_testrange.SIS PythonScriptShell_1_4_4_3rdEd_imei_123456789012345.sis

warning: no caps specified, using 'ALL'
Processing security code...
* downloading image...
* opening dialog...
* security code: F4EE57A0
Sending request to Open Signed Online...
* request sent
warning: no login specified, using 'foo.bar'
warning: no passwd specified, prompting for one now
Password for 'foo.bar':
Waiting for request confirmation...
* polling the mailbox...
* confirming
* request confirmed
Waiting for signed file...
* polling the mailbox...
* polling the mailbox...
* downloading sis file
* saved as PythonScriptShell_1_4_4_3rdEd_imei_123456789012345.sis
Done
The caps could be read from the input sis by default, someone (jethro?) know how to do this?

Anyway, I would like to ask if there's interest in such a tool. If yes, please post any comments and suggestions you may have on this.

--- ADDED ---
The script can now be downloaded from my blog:
http://arkadiusz-wahlig.blogspot.com...ed-online.html
Last edited by y.a.k : 2008-07-10 at 12:56.
Reply With Quote

#2 Old Re: [Announce] Open Signed Online automation tool - 2008-07-10, 09:25

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

Where can we try the Alpha ?

Have you made it public yet ?

Best regards,
Croozeus
Reply With Quote

#3 Old Re: [Announce] Open Signed Online automation tool - 2008-07-10, 09:33

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
No, not public yet. I just got it working yesterday and wanted to know if there's a point in doing all the stuff you have to do if you want to make your creation public . Also, there are still some bugs to iron out and few improvements I want to make.

Btw., anyone knows TkInter here? How do I go about creating a simple dialog with jpg picture and a text field? For just a simple captcha dialog I would prefer using it over wxPython because it's installed with Python by default.
Reply With Quote

#4 Old Re: [Announce] Open Signed Online automation tool - 2008-07-10, 09:40

Join Date: May 2007
Posts: 2,735
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by y.a.k View Post
No, not public yet. I just got it working yesterday and wanted to know if there's a point in doing all the stuff you have to do if you want to make your creation public . Also, there are still some bugs to iron out and few improvements I want to make.

Btw., anyone knows TkInter here? How do I go about creating a simple dialog with jpg picture and a text field? For just a simple captcha dialog I would prefer using it over wxPython because it's installed with Python by default.
Well there is a point of doing this. It could last till the Open signing procedure remains the same. You never know when there would be some changes in the system.

TkInter for captcha: How about using the BitmapImage Class ?

I am not quite a user of TkInter, but just some suggestion !

Best Regards,
Croozeus
Reply With Quote

#5 Old Re: [Announce] Open Signed Online automation tool - 2008-07-10, 09:47

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
Yes, if Open Signed Online procedure changes, this tool will fail of course. But doing such tools in Python is pretty easy and fast - I got it working in one evening. So I guess I can sacrifice one evening to make my life easier for some time. And if I'm still around when they change it, I'll update it (which, again, shouldn't take much time either, Python Power!).

I'll take a look at this class, thanks for the link.
Reply With Quote

#6 Old Re: [Announce] Open Signed Online automation tool - 2008-07-10, 12:52

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
Ok, I've left wxPython as TkInter isn't able to display jpeg files without external modules anyway.

The public version can be found on my blog:
http://arkadiusz-wahlig.blogspot.com...ed-online.html
Reply With Quote

#7 Old Re: [Announce] Open Signed Online automation tool - 2008-07-10, 18:29

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
Quote:
Originally Posted by y.a.k View Post
The caps could be read from the input sis by default, someone (jethro?) know how to do this?
Sure.

Using Ensymble modules sisfield.py and symbianutil.py, something like this (hacked from cmd_signsis.py, not tested):

Code:
import sisfield
import symbianutil

def harvestcaps(infile):
    '''
    Collect a logic-OR of all capabilities in a SIS file.
    This function does not examine embedded SIS files!
    '''

    # Read input SIS file.
    f = file(infile, "rb")
    instring = f.read(MAXSISFILESIZE + 1)
    f.close()

    # Convert input SIS file to SISFields.
    uids = instring[:16]    # UID1, UID2, UID3 and UIDCRC
    insis, rlen = sisfield.SISField(instring[16:], False)

    # Ignore extra bytes after SIS file.
    if len(instring) > (rlen + 16):
        print ("%s: warning: %d extra bytes after input SIS file (ignored)" %
               (pgmname, (len(instring) - (rlen + 16))))

    # Try to release some memory early.
    del instring

    # Check if there are embedded SIS files. Warn if there are.
    if len(insis.Data.DataUnits) > 1:
        print ("%s: warning: input SIS file contains "
               "embedded SIS files (ignored)" % pgmname)

    # Collect SIS file descriptions.
    sisfiledescmap = mapfiledesc(insis.Controller.Data.InstallBlock)

    # Check capabilities of EXEs and DLLs.
    capmask = 0
    for sisfiledesc in sisfiledescmap.values():
        siscaps = sisfiledesc.Capabilities
        if siscaps != None:
            capmask |= symbianutil.rawdatatocapmask(siscaps.Capabilities)

    return capmask

def mapfiledesc(sisinstallblock, sisfiledescmap = {}):
    '''Recursively scan SISInstallBlocks for file indexes in
    SISFileDescription SISFields.'''

    # First add normal files to SISFileDescription file index map.
    for filedesc in sisinstallblock.Files:
        idx = filedesc.FileIndex
        if idx in sisfiledescmap.keys():
            # In theory, SIS files could re-use file data by using the
            # same file index in more than one place. This special case
            # is not supported, for now.
            raise ValueError("duplicate file index in input SIS file")
        sisfiledescmap[idx] = filedesc

    # Then, recursively call mapfiledesc() for SISIf and SISElseIf SISArrays.
    for sisif in sisinstallblock.IfBlocks:
        mapfiledesc(sisif.InstallBlock, sisfiledescmap) # Map modified in-place.

        for siselseif in sisif.ElseIfs:
            mapfiledesc(siselseif.InstallBlock, sisfiledescmap)

    return sisfiledescmap
EDIT: pgmname is not defined in this snippet. It should be a string containing the program name.
Last edited by jethro.fn : 2008-07-10 at 18:37. Reason: pgmname not defined
Reply With Quote

#8 Old Re: [Announce] Open Signed Online automation tool - 2008-07-11, 13:27

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
@jethro.fn

Thanks for the code. I may add this to opensignsis later.

@all

A new version (0.52) is available.

The new version creates an empty config file on the first run which can be filled with values later (using a text editor). This was added since most of the arguments passed to the previous version stayed the same for every SIS file and had to be repeated every time.
Read more...
Reply With Quote

#9 Old Re: [Announce] Open Signed Online automation tool - 2008-07-11, 15:05

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
Another quick update.

In the new version (0.53), the IMEI used during the sign process is displayed in output so even if it comes from a config file, you know which one you're using. You may also include it in the output file by putting "{imei}" in the output filename.
Read more...
Reply With Quote

#10 Old Re: [Announce] Open Signed Online automation tool - 2008-08-15, 01:46

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
The latest symbiansigned.com problems (all files are rejected, more) forced me to update opensignsis.py. The new version properly detects the problem and displays an error message with the failure reason.
Read more...
Last edited by y.a.k : 2008-08-15 at 09:31. Reason: Typos, I was really sleepy when posting :)
Reply With Quote

#11 Old Re: [Announce] Open Signed Online automation tool - 2008-08-15, 08:46

Join Date: May 2007
Posts: 2,735
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by y.a.k View Post
The latest symbainsigned.com problems (all failes are rejected, more) forced me to update opensignedsis.py. The new version properly detects the problem and displays an error message with the failure reason.
Read more...
The tool gets better and better.

Anyways, I tried the Open Signed Online Beta, again - It still fails

Its truely a BETA

Best Regards,
Croozeus
Reply With Quote

#12 Old Re: [Announce] Open Signed Online automation tool - 2008-08-15, 20:18

Join Date: Jun 2008
Posts: 87
GonzalezM
Offline
Regular Contributor
It's fair to call it beta when it works in at least some capacity. Symbiansigned.com currently down-graded to vaporware.
Reply With Quote

#13 Old Re: [Announce] Open Signed Online automation tool - 2008-08-15, 20:42

Join Date: Feb 2008
Posts: 2,537
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by GonzalezM View Post
It's fair to call it beta when it works in at least some capacity. Symbiansigned.com currently down-graded to vaporware.
hi GonzalezM
yes you are absolutely correct but i suppose that there is nothing lower than a beta version so it is a beta version.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#14 Old Re: [Announce] Open Signed Online automation tool - 2008-08-15, 22:21

Join Date: Jun 2008
Posts: 87
GonzalezM
Offline
Regular Contributor
Quote:
Originally Posted by gaba88 View Post
hi GonzalezM
yes you are absolutely correct but i suppose that there is nothing lower than a beta version so it is a beta version.
I was just joking but some people here seem to take things more literally than they're intended.

But there's alpha testing which is done in house, usually in the development environment. Beta means that the software is finished but being tested by a limited audience. These days companies (like Google) just call production software "beta" so they aren't responsible if others lose money when their software fails.

Anyway, I guess it's fixed!
Reply With Quote

#15 Old Re: [Announce] Open Signed Online automation tool - 2008-08-16, 06:35

Join Date: Feb 2008
Posts: 2,537
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by GonzalezM View Post
I was just joking but some people here seem to take things more literally than they're intended.

But there's alpha testing which is done in house, usually in the development environment. Beta means that the software is finished but being tested by a limited audience. These days companies (like Google) just call production software "beta" so they aren't responsible if others lose money when their software fails.

Anyway, I guess it's fixed!
hi GonzalezM
man i was also joiking nothing a bit serious in that. And Thanks for all that comments about the versions.

Regards


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
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
Can't open the preferences from the tool menu dkmung Tools and SDK Feedback 2 2007-04-05 10:27
Another Big problem about Symbain Signed Tool JackySeraph Symbian Tools & SDKs 0 2006-12-22 10:19
Symbian Signed Tool Problem JackySeraph Symbian Tools & SDKs 0 2006-12-22 04:35
[announce] Manhattan Story Mashup py_s60 online game cyke64 Python 0 2006-09-19 07:08
[announce] fupper (Flickr upload tool) cyke64 Python 1 2006-09-04 21:22

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