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

Linux Socket±à³ÌʵÀý(Ò»¸öHello World³ÌÐò)


Linux Socket±à³ÌʵÀý(Ò»¸öHello World³ÌÐò)
ÔÚLinuxÏÂдÁ˸öСµÄsocket³ÌÐò£¬·ÖΪ¿Í»§¶ËºÍ·þÎñÆ÷¶Ë,·þÎñ¶Ë¿ªÒ»¸ö¶Ë¿Ú(2000),×öΪһ¸ödaemon,µÈ´ý¿Í»§µÄÁ¬½ÓÇëÇó.Ò»µ©Óпͻ§Á¬½Ó,·þÎñÆ÷¶Ë´òÓ¡³ö¿Í»§¶ËµÄIPµØÖ·ºÍ¶Ë¿Ú,²¢ÇÒÏò·þÎñÆ÷¶Ë·¢ËÍ»¶Ó­ÐÅÏ¢ºÍʱ¼ä.ÏÂÃæÊÇ·þÎñ¶ËµÄ´úÂë(tcpserver.c).ÓÉÓÚÕâÖ»ÊǸö¼òµ¥µÄ³ÌÐò£¬ËùÒÔÖ»ÓÃÁ˵¥Ïß³ÌʵÏÖ!
/**
 * Tcp Server program, It is a simple example only.
 * zhengsh 200520602061 2
 * when client connect to server, send a welcome message and timestamp in server.
 */
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <time.h>
#define SERVER_PORT 20000 // define the defualt connect port id
#define LENGTH_OF_LISTEN_QUEUE 10 //length of listen queue in server
#define BUFFER_SIZE 255
#define WELCOME_MESSAGE "welcome to connect the server. "
int main(int argc, char **argv)
{
       int servfd,clifd;
       struct sockaddr_in servaddr,cliaddr;
       if ((servfd = socket(AF_INET,SOCK_STREAM,0)) < 0)
       {
              printf("create socket error!\n");
              exit(1);
       }
       bzero(&servaddr,sizeof(servaddr));
       servaddr.sin_family = AF_INET;
       servaddr.sin_port = htons(SERVER_PORT);
       servaddr.sin_addr.s_addr = htons(INADDR_ANY);
       if (bind(servfd,(struct sockaddr*)&servaddr,sizeof(servaddr))<0)
       {
              printf("bind to port %d failure!\n",SERVER_PORT);
              exit(1);
       }
       if (listen


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

VMwareµ÷ÕûLinuxÐéÄâ»úÓ²ÅÌ´óСµÄ·½·¨

Èç¹ûÔ¤ÏÈ×°µÄVMware LinuxÐéÄâ»úµÄÓ²ÅÌ¿Õ¼ä¹ýС,ÖØÐÂ×°Ò»¸öÓÖͦÂé·³¡£ËÑË÷ÍøÉϵķ½·¨,¼ò½éÈçÏÂ:
 Ò»£ºÓ²ÅÌÀ©Èݵķ½·¨£º
1¡¢vmwareÌṩһ¸öÃüÁîÐй¤¾ß£¬vmware-vdiskmanager.exe£¬Î»ÓÚvmwareµÄ°²×°Ä¿Â¼Ï£¬±ÈÈç
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe.
ÔÚwindowsµÄcmd´°¿ÚÖУ¬×ªµ½vm ......

linuxµÄfind²éÕÒÃüÁîÓ÷¨

find ÃüÁîÔÚlinuxÖÐÊǺܳ£Óõ½µÄÒ»¸ö²éÕÒÃüÁËüµÄ¹¦Äܷdz£µØÇ¿´ó¡£¿ÉÒÔ½áºÏÕýÔòÆ¥ÅäÀ´ËÑË÷ϵͳÖеÄÖ¸¶¨µÄÄÚÈÝ£¬ÒÔÏÂÎҾͼǼһÏÂÕâ¸öfind³£Óõ½µÄһЩÓ÷¨
¡¡¡¡ 
¡¡¡¡Ê×ÏÈÎÒÃÇÀ´¿´¿´findµÄ×ÜÌåÓ÷¨
¡¡¡¡find path option [-print -exec -ok]
¡¡¡¡ÆäÖÐpathÊÇÖ¸¶¨ÔÚÄĸö·¾¶ÖвéÕÒÄÚÈÝ¡£Èç/varϲéÕÒÄÚÈÝ£¬optionÊ ......

Rooting A Linux System 101

So you want to root a linux system? But, you don't know shit about it?

Well, this guide is for you.

Tools covered by this guide
-----------------------
netcat [utility for creating a backdoor shell, but can be used for a plethora of other things]
gcc [c program compiler, the h ......

Linux»ù´¡ÓëÎÒ³£ÓÃÖ¸Áî

1) linuxĿ¼¼Ü¹¹
/   ¸ùĿ¼
/bin    ³£ÓõÄÃüÁî
binary file µÄÄ¿錄
/boot   ´æ·ÅϵͳÆô¶¯Ê±±ØÐë¶ÁÈ¡µÄµµ°¸£¬°üÀ¨ºËÐÄ
(kernel) ÔÚÄÚ
     /boot/grub/menu.lst   GRUBÉèÖÃ
     /boot/vmlinuz   ÄÚºË
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ