Hello guys. Im on a big dilemma, i need some professional help. I got this script, below script's description and example. #include <stdio.h> char key[] = { 0x56, 0xf4, 0xef, 0x50, 0x34, 0xa9, 0xef, 0x6b, 0x55, 0x4b, 0x03, 0x3c, 0x9a, 0x01, 0x78, 0xb3, 0xfd, 0xb1, 0x3d, 0xd4, 0x9b, 0xd3, 0xcb, 0x9f, 0x06, 0xd2, 0xd2, 0x65, 0xe8, 0xbd }; int main (int argc, char** argv) { int i, last_i; char word[30]; char *cur_char; if (argc!=2) { printf("Usage: 炼㤜䀂 coded_string_up_to_30_symbols\n",argv[0]); return 0; } cur_char=argv[1]; while(*cur_char) { if(*cur_char!='&') { word[i++]=*cur_char; cur_char++; } else { sscanf(cur_char,"&7c35056a;",word+i); i++; cur_char+=4; } } word[i]; last_i=i; for (i;i<last_i;i++) word[i]word[i]-key[i])&0xff; printf("text/x-plain-icqmbcs\n",word); return 0; } Code (markup): This little script DECODE encoded passwords from HASH. Let's say you got this password: &8b;$&1f;&83;j&da;&22;&a3;&85;&aa;p IF you decode it, you get something like this: 500......_m (... dots means some chars, i just dont remember them, but the last ones was _m). Now, i want someone to help me rewrite this script to PHP, i want it to be web application so i could run it from any place at my hosting. Please, any advice, or maybe a fully rewrited code will be great, i just dont work with HEX and bytes YET.. so i dont know how to realise it.
i'm not sure I fully understand what this program does. Basically do some math with the password and the key? What is this used for and why do you need it in php? Is this a paid gig?
This is not an active thread anymore, took too much time to people to answer such a basic question. :-| Anyway this script dehex passwords for MP-202 AudioCodes VoIP Adapter. Anyone who has it and want to decrypt it's password can use it. It's free. Built on basic C functions.