¾µäC³ÌÐòÇó½â
Problem 1
Read Ken Thompson's article ...
char s[] = {
'\t',
'0',
'\n',
'}',
';",
'\n',
'\n',
'/',
'*',
'\n',
(213 lines deleted)
0
};
/* The string s is a
* representation of the body
* of this program from '0'
* to the end.
*/
main(){
int i;
printf("char\ts{ } = {\n");
for(i=0; s[i]; i++)
printf("\t%d,\n",s[i]);
printf("%s",s);
}
Compile and run this program. You will have to figure out what goes in the 213 deleted lines. If you want, you can leave the comment out of the string s and out of the program. Explain the output. By itself, this program does not pose any sort of security threat. Explain in your own words what this program has to do with Thompson's Trojan Horse attack.
û¿´¶®¡£
printf("%s",s); Ö´ÐÐÕâ¾äµÄʱºò£¬s[1]µÄ'0'Ϊʲôû´ò³öÀ´ÄØ£¿
up
ÕÒµ½ÄǸö'0'ÁË£¬¸Õ²Å¿´´íÐÐÁË¡£
²»¹ý»¹ÊÇû¿´Ã÷°×ľÂíÊÇÔõô»ØÊÂ
mark
ÕÒµ½ÔÎÄÁË£¬ÕâÊÇKen Thompson»ñµÃͼÁé½±µÄÑݽ²µÄÒ»²¿·Ö¡£
Õâ¶Î´úÂëÊÇÒ»¸öÀý×Ó£¬Ëü¿ÉÒÔ²úÉú¾ßÓÐ×ÔÎÒ¸´ÖÆÄÜÁ¦µÄ³ÌÐò¡£
²»¹ý¡¡»¹ÊÇû¿´¶®
Figure 1 shows a s
Ïà¹ØÎÊ´ð£º
ÔÚ²éѯºó½«²éѯ³öÀ´µÄÖµ¸³¸ø¸÷ÊäÈë¿ò
<c:if test="${not empty dataValue}">
fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......
#include <string.h>
#include <stdio.h>
void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......
ÎÒÓÃPHPÀ©Õ¹Cʱ£¬ÓõÄÊÇÔ´ÂëextĿ¼ÏµÄ./ext_skel
×îºó±àÒë×ÜÊDz»ÄÜÉú³ÉÀ©Õ¹Ä£¿éµÄ.so¶¯Ì¬¿â£¬ÎÒÓõİ汾ÊÇ5.3.0£¬
ÕâÊÇÔõô»ØÊ£¬¸ßÊÖ½â´ðÏÂ
²»ÄÜÉú³ÉʱÓÐɶÌáʾÐÅÏ¢£¿
ÔËÐÐÁË/ext_skel --extname=Ä ......
ÎÒCѧµÃ²»ÊǺܺã¬ÎÒÃÇÏÖÔÚÓÖ¿ªÊ¼Ñ§C++ÁË£¬ÎÒ¿ÉÒÔ²»¿ÉÒÔÌø¹ýCÖ±½ÓȥѧC++°¡£¿ÒÔºó¹¤×÷ÁËCºÜÖØÒªºÜ³£ÓÃÊÇô£¿
¿ÉÒÔ¡£
cºÍc++µÄ²î±ð¿ÉÒÔ˵ºÜ´ó£¬µ«ÊÇÔÚѧϰµÄ¹ý³ÌÖбȽÏÄÑÌå»áµ½¡£ÉÏѧµÄʱºò»¹ÊǶ໨ʱ¼äÔÚ»ù´¡ÉÏ£ ......