Right I'm that close I can almost touch it.
To get all of the characters from szTempVIEWSTATE into my char data array I did the following:
I know this has worked as I can print out characters from the array now so I have the ability to extract the characters one at a time which is brilliant.
So, here comes the next part. What I planned to do was to have a variable which was:
And then what I would do is take every character one at a time from my char data array, check if it was a certain character and if it was append its conversion to szVIEWSTATE, if not I'd append the current value. I'm getting an error now but I'm 99% certain its because I'm not using the strcat incorrectly (i.e. its a middleware error which seems to occur when i've done some wrong coding). Could you please take a look at my code and tell me what i'm doing wrong. I'm sure I am starting to see a light at the end of the tunnel.
szLength = strlen(szTempVIEWSTATE);
printf("The length is: %d", szLength);
szVIEWSTATE = (char *)malloc(20000);
memset(szVIEWSTATE, 0, 20000);
for(i=0; i<szLength; i++)
if(data[i] = "+")
else if(data[i] = "=")
else if(data[i] = " ")