We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i got this code and it worked but now it makes error. works with proteos. can processor cpu have another virus?
void Secret_Code(unsigned char *input,unsigned long len) { unsigned int k; unsigned int nps = 0; for(k = 0; k < len; k++) { if(input[k] == 0xCC) { if(input[k + 1] == 0xCC && input[k + 2] == 0xCC && input[k + 3] == 0xCC) { switch(rand()%3) { case 0: input[k] = 0x57; input[k + 1] = 0x5F; k = k + 1; break; case 1: input[k] = 0xC0; input[k + 1] = 0xFE; input[k + 2] = 0xC8; input[k + 3] = 0xFE; k=k+3; break; case 2: input[k] = 0xF8; k++; break; } } } else if(input[k] == 0x90) { nps = NpsInARow(input,k); if(nps > 1) { printf("Found (In a row: %d)!\n",nps); } switch(nps){ case 3: input[k] = 0x14; input[k + 1] = 0x21; input[k + 2] = rand(); k = k + 2; break; case 4: input[k] = 0x56; input[k + 1] = 0x19; input[k + 2] = 0x47; input[k + 3] = 0x29; k = k + 3; break; case 5: input[k] = 0x73; input[k + 1] = 0x23; input[k + 2] = 0x95; input[k + 3] = 0x02; input[k + 4] = rand(); k = k + 4; break;
} } } }
Yes. Scan it with the latest anti-virus software: www.mysoftwaresucksitsnotavirus.com
You mean in addition to the virus which appears to have impaired your eyesight?
www.danlhenry.com/.../keil_code.png
Tamir Michael
your link does not work!!!!!!!!!!! plz check
void Secret_Code(unsigned char *input,unsigned long len) { unsigned int k; unsigned int nps = 0; for(k = 0; k < len; k++) { if(input[k] == 0xCC) { if (input[k + 1] == 0xCC && input[k + 2] == 0xCC && input[k + 3] == 0xCC) { switch(rand()%3) { case 0: input[k] = 0x57; input[k + 1] = 0x5F; k = k + 1; break; case 1: input[k] = 0xC0; input [k + 1] = 0xFE; input[k + 2] = 0xC8; input[k + 3] = 0xFE; k=k+3; break; case 2: input[k] = 0xF8; k++; break; } } } else if(input[k] == 0x90) { nps = NpsInARow(input,k); if(nps > 1) { printf("Found (In a row: %d)!\n",nps); } switch(nps){ case 3: input[k] = 0x14; input[k + 1] = 0x21; input[k + 2] = rand(); k = k + 2; break; case 4: input[k] = 0x56; input[k + 1] = 0x19; input[k + 2] = 0x47; input[k + 3] = 0x29; k = k + 3; break; case 5: input[k] = 0x73; input[k + 1] = 0x23; input[k + 2] = 0x95; input[k + 3] = 0x02; input[k + 4] = rand(); k = k + 4; break; } } } }
Much better!
Pretty much impressed by your indentation.
... here: http://www.ioccc.org/
I think we don't need a long voting period (or waiting for the month to end) to vote this the most "interesting" code of the month. Also the most unreadable. Most definitely a good contender for the Obfuscated C contest.
I like the simple efficiency - how to get the most out of the monitor by writing the code to optimally fill every text line. Do you use an editor with automatic word-wrap, or do you have to manually adjust the code into a rectangular block when you need to insert new text in the middle?
it worked but now it makes error
wot??? is there some self modifying code hidden away in that Secret_Code somewhere?
I still don't see why this code would be useful for anything and why ask on an open forum to people who wont understand it anyway. It doesn't protect any code and it doesn't obfuscate any code. As soon a an executable is built with "pernament" options the fill chars are only used in between different modules linked to the same binary executable. If we use "optimize for size" they are never used.
So what's the idea behind replacing 0x90 and 0xCC?
The person belongs to Apple i think and is writing firmware for iphone 5. Please help him to get the bleeding edge version of iphone.