這個東西好像不錯喔 可以匯入其他抓封包軟體的紀錄檔
http://blog.xuite.net/bluechance/mood/28716924
:)
...Read more
參考網址:http://www.stratigery.com//scripting.ftp.html
範例: /usr/bin/fput.sh
#!/bin/sh PATH=$PATH:/sbin:/bin:/usr/sbin/:/usr/bin export PATH FTPIP="10.0.0.1" FTPUSER="guest" FTPPWD="guest" FTPPORT="21" cho "Go to get files from" $FTPIP ncftp <<EOF open -u $FTPUSER -p $FTPPWD -P $FTPPORT $FTPIP binary mput $1 bye EOF |
譬如要傳1.txt 從linux到10.0.0.1
就下指令
fput.sh 1.txt
:D
...如果再console下 要用ftp傳送壓縮檔
記得要轉成binary模式
否則傳過去以後,會是有問題的檔案….冏…..
ftp> binary
200 Type set to I
ftp> put xxxx.tar
local: web_IODATA.tar remote: web_IODATA.tar
227 Entering Passive Mode (10,0,174,213,10,203)
150 Connection accepted
226 Transfer OK
4648960 bytes sent in 0.405 secs (11492.62 Kbytes/sec)
比vnc好裝多了…抓下來以後http://www.karlrunge.com/x11vnc/#downloading
1.解壓縮
2.configure
3.make
4.cp 執行檔 到 /usr/bin
執行x11vnc
client端就可以連了 port預設5900 …速度也很快 =o= (之前為了裝vncserver 弄得亂七八糟)
...CODE#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
char tmp[80];
char a1[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G'};
char a2[7] = {'H', 'I', 'J', 'K', 'L', 'M', 'N'};
char a4[8]="ABCDEFG";
char a5[8]="HIJKLMN";
char a6[8] = {'A', 'B', 'C', 'D', 'E', 'F', 'G','\0'};
char a7[8] = {'H', 'I', 'J', 'K', 'L', 'M', 'N','\0'};
sprintf(tmp, "%.7s%.7s", a1, a2);
printf("a1 + a2 = %s \n",tmp);
sprintf(tmp, "%s%s", a4, a5);
printf("a4 + a5 = %s \n",tmp);
sprintf(tmp, "%s%s", a6, a7);
printf("a6 + a7 = %s \n",tmp);
printf("size(a1) = %d , size(a4)=%d" , sizeof(a1),sizeof(a4));
system("PAUSE");
return 0;
}
也就是說 要注意\0 的問題 不然會出錯
執行結果:
a1 + a2 = ABCDEFG|瓽篤HIJKLMN
a4 + a5 = ABCDEFGHIJKLMN
a6 + a7 = ABCDEFGHIJKLMN
size(a1) = 7 , size(a4)=8