I have a php script that I should be able to run on the Symbian platform.
Who can help me?
Pleas...![]()
I have a php script that I should be able to run on the Symbian platform.
Who can help me?
Pleas...![]()
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++.
The script is as follows:
I hope that you can do something.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 know a lot of people who might be interested ...
Last edited by t30d0r; 2012-04-11 at 19:51. Reason: correction.
I'm not fluent in php, so, what does it do ?
Maybe cracks WPA encryption or something.
Using python for this kind of script would be simple or search for pamp for symbian.
For encryption, it would be better to use real encryption APIs,.
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?
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.
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.