Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux ÏÂc ³ÌÐò ¶Î´íÎó ·ÖÎö

fopen("/var/spool/cron/tmp","w+");
/////////////////////////////////////////
££i nclude <sys/types.h>
££i nclude <sys/stat.h>
££i nclude <fcntl.h>
££i nclude <unistd.h>
££i nclude <stdio.h>
££i nclude <string.h>
££i nclude <stdlib.h>
int main(){
int ret=-1;
printf("*************************************** delPolicy  ***************************************************\n");
FILE *f;
f=fopen("var/spool/cron/tmp","w");
if(f==NULL)
{
  printf("open tmp failed!\n");
  fclose(f);
  return -1;
}
printf("open two files successfully!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
fclose(f);
ret=0;
printf("*************************************** delPolicy  ***************************************************\n");
return ret;
}
³öÏֶδíÎó:
 Ô­Òò:1:"/var/spool/cron/tmp"´íд³É"var/spool/cron/tmp"
      2:ÎļþÃû²»ÄÜΪtmp¹Ø¼ü×Ö,¿ÉΪmytmp
²úÉú¶Î´íÎó¾ÍÊÇ·ÃÎÊÁË´íÎóµÄÄÚ´æ¶Î£¬Ò»°ãÊÇÄãûÓÐȨÏÞ£¬»òÕ߸ù±¾¾Í²»´æÔÚ¶ÔÓ¦µÄÎïÀíÄÚ´æ,ÓÈÆä³£¼ûµÄÊÇ·ÃÎÊ0µØÖ·.
Ò»°ãÀ´Ëµ,¶Î´íÎó¾ÍÊÇÖ¸·ÃÎʵÄÄڴ泬³öÁËϵͳËù¸øÕâ¸ö³ÌÐòµÄÄÚ´æ¿Õ¼ä£¬Í¨³£Õâ¸öÖµÊÇÓÉgdtrÀ´±£´æµÄ£¬ËüÊÇÒ»¸ö48λµÄ¼Ä´æÆ÷£¬
ÆäÖеÄ32λÊDZ£´æÓÉËüÖ¸ÏòµÄgdt±í£¬ºó13λ±£´æÏàÓ¦ÓÚgdtµÄϱ꣬×îºó3λ°üÀ¨Á˳ÌÐòÊÇ·ñÔÚÄÚ´æÖÐÒÔ¼°³ÌÐòµÄÔÚcpuÖеÄÔËÐ춱ð,
Ö¸ÏòµÄgdtÊÇÓÉÒÔ64λΪһ¸öµ¥Î»µÄ±í£¬ÔÚÕâÕűíÖоͱ£´æ×ųÌÐòÔËÐеĴúÂë¶ÎÒÔ¼°Êý¾Ý¶ÎµÄÆðʼµØÖ·,ÒÔ¼°Óë´ËÏàÓ¦µÄ¶ÎÏÞºÍÒ³Ãæ½»»»,
»¹ÓгÌÐòÔËÐ춱ð»¹ÓÐÄÚ´æÁ£¶ÈµÈµÈµÄÐÅÏ¢¡£Ò»µ©Ò»¸ö³ÌÐò·¢ÉúÁËÔ½½ç·ÃÎÊ£¬cpu¾Í»á²úÉúÏàÓ¦µÄÒì³£±£»¤£¬ÓÚÊÇsegmentation fault¾Í³öÏÖÁË.
ÔÚ±à³ÌÖÐÒÔϼ¸Àà×ö·¨ÈÝÒ×µ¼Ö¶δíÎó,»ù±¾ÊÇÊÇ´íÎóµØʹÓÃÖ¸ÕëÒýÆðµÄ
1)·ÃÎÊϵͳÊý¾ÝÇø£¬ÓÈÆäÊÇÍù  ÏµÍ³±£»¤µÄÄÚ´æµØַдÊý¾Ý×î³£¼û¾ÍÊǸøÒ»¸öÖ¸ÕëÒÔ0µØÖ·
2)ÄÚ´æÔ½½ç(Êý×éÔ½½ç£¬±äÁ¿ÀàÐͲ»Ò»ÖµÈ) ·ÃÎʵ½²»ÊôÓÚÄãµÄÄÚ´æÇøÓò
½â¾ö·½·¨
ÎÒÃÇÔÚÓÃC/C++ÓïÑÔд³ÌÐòµÄʱºî£¬ÄÚ´æ¹ÜÀíµÄ¾ø´ó²¿·Ö¹¤×÷¶¼ÊÇÐèÒªÎÒÃÇÀ´×öµÄ¡£
ÈçºÎ¿ìËÙ¶¨Î»ÕâЩ"¶Î´íÎó"µÄÓï¾ä
     1  dummy_ (void)
     2&n


Ïà¹ØÎĵµ£º

Linux¸ß¼¶È¨ÏÞ¹ÜÀí£ºACLÓ÷¨¼ò½é

ת×Ô£º http://ipie.blogbus.com/logs/36730036.html
 
Linux¸ß¼¶È¨ÏÞ¹ÜÀí£ºACLÓ÷¨¼ò½é
2009-03-18 23:11:22 by deepblue
Ç°¶Îʱ¼ä£¬ÔÚLinuxÉÏÉèÖÃÒ»¸öĿ¼µÄ·ÃÎÊȨÏÞʱ£¬·¢ÏÖͨ¹ý¼òµ¥µÄchmod²Ù×÷²»ÄÜÂú×ã×Ô¼ºµÄÐèÇó£¬
ÎÊÌ⣺Èç¹ûÓÃrootÕʺŴ´½¨ÁËÒ»¸öĿ¼DIR£¬ÓÐA,B,C,DËÄ×éÓû§£¬ÎÒÏë¸øA×éÓû§¶ÁдִÐеÄȨÏÞ£ ......

linuxÄÚºËcryto½Ó¿ÚµÄʵÏÖÒÔ¼°ÓëopensslµÄ±È½Ï

linuxÄÚºËʵÏÖÁËcrypto½Ó¿Ú£¬ÓÃÓÚÀàËÆIPSecÖ®ÀàÒªÔÚÄÚºËÖÐʵÏÖµÄÓë²Ù×÷ϵͳ°ó¶¨µÄ°²È«»úÖÆ£¬Èç¹û²»ÊÇÓÃÓÚÕâÑùµÄ»úÖÆ£¬²»ÒªÊ¹ÓÃÄÚºËÖеÄcrypto½Ó¿Ú£¬×ܵÄÀ´Ëµ£¬linuxµÄcryptoÖÐ×îÖØÒªµÄ½á¹¹ÌåÓÐÁ½¸ö£ºcrypto_tfmºÍcrypto_alg
struct crypto_tfm {
    u32 crt_flags;
    union {
 & ......

linuxÄÚºËnetfilterµÄʵÏÖÒÔ¼°ipset

netfilterµÄʵÏÖ»úÖÆ»ùÓÚËĸö²ã´ÎµÄÆ¥Å䣬Êý¾Ý°üÔÚÿ¸ö²ã´Î¶¼Òª¾­¹ýÒ»¸ö¹ýÂËÁ´±í£¬µÚÒ»¸ö²ã´Î¾ÍÊÇhook£¬ÖÚËùÖÜÖªlinuxÄÚºËÖÐÒ»¹²ÓµÓÐ5¸öhooks£¬µ±È»ÄãÒ²¿ÉÒÔ×Ô¼ºÐÞ¸ÄÄÚºËÔÚÈκεط½Ìí¼Óhook£»µÚ¶þ¸ö²ã´Î¾ÍÊÇÿ¸öhookÏÂÃæµÄtables£¬Ã¿Ò»¸öhook¶¼¹ý¹ÒÔØÁã¸ö»òÕßÈô¸É¸ötables£¬Êý¾Ý°üÒªÒ»¸öÒ»¸ö¾­¹ýÕâЩtables£»µÚÈý¸ö²ã´Î¾ÍÊÇ ......

ÔÚC³ÌÐòÀïºÍshellͨÐÅ

Ò»°ãÎÒÃǵ÷ÓÃshell½Å±¾¶¼ÓÃsystem()À´ÊµÏÖ£¬È»ºó·¢ÏÖsytem·µ»ØÖµ²»ºÃ¿ØÖƶøÇÒת»»Âé·³(»¹ÒªÓÒÒÆ4λ¼´/256)£¬ÓÚÊÇÎÒÓÃpopenÀ´»ñÈ¡shellµÄ·µ»ØÖµ¡£¹ûÈ»ÔÚUnixÊÀ½çÀïÃ棬ͨµÀ¾ÍÊÇÁ¬½á¸÷¸ö·½ÃæµÄÇÅÁº°¡£¡
´úÂëÀý×ÓÈçÏ£º
#include<stdio.h>
#include<stdlib.h>
#include<sys/wait.h>
int main (int argc ......

ÓÅ»¯C´úÂë³£Óõļ¸ÕÐ

ÓÅ»¯C´úÂë³£Óõļ¸ÕÐ
ÔÚÐÔÄÜÓÅ»¯·½ÃæÓÀԶעÒâ80-20Ô­Ôò£¬¼´20%µÄ³ÌÐòÏûºÄÁË80%µÄÔËÐÐʱ¼ä£¬Òò¶øÎÒÃÇÒª¸Ä½øЧÂÊ£¬×îÖ÷ÒªÊÇ¿¼ÂǸĽøÄÇ20%µÄ´úÂë¡£²»ÒªÓÅ»¯³ÌÐòÖпªÏú²»´óµÄÄÇ80%£¬ÕâÊÇÀͶøÎÞ¹¦µÄ¡£
µÚÒ»ÕУºÒԿռ任ʱ¼ä
¼ÆËã»ú³ÌÐòÖÐ×î´óµÄì¶ÜÊÇ¿Õ¼äºÍʱ¼äµÄì¶Ü£¬ÄÇô£¬´ÓÕâ¸ö½Ç¶È³ö·¢ÄæÏò˼άÀ´¿¼ÂdzÌÐòµÄЧÂÊÎÊÌ⣬ÎÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ