Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User t30d0r's Avatar
    Join Date
    Apr 2012
    Posts
    10
    I have a php script that I should be able to run on the Symbian platform.
    Who can help me?
    Pleas...

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    php is server side scriting and you can not really run it in normal Symbian applications. Anyway, have you considered on having the php executed in server side, and then making a client on device side which would use web connectiont for using the server side stuff.

    Also what is the php script doing ? you could also consider re-implementing it with C++.

  3. #3
    Registered User t30d0r's Avatar
    Join Date
    Apr 2012
    Posts
    10
    The script is as follows:
    Code:
    <?php
    
    $ssid   = "FFFFFFFF-1-00193EA1B2C3";
    
    $seq_20 = "\x22\x33\x11\x34\x02\x81\xFA\x22\x11\x41\x68\x11\x12\x01\x05\x22\x71\x42\x10\x66";
    
    $sn     = split( '-', $ssid );
    $sn     = $sn[2];
    
    preg_match_all( "/[a-f0-9]{2}/i", $sn, $sn_bytes );
    $sn_bytes = $sn_bytes[0];
    
    $str = "";
    for( $i = 0; $i < 6; $i++ ){
        $str .= chr( hexdec( $sn_bytes[$i] ) );
    }
    echo "$str\n";
    
    $str .= $seq_20;
    
    preg_match_all( "/[a-f0-9]{2}/i", md5($str), $md5_bytes );
    $md5_bytes = $md5_bytes[0];
    $long      = "";
    
    foreach( $md5_bytes as $byte ){
        $long .= sprintf( "%08s", decbin( hexdec($byte) ) );
    }
    
    $hex_5 = array();
    for( $i = 0; $i < 25; $i += 5 ){
        $n       = bindec( substr( $long, $i, 5 ) );
        $hex_5[] = $n > 0x0a ? $n + 0x57 : $n;
    }
    
    $wpa = "";
    foreach( $hex_5 as $hex ){
        $wpa .= sprintf( "%02x", $hex );
    }
    
    print "WPA : $wpa\n";
    
    ?>
    I hope that you can do something.
    I know a lot of people who might be interested ...
    Last edited by t30d0r; 2012-04-11 at 19:51. Reason: correction.

  4. #4
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    I'm not fluent in php, so, what does it do ?

  5. #5
    Nokia Developer Champion mikkovtr's Avatar
    Join Date
    Nov 2009
    Posts
    198
    Maybe cracks WPA encryption or something.

    Using python for this kind of script would be simple or search for pamp for symbian.

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    For encryption, it would be better to use real encryption APIs,.

  7. #7
    Registered User t30d0r's Avatar
    Join Date
    Apr 2012
    Posts
    10
    Yes it is right Mikkovtr!
    So I find these APIs in C + +? If possible
    I would like to be compatible with all
    versions of Symbian 3rd from last. And
    that can be developed with the same
    API in j2me?

  8. #8
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,664
    For symbin you could see whether you can find suitable API from: http://www.developer.nokia.com/Commu...ptography_APIs

    For J2me, you should ask in Java section.

  9. #9
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    These are super-simple string and mathematical operations, with the exception of the MD5 calculator. But that is also available everywhere, so you do not have to worry about it.
    Since it uses 0x57 as some magic value, I searched for wpa 0x57 java and it produces some Java implementations already.

Similar Threads

  1. How to develop a RDA like PC software
    By yant in forum Symbian C++
    Replies: 2
    Last Post: 2009-07-28, 12:23
  2. help me develop software on s60 UI using j2me
    By chaoraksa in forum Mobile Java General
    Replies: 4
    Last Post: 2009-06-16, 11:06
  3. Develop SMS related software
    By nickia in forum General Messaging
    Replies: 2
    Last Post: 2006-11-01, 09:14
  4. how to develop a software over the two platform symbian and win32?
    By lingwangbochen in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-11-11, 00:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved