随笔分类 - socket
摘要:原文:http://www.oschina.net/translate/linux-netcat-commandnetcat是网络工具中的瑞士军刀,它能通过TCP和UDP在网络中读写数据。通过与其他工具结合和重定向,你可以在脚本中以多种方式使用它。使用netcat命令所能完成的事情令人惊讶。netcat所做的就是在两台电脑之间建立链接并返回两个数据流,在这之后所能做的事就看你的想像力了。你能建立一个服务器,传输文件,与朋友聊天,传输流媒体或者用它作为其它协议的独立客户端。下面是一些使用netcat的例子.[A(172.31.100.7) B(172.31.100.23)]Linux netca
阅读全文
摘要:原文:http://www.huanxiangwu.com/477/linux-nc-netcat一、版本通常的Linux发行版中都带有NetCat(简称nc),甚至在拯救模式光盘中也由busybox提供了 简版的nc工具。但不同的版本,其参数的使用略有差异。NetCat 官方地址:http://netcat.sourceforge.net/引用[root@hatest1 ~]# cat /etc/asianux-releaseAsianux release 2.0 (Trinity SP2)[root@hatest1 ~]# cat /etc/redflag-releaseRed Flag
阅读全文
摘要:原文:http://blog.longwin.com.tw/2012/02/nc-data-send-socket-server-2012/於 Debian / Ubuntu Linux 想要透過 Socket 互相傳送資料、聊天等等, 可以透過 nc (NetCat) 快速實現.使用 nc 聊天nc -l 1234 # Server 1nc 127.0.0.1 1234 # 127.0.0.1 換成 Server 1 的 IP 即可.這樣子雙方打得字就會戶相傳過去, 可以達到聊天的效果. (Ctrl + D 可以結束)掃 Port - 看哪個 Port 有開放nc -v -w 2 local
阅读全文
摘要:client.c: 1 //Client.cpp 2 #include "StdAfx.h" 3 #include <winsock2.h> 4 #include <stdio.h> 5 #include <windows.h> 6 #pragma comment(lib,"ws2_32.lib") 7 int main(int argc, char* argv[]){ 8 //判断是否输入了IP地址和端口号 9 if(argc!=3){10 printf("Usage: %s IPAddress PortN
阅读全文
摘要:client.c#include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <netinet/in.h> #define BUFFSIZE 32 void Die(char *mess) { perror(mess); exit(1); } int main(int argc, char *argv[])
阅读全文
搜索
积分与排名
- 积分 - 1028004
- 排名 - 366
随笔分类
- 电影(1)
- 163(1)
- 8700(1)
- ajax(6)
- android安卓(4)
- ant(1)
- apache(4)
- ape(8)
- api(2)
- apt(2)
- arm(4)
- asp(3)
- awk(6)
- bash(7)
- bat(1)
- boost(24)
- busybox(1)
- c(67)
- c#(3)
- c++(48)
- cast(1)
- chrome (1)
- cmd(76)
- cnblogs(2)
- const(2)
- cookie_session(1)
- cron(2)
- css(1)
- curl(2)
- cut(1)
- cvs(1)
- date(3)
- define(5)
- df(1)
- div(3)
- dll(1)
- dojo(1)
- doxygen(4)
- drupal(8)
- drupal7(3)
- du(1)
- effective(2)
- egg(1)
- emacs(15)
- env(1)
- exec(1)
- expect(1)
- explicit(1)
- extern(1)
- fastcgi(2)
- fcgi(2)
- fdisk(1)
- ffmpeg(1)
- find(3)
- firebug(3)
- firefox(2)
- flex(2)
- ftp(1)
- gae(2)
- gcc(2)
- gdb(9)
- git(13)
- glib(10)
- gmail(1)
- google(5)
- gprof(2)
- grep(4)
- gsoap(1)
- gtk(2)
- history(1)
- html(6)
- html5(3)
- http(2)
- ie(1)
- img(1)
- inotify(1)
- ip(3)
- iso(1)
- java(3)
- jdk(1)
- jquery(13)
- js(34)
- json(6)
- jsp(1)
- kill(1)
- kvm(1)
- lib(3)
- libevent(3)
- libjingle(2)
- linux(12)
- lisp(1)
- ln(1)
- log(2)
- log4c(3)
- log4cxx(1)
- lsof(1)
- ls指令(1)
- mail(2)
- makefile(14)
- malloc(1)
- maps(1)
- math(4)
- mcs51(4)
- mobaxterm(1)
- monitor(1)
- more(1)
- mount(3)
- msys(1)
- mutt(1)
- mysql(6)
- nat(2)
- nc(2)
- netstat(2)
- nexus(2)
- nfs (1)
- nginx(3)
- nm(1)
- nmap(2)
- nodejs(2)
- nosql(1)
- p2p(2)
- palm(3)
- perl(3)
- php(18)
- pkg(1)
- postgresql(3)
- pptp(6)
- profile(1)
- ps(1)
- putty(3)
- python(10)
- rails(2)
- raspberry树莓派(4)
- redis(1)
- rewrite(1)
- rhel(2)
- rm(4)
- rpc(1)
- rpm(1)
- rsync同步(2)
- ruby(6)
- samba(1)
- screen(1)
- sdk(1)
- sdl(1)
- sed指令(6)
- shell(16)
- sizeof(1)
- smarty(1)
- socket(5)
- soft(1)
- sort(1)
- sql(4)
- sqlite(3)
- ssh(8)
- ssh web(2)
- stl(11)
- string(4)
- svn(7)
- systemtap(1)
- tail(2)
- tar(2)
- telecom(1)
- template(4)
- time(1)
- tmux(3)
- tools(3)
- top(1)
- try(1)
- ubuntu(2)
- ulimit(1)
- uml(2)
- unix(6)
- valgrind(5)
- vim(13)
- virtual(1)
- vnc(2)
- vpn(1)
- vs(1)
- watch(1)
- wc(2)
- wcf(1)
- wget(1)
- win7(1)
- windbg(1)
- windows(1)
- wireshark(3)
- wordpress(1)
- x11(2)
- xampp(3)
- xargs(2)
- xml(3)
- yii(2)
- yum(1)
- zsh(1)
- 安防(2)
- 闭包(2)
- 编程原则(2)
- 编译原理(3)
- 程序内存结构(3)
- 更多