TCPDUMP

Can libpcap be compiled for iPhone/armv6?

牧云@^-^@ 提交于 2019-12-01 12:55:52
Trying to compile a basic program which uses pcap.h. I've set up the environment on my Mac OSX box which uses the iPhone 3.1.3 SDK for an iPhone 3GS. I've also installed libpcap to ~/libpcap so I can tell gcc where to look for the headers using the -I flag. However, it fails with an ld warning saying the file is not of the required architecture. I'm compiling with the following line: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -I /Users/abnev/libpcap/include -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk -o pcap pcap.c -lpcap

Can libpcap be compiled for iPhone/armv6?

扶醉桌前 提交于 2019-12-01 11:10:36
问题 Trying to compile a basic program which uses pcap.h. I've set up the environment on my Mac OSX box which uses the iPhone 3.1.3 SDK for an iPhone 3GS. I've also installed libpcap to ~/libpcap so I can tell gcc where to look for the headers using the -I flag. However, it fails with an ld warning saying the file is not of the required architecture. I'm compiling with the following line: /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -I /Users/abnev/libpcap/include -arch armv6

利用tcpdump抓取网络包

五迷三道 提交于 2019-12-01 09:59:42
1、下载并安装tcpdump 下载地址: tcpdump 安装tcpdump,连接adb adb push tcpdump /data/local/tcpdump adb shell chmod 6755 /data/local/tcpdump adb root 2、启动并运行tcpdump 直接显示连接信息 adb shell /data/local/tcpdump -n -s 0 抓取数据到文件 adb shell /data/local/tcpdump -i any -p -s 0 -w /sdcard/netCapture.pcap 结束后 adb pull /sdcard/netCapture.pcap d:\ 3、利用wireshark分析数据 来源: https://www.cnblogs.com/fengwei23/p/11677569.html

network / tcp port numbers reused

混江龙づ霸主 提交于 2019-12-01 08:53:20
s Tcp抓包以及tcp状态解释 https://www.cnblogs.com/yanwei-wang/p/6170431.html Tcp抓包以及tcp状态解释,有需要的朋友可以参考下。 tcp三次握手 发送端发送一个SYN=1,ACK=0标志的数据包给接收端,请求进行连接,这是第一次握手;接收端收到请求并且允许连接的话,就会发送一个SYN=1,ACK=1标志的数据包给发送端,告诉它,可以通讯了,并且让发送端发送一个确认数据包,这是第二次握手;最后,发送端发送一个SYN=0,ACK=1的数据包给接收端,告诉它连接已被确认,这就是第三次握手。之后,一个TCP连接建立,开始通讯。 tcp连接状态 SYN:同步标志。同步序列编号(Synchronize Sequence Numbers)栏有效。该标志仅在三次握手建立TCP连接时有效。它提示TCP连接的服务端检查序列编号,该序列编号为TCP连接初始端(一般是客户端)的初始序列编号。在这里,可以把 TCP序列编号看作是一个范围从0到4,294,967,295的32位计数器。通过TCP连接交换的数据中每一个字节都经过序列编号。在TCP报头中的序列编号栏包括了TCP分段中第一个字节的序列编号。 ACK:确认标志。确认编号(Acknowledgement Number)栏有效。大多数情况下该标志位是置位的

Cross Compile - tcpdump for x86

大城市里の小女人 提交于 2019-12-01 02:35:54
I need tcpdump binary for android-x86 . Here is what I have done: sudo apt-get install gcc-i686-linux-android sudo apt-get install byacc sudo apt-get install flex wget http://www.tcpdump.org/release/tcpdump-4.9.0.tar.gz wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz tar zxvf tcpdump-4.9.0.tar.gz tar zxvf libpcap-1.8.1.tar.gz cd libpcap-1.8.1 export CC=gcc ./configure --host=i686-pc-linux-gnu --with-pcap=linux make cd .. cd tcpdump-4.9.0 export ac_cv_linux_vers=3 export CFLAGS=-static export CPPFLAGS=-static export LDFLAGS=-static ./configure --host=i686-pc-linux-gnu --disable-ipv6

Cross Compile - tcpdump for x86

旧街凉风 提交于 2019-11-30 23:05:26
问题 I need tcpdump binary for android-x86 . Here is what I have done: sudo apt-get install gcc-i686-linux-android sudo apt-get install byacc sudo apt-get install flex wget http://www.tcpdump.org/release/tcpdump-4.9.0.tar.gz wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz tar zxvf tcpdump-4.9.0.tar.gz tar zxvf libpcap-1.8.1.tar.gz cd libpcap-1.8.1 export CC=gcc ./configure --host=i686-pc-linux-gnu --with-pcap=linux make cd .. cd tcpdump-4.9.0 export ac_cv_linux_vers=3 export CFLAGS=

linux之网络

风格不统一 提交于 2019-11-30 22:27:38
你想通过执行ping google.com来判断网络连通性么? 由于 nio 的普及, ck10k 的问题已经成为过去式。现在随便一台服务器,就可以支持数十万级别的连接了。那么我们来算一下,100万的连接需要多少资源。 首先,每一个连接都是文件句柄,所以需要文件描述符数量支持才行,每一个socket内存占用15k-20k之间,这样,仅维护相应socket,就需要 20G 内存;而广播一个1KB的消息需要占用的带宽为 1000M ! 查看当前系统的连接 如何看当前系统有多少连接呢?可以使用 netstat 结合 awk 进行统计。如下脚本,统计了每一种状态的tcp连接数量 # netstat -antp | awk '{a[$6]++}END{ for(x in a)print x,a[x]}' LISTEN 41 CLOSE_WAIT 24 ESTABLISHED 150 Foreign 1 TIME_WAIT 92 netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' ( netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}’ TIME_WAIT 8947 等待足够的时间以确保远程TCP接收到连接中断请求的确认

Day30 监控系统状态(二)

喜你入骨 提交于 2019-11-30 20:55:22
监控io性能 介绍: 之前介绍的许多关于CPU负载的命令,其实io(磁盘)对于我们也很重要。 下面要介绍的命令就是关于监控io性能的命令 选项: iostat -x 1 表示逐秒显示磁盘状况 %util 为磁盘使用占用CPU的时间比。一个进程写入磁盘时,cpu会等待写入,此时所占地用的时间就是%util 当%utl数字过大时,说明你的硬盘可能需要更换了 示例: 命令iotop 磁盘使用 命令free 介绍 用于查看当前系统的总内存大小以及使用情况。Centos7系统的比6的显示要简介,但是大体上内容一致 选项 free free -m或-g:表示指定数据的单位MB或GB free -h:会给数据加上单位符号,使其更加直观 示例 [root@centos001 ~]# free total used free shared buff/cache available //第一行 Mem: 1008152 113972 558772 6888 335408 709100 Swap: 2097148 0 2097148 [root@centos001 ~]# free -m total used free shared buff/cache available Mem: 984 111 545 6 327 692 Swap: 2047 0 2047 [root@centos001 ~]#

“tcpdump -w 1.pcap” works, but “tcpdump -C 100 -w 1.pcap” - permission denied

吃可爱长大的小学妹 提交于 2019-11-30 20:03:48
I need to limit file size when I run "tcpdump -w 1.pcap". I try to do this with the key "-C", but when I add it I get error "permission denied". So: > sudo tcpdump -w 1.pcap tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes ^C821 packets captured 847 packets received by filter 24 packets dropped by kernel But: > sudo tcpdump -C 100 -w 1.pcap tcpdump: 1.pcap: Permission denied I run the command from my home directory and I tried to remove and create the file before running the command with different permissions, finally I have: -rwxrwxrwx 1 root root 0 Aug 5 10