滴滴司机毒打投资人;华为回应自研系统;微信回应被删聊天记录可提取 | 一周业界事...

点击上方“CSDN”,选择“置顶公众号”

关键时刻,第一时间送达!

640?wx_fmt=jpeg&wxfrom=5&wx_lazy=1

整理 | 张伟

审校 | 沭七

大家小长假的第一天过的怎么样啊,是出门堵堵堵呢,或是去景区看人从众

展开阅读全文

tomcat怎么没有回应

06-10

[code=java]package cn.xxy.net.p7.ie_server;rnrnimport java.io.IOException;rnimport java.io.InputStream;rnimport java.io.PrintWriter;rnimport java.net.Socket;rnimport java.net.UnknownHostException;rnrnpublic class MyBrowser rnrn /**rn * @param argsrn * @throws IOExceptionrn * @throws UnknownHostExceptionrn */rn public static void main(String[] args) throws UnknownHostException,IOException rnrn Socket s = new Socket("127.0.0.1", 80);rn // 模拟浏览器,给tomcat服务端发送符合http协议的请求消息rn PrintWriter out = new PrintWriter(s.getOutputStream());rn out.println("GET /myweb/1.html HTTP/1.1");rn out.println("Host: 127.0.0.1:80");rn out.println("Connection: close");rn out.println("Accept: */*");rn out.println("Accept-Language: zh-CN");rn out.println("User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; SE 2.X MetaSr 1.0)");rn out.println("Accept-Encoding: gzip, deflate");rn out.println();rn out.println() ;rn InputStream in = s.getInputStream();rn byte b[] = new byte[1024];rn int leng = 0;rn while ((leng = in.read(b)) != -1) rn String str = new String(b, 0, leng);rn System.out.println(str);rn rn s.close();rn rnrn[/code]rn程序运行之后 tomcat应该会给我发一个回应信息,调试的时候发现tomcat没有数据返回,网页访问的时候是正常的。是不是我的请求没有写对,请高手帮忙讲解下,谢谢了!! 论坛

ping 命令的回应时间

11-26

处在同一网段(10.62.0.0/16)、同一交换机、同一操作系统(windows profession)的两个主机rn执行ping命令时为什么回应时间不一样。rn*****************************************************************************rn实验一:(执行ping命令不加参数回应时间都<1ms)rnpc1>ping 10.68.5.5rnrnPinging 10.68.5.5 with 32 bytes of data:rnrnReply from 10.68.5.5: bytes=32 time=1ms TTL=251rnReply from 10.68.5.5: bytes=32 time=1ms TTL=251rnReply from 10.68.5.5: bytes=32 time=1ms TTL=251rnReply from 10.68.5.5: bytes=32 time=2ms TTL=251rnrnPing statistics for 10.68.5.5:rn Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),rnApproximate round trip times in milli-seconds:rn Minimum = 1ms, Maximum = 2ms, Average = 1msrnrnpc2>ping 10.68.5.5rnrnPinging 10.68.5.5 with 32 bytes of data:rnrnReply from 10.68.5.5: bytes=32 time=1ms TTL=251rnReply from 10.68.5.5: bytes=32 time=1ms TTL=251rnReply from 10.68.5.5: bytes=32 time=1ms TTL=251rnReply from 10.68.5.5: bytes=32 time=2ms TTL=251rnrnPing statistics for 10.68.5.5:rn Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),rnApproximate round trip times in milli-seconds:rn Minimum = 1ms, Maximum = 2ms, Average = 1msrn*********************************************************************************rn实验二:ping -l 65500(ping最大数据包时,pc1回应时间明显加长)rnpc1>ping 10.68.5.5 -l 65500rnrnPinging 10.68.5.5 with 65500 bytes of data:rnrnReply from 10.68.5.5: bytes=65500 time=110ms TTL=251rnReply from 10.68.5.5: bytes=65500 time=110ms TTL=251rnReply from 10.68.5.5: bytes=65500 time=110ms TTL=251rnReply from 10.68.5.5: bytes=65500 time=112ms TTL=251rnrnPing statistics for 10.68.5.5:rn Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),rnApproximate round trip times in milli-seconds:rn Minimum = 110ms, Maximum = 112ms, Average = 110msrnpc2>ping 10.68.5.5rnrnPinging 10.68.5.5 with 65500 bytes of data:rnrnReply from 10.68.5.5: bytes=65500 time=1ms TTL=251rnReply from 10.68.5.5: bytes=65500 time=1ms TTL=251rnReply from 10.68.5.5: bytes=65500 time=1ms TTL=251rnReply from 10.68.5.5: bytes=65500 time=2ms TTL=251rnrnPing statistics for 10.68.5.5:rn Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),rnApproximate round trip times in milli-seconds:rn Minimum = 1ms, Maximum = 2ms, Average = 1ms 论坛

请求回应的icmp数据包得不到回应,都是什么原因造成的?

06-08

我用winpcap构造的原是数据包,可以检测到数据包经过发出去了,但就是没有回应!rnmac 地址和ip地址经过反复验证并没错.郁闷死,兄弟姐妹们,帮帮小弟吧rn谢谢先,rn是不是构造数据包时有问题啊?rnrn我把构造数据包的过程贴在下面:rnrnvoid InitPack(unsigned long desIP)rnrn rn unsigned char Icmpbuffer[sizeof(icmphdr)];rn unsigned char Iphbuffer[sizeof(iphdr)];rn int len=sizeof(icmphdr);rn //unsigned char ethbuffer[sizeof(ehdr)];rn icmphdr* pIcmph=(icmphdr*)Icmpbuffer;rn iphdr* pIph=(iphdr*)Iphbuffer;rn ehdr* pEth=(ehdr*)Sendbuffer;rn rn /*****构造icmp数据包******/rn pIcmph->Code=0;rn pIcmph->Type=8; rn pIcmph->ID=(USHORT)GetCurrentProcessId();rn pIcmph->Checksum=0;rn pIcmph->Seq=0;rn for(int i=0;i<32;i++)pIcmph->Data[i]='A';rn /***** 计算校验和****/rn pIcmph->Checksum=checksum(( USHORT* )pIcmph,sizeof(icmphdr));rnrn /******构造ip头********/rn pIph->ver_ihl=(4<<4 | sizeof(iphdr)/sizeof(unsigned long));rn pIph->tlen=htons(sizeof(iphdr)+sizeof(icmphdr));rn pIph->ttl=128;rn pIph->proto=1;rn pIph->tos=0;rn pIph->identification=1;rn pIph->flags_fo=0;rn pIph->crc=0; rn char FAR name[10];rn if(gethostname(name,10)!=0)AfxMessageBox("get name error");rn PHOSTENT hostinfo=gethostbyname(name);rn m_LocalIp = inet_ntoa (*(struct in_addr *)*hostinfo->h_addr_list);rn pIph->saddr=inet_addr(m_LocalIp);rn pIph->daddr=desIP; //目的ip地址rnrn /***** 计算校验和****/rn pIph->crc=checksum(( USHORT* )pIph,sizeof(iphdr));rn rn pEth->eh_dst[0]=0x00; //目的mac地址rn pEth->eh_dst[1]=0x0b;rn pEth->eh_dst[2]=0x5f;rn pEth->eh_dst[3]=0xe2;rn pEth->eh_dst[4]=0x3c;rn pEth->eh_dst[5]=0xc6;rn getmac(pEth->eh_src);rn pEth->eh_type=0x0800;rn rn memcpy(Sendbuffer,pEth,14);rn memcpy(Sendbuffer+14,pIph,20);rn memcpy(Sendbuffer+34,pIcmph,40); rnrn//计算校验和函数rnUSHORT checksum(USHORT *buffer, int size)rnrn unsigned long cksum = 0;rn while (size > 1) rn cksum += *buffer++;rn size -= sizeof(USHORT);rn rn if (size) rn cksum += *(UCHAR*)buffer;rn rn cksum = (cksum >> 16) + (cksum & 0xffff);rn cksum += (cksum >> 16);rn rn return (USHORT)(~cksum);rn 论坛

用libnet构造TCP的ack包回应syn包,很神奇的事

03-24

本机发起TCP连接,发出一个SYN包,对方发回来一个SYN|ACK包,我把这个包DROP掉,尝试自己来构造这个三次握手的最后一个ACK包发出去。rn rnlinux下的程序,不过libnet在linux和windows都一样的吧rn用libipq已经把对方发过来的SYN包传到用户空间,自己定义了个结构体 rnstruct packet rn rn iphdr *iph; rn tcphdr *tcph; rn unsigned char *data; rn; rn然后搞个struct packet *pkt指过去 rn已经正确地把这里的IP头和TCP头指针指到对应的地方,然后ipq_set_verdict把它drop了,再开始构造TCP包(pkt就是对方发过来的被drop的SYN|ACK包 rn,构造这个回应包,源和目的反过来,这没问题,pkt的ACK就是回应包的SEQ,pkt的SEQ+1就是回应包的ACK,SYN标志要占1个位,也没问题,其他参数也都没问题) rnprintf("\nbuilding tcp src=%u dst=%u\n",ntohs(pkt->tcph->dest),ntohs(pkt->tcph->source)); rnif((tcp=libnet_build_tcp(ntohs(pkt->tcph->dest),ntohs(pkt->tcph->source),pkt->tcph->ack_seq,htonl(ntohl(pkt->tcph->seq)+1),TH_ACK,8760,0,0,LIBNET_TCP_H,NULL,0,plibnet_app,0))==-1) rn rn printf("\ntcp building error\n"); rn…… rn下面继续构造IP包…… rn神奇的事发生了: rn程序中那句printf的输出是 rnbuilding tcp src=2284 dst=1647 rn而tcpdump对应包的输出是 rnIP 192.168.18.98.1024 > 192.168.18.2.1647: . ack 3386779883 win 8760 rn上一句打印源端口还是正确的,传进去构造包,结果发出去源端口就成了1024。而目的端口和源IP目的IP都没问题…… rn怎么回事? 论坛

求教 本地虚拟封包回应

04-28

[b]概述:[/b]某软件需要激活码连接远程服务器验证才能启动rnrn[b]启动过程:[/b]打开软件弹出输入激活码对话框,输入正确的激活码后登陆,会连接远程服务器,并发送激活码封包,远程服务器验证通过后回传封包,激活码对话框消失,软件启动。但会每隔10分后向远程服务器发送激活码验证,回传失效时间封包。rnrn[b]问题描述:[/b]使用正确的激活码激活软件,利用抓包工具抓取了正确激活码发送以及远程服务器回应的封包数据,在网上下载了本地服务器模拟软件,将远程服务器IP绑定到自己电脑的网卡,通过本地服务器模拟软件监测相应端口模拟远程服务器,经测试可以连接软件发出的封包验证请求,但通过此本地服务器模拟软件将抓包工具抓取的回应封包数据发送到软件,用抓包工具监测与远程服务器发送过来的封包不一致,导致软件无法启动。rnrn[b]需要求助的问题:[/b]怎样将抓取下来的正确回应封包信息通过本地虚拟服务器软件,发送到软件,有什么软件可实现此功能或者有什么其他办法实现。希望能够得到高手的指点,不胜感激。rnrn[b]抓取封包数据如下:[/b]rnrn软件发送激活码封包等待远程服务器验证启动:rnrnHEX数据:rn00 2D 03 00 01 00 00 00 23 00 00 00 54 32 34 39 33 30 34 35 4A 58 47 39 4D 5A 46 31 51 36 38 51 41 4F 4E 41 39 4E 4A 4B 39 52 37 32 38 55 00rnrn服务器回应验证通过封包:rnrn1、HEX数据:rn11 00 0F 00 00 00 A0 DB 0E C7 B3 06 DE DC 03 AD DE 07 C1 CB 05rnrn2、HEX数据:rn00 07rnrn3、HEX数据:rn04 00 01 76 49 01 00rn软件启动rnrn隔10分钟后再次抓取的软件发送和服务器回应的封包:rnrn软件发送激活码封包:rnHEX数据:rn00 2D 03 00 01 00 00 00 23 00 00 00 54 32 34 39 33 30 34 35 4A 58 47 39 4D 5A 46 31 51 36 38 51 41 4F 4E 41 39 4E 4A 4B 39 52 37 32 38 55 00rnrn服务器回应验证通过封包:rn1、HEX数据:rn00 15rnrn2、HEX数据:rn11 00 0F 00 00 00 A0 DB 0E C7 B3 06 DE DC 03 AD DE 07 C1 CB 05rnrn3、HEX数据:rn00 07rnrn4、HEX数据:rn04 00 01 45 48 01 00rnrn经多次抓包,服务器回应软件的封包仅第四条数据不一致,以及软件需要验证启动时第三条不一致。此软件使用VC编写,未加壳,但俺对变成一窍不通,不能通过修改代码解决。 论坛

没有更多推荐了,返回首页