About hex decoding problems in Web pages
#include <stdio.h>//%d6%d0%b9%fa 4 bytes 8 +//%d6//1101 0110 6 =13*16+6//%d0//1101 0000 0 13*16//-55//Ten//' A ', B, C , and D.voidmain1 () {Charstrx[7] ="%d6%d0"; Charstr[3] = {0 }; //str[0]= 214;//' D ' ' 6 ' 13*16+6//str[1]=208;//' D ' ' 0 ' 13*16+0str[0] = ('D'- -) * -+'6'- -; str[1] = ('D'- -) * -+'0'- -; printf ("%s", str); GetChar ();}Char* Change (Char*str) { Char*tempstr =malloc(strlen (str) +1);//strlen//memset (tempstr, 0, sizeof (str) + 1); intx=0, y=0; Charassii_1, assii_2; while(Tempstr[x]) {if((tempstr[x]=str[y]) = ='%') { //y+1 y+2 if(str[y+1]>='A') {assii_1= Str[y +1] - -; } Else{assii_1= Str[y +1] - -; } if(Str[y +2] >='A') {assii_2= Str[y +2] - -; } Else{assii_2= Str[y +2] - -; } Tempstr[x]= Assii_1 * -+assii_2; Y+=2; } x++; Y++; } Tempstr[x]=' /'; returnTempStr;}voidMain () {Charstr[ -] ="%d6%dc%c8%f0%b8%a3"; printf ("%s", Change (str)); System ("Pause");}
About hex decoding problems in Web pages