ÇÁ·Î±×·¡¹Ö

 3198, 1/160 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   hipro
   C ÇÁ·Î±×·¡¹Ö Áß..

http://www.hackerschool.org/HS_Boards/zboard.php?AllArticle=true&no=3392 [º¹»ç]


#include<stdio.h>

int main(){

        char sel;
        int sel2;

        printf("Do You Really Want To Change Mode?(y/n)");
        scanf("%c",&sel);

        if(sel=='y'){
        printf("if you want to  change GUI mode to TUI mode, press 1 \n");
        printf("or if you want to change TUI mode to GUI mode, press 2 : ");
        scanf("%d",&sel2);
        if(sel2==1){
                system("find /etc/default/grub -type f -exec perl -pi -e 's|quiet splash|text|g' {} \\;");
                system("sudo update-grup");
                system("logout");
                }else if(sel2==2){
                system("find /etc/default/grub -type f -exec perl -pi -e 's|text|quiet splash|g' {} \\;");
                system("sudo update-grup");
                system("logout");
                }
                else{
                printf("error");
                return 0;
                }
        printf("please, reboot");
        }
        else if(sel=='n'){
        printf("quit\n");
        return 0;
        }
        else{
                printf("error\n");
                return 0;
        }
}

ÀÌ·¸°Ô ¼Ò½º¸¦ ­½À´Ï´Ù¸¸. ½ÃÀÛÇÒ¶§ »ç¿ëÀÚÀÇ ±ÇÇÑÀÌ root°¡ ¾Æ´Ï¸é ÇÁ·Î±×·¥À» Á¾·á ½ÃŰ°í ½ÍÀºµ¥ ¾î¶»°Ô ÇÒ±î¿ä..??

Á¦ ±»Àº ¸Ó¸®·Î´Â ¾Æ¹«¸® »ý°¢Çصµ Çö »ç¿ëÀÚÀÇ ±ÇÇÑÀ» ÇÁ·Î±×·¡¹Ö ¾Ë¾Æ¸Ô°Ô ÇÒ ¹æ¹ýÀ» ¸ð¸£°Ú½À´Ï´Ù.

Âü°í·Î À§ ¼Ò½º´Â ¿ìºÐÅõ¿¡¼­ ºÎÆÃÇÒ¶§ ÅØ½ºÆ® ºÎÆÃÀ¸·Î, ±×·¡ÇÈ ºÎÆÃÀ¸·Î ¸¦ º¯°æÇÏ´Â ÇÁ·Î±×·¥ÀÔ´Ï´Ù.

¸®´ª½º ±ñÁö 2ÀϺý¿¡ ¾ÈµÇ¼­ °øºÎµµ Á¦´ë·Î ¸øÇؼ­ ÇãÁ¢ÇÒÅÙµ¥ ¼Ò½º ºÎºÐ¿¡µµ ÅÂŬ ¹× ÆÁÀ» Áּ̽º¸é ÇÕ´Ï´Ù.

±×¸®°í ÁÙÀ» ¾î¶»°Ô Á¤·ÄÇØ¾ß ÇÒÁö ¸ð¸£°Ú´õ±º¿ä.. ÀÏ´Ü À§¿¡ ó·³ Á¦ ´«¿¡ ±×³ª¸¶ ¸ÂÀº °É Çߴµ¥ ±× ºÎºÐµµ

Á¶¾ð ºÎʵ右´Ï´Ù.

  Hit : 5328     Date : 2012/04/12 02:57



    
Mephist getuid 2012/04/17