利用ICMP协议编写一个自己的Ping应用程序(用C++)
#pragma pack(4) #define WIN32_LEAN_AND_MEAN #include
我花了15分钟给你人工翻译,为的是你不被机器翻译蒙骗,希望你能满意。 The Office family has the very complicated relation with VB and VBA is built in all applications of Microsoft Office components so that objects of Word applications can be operated through VB or VBA and the purpose of recovery of lost passwords can be achieved by using exhaustive testing methods. This paper will discuss how to use VB Programming to clear up the passwords of Word documents through exhaustive testing methods, and add interruption in the process of broken solution so that consumers can interrupt it at any time. Word has offered a wide range of methords to limit access to the user's document so as to avoid unauthorized persons viewing and changing it. However, in the contemporary times of informationization, there are so many passwords for users to remember that once the password is lost they cannot open or have access to the document, which, as a consequence, causes very big losses to the user. In order to decode the password, the only choice is to use the exhaustion methods to decipher documents, and to untie the password with the aid of computer's high speed movement in the case of Word encryption algorithm. In the actual design process, I have designed the subject so that it is easy for consumers to find the lost password. Keywords: exhaustive methodd, decryption, WORD documents, passwords 编写自己的一个ping程序,可以说是许多人迈出网络编程的第一步吧!!这个ping程序的源代码经过我的修改和调试,基本上可以取代windows中自带的ping程序. 各个模块后都有我的详细注释和修改日志,希望能够对大家的学习有所帮助!!/* 本程序的主要源代码来自MSDN网站, 笔者只是做了一些改进和注释! 另外需要注意的是在Build之前,必须加入ws2_32.lib库文件,否则会提示"error LNK2001:"的错误!*/ Version 1.1 修改记录: <1> 解决了socket阻塞的问题,从而能够正确地处理超时的请求! <2> 增加了由用户控制发送ICMP包的数目的功能(即命令的第二个参数) <3> 增加了对ping结果的统计功能. #pragma pack(4) #include "winsock2.h"#include "stdlib.h"#include "stdio.h"#define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 #define ICMP_MIN 8 // minimum 8 byte icmp packet (just header) /* The IP header */ typedef struct iphdr { unsigned int h_len:4; // length of the header unsigned int version:4; // Version of IP unsigned char tos; // Type of service unsigned short total_len; // total length of the packet unsigned short ident; // unique identifier unsigned short frag_and_flags; // flags unsigned char ttl; unsigned char proto; // protocol (TCP, UDP etc) unsigned short checksum; // IP checksum unsigned int sourceIP; unsigned int destIP; }IpHeader; // // ICMP header // typedef struct icmphdr { BYTE i_type; BYTE i_code; /* type sub code */ USHORT i_cksum; USHORT i_id; USHORT i_seq; /* This is not the std header, but we reserve space for time */ ULONG timestamp; }IcmpHeader; #define STATUS_FAILED 0xFFFF #define DEF_PACKET_SIZE 32#define DEF_PACKET_NUMBER 4 /* 发送数据报的个数 */#define MAX_PACKET 1024 #define xmalloc(s) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(s)) #define xfree(p) HeapFree (GetProcessHeap(),0,(p)) void fill_icmp_data(char *, int); USHORT checksum(USHORT *, int); int decode_resp(char *,int ,struct sockaddr_in *); void Usage(char *progname){ fprintf(stderr,"Usage:\n"); fprintf(stderr,"%s [number of packets] [data_size]\n",progname); fprintf(stderr,"datasize can be up to 1Kb\n"); ExitProcess(STATUS_FAILED); } int main(int argc, char **argv){ WSADATA wsaData; SOCKET sockRaw; struct sockaddr_in dest,from; struct hostent * hp; int bread,datasize,times; int fromlen = sizeof(from); int timeout = 1000; int statistic = 0; /* 用于统计结果 */ char *dest_ip; char *icmp_data; char *recvbuf; unsigned int addr=0; USHORT seq_no = 0; if (WSAStartup(MAKEWORD(2,1),&wsaData) != 0){ fprintf(stderr,"WSAStartup failed: %d\n",GetLastError()); ExitProcess(STATUS_FAILED); } if (argc <2 )="" {="" usage(argv[0]);="" }="" sockraw="WSASocket(AF_INET,SOCK_RAW,IPPROTO_ICMP,NULL," 0,wsa_flag_overlapped);////注:为了使用发送接收超时设置(即设置so_rcvtimeo,="" so_sndtimeo),//="" 必须将标志位设为wsa_flag_overlapped="" !//="" if="" (sockraw="=" invalid_socket)="" {="" fprintf(stderr,"wsasocket()="" failed:="" %d\n",wsagetlasterror());="" exitprocess(status_failed);="" }="" bread="setsockopt(sockRaw,SOL_SOCKET,SO_RCVTIMEO,(char*)&timeout," sizeof(timeout));="" if(bread="=" socket_error)="" {="" fprintf(stderr,"failed="" to="" set="" recv="" timeout:="" %d\n",wsagetlasterror());="" exitprocess(status_failed);="" }="" timeout="1000;" bread="setsockopt(sockRaw,SOL_SOCKET,SO_SNDTIMEO,(char*)&timeout," sizeof(timeout));="" if(bread="=" socket_error)="" {="" fprintf(stderr,"failed="" to="" set="" send="" timeout:="" %d\n",wsagetlasterror());="" exitprocess(status_failed);="" }="" memset(&dest,0,sizeof(dest));="" hp="gethostbyname(argv[1]);" if="" (!hp){="" addr="inet_addr(argv[1]);" }="" if="" ((!hp)="" &&="" (addr="=" inaddr_none)="" )="" {="" fprintf(stderr,"unable="" to="" resolve="" %s\n",argv[1]);="" exitprocess(status_failed);="" }="" if="" (hp="" !="NULL)" memcpy(&(dest.sin_addr),hp-="">h_addr,hp->h_length); else dest.sin_addr.s_addr = addr; if (hp) dest.sin_family = hp->h_addrtype; else dest.sin_family = AF_INET; dest_ip = inet_ntoa(dest.sin_addr); // // atoi函数原型是: int atoi( const char *string );// The return value is 0 if the input cannot be converted to an integer !// if(argc>2) { times=atoi(argv[2]); if(times == 0) times=DEF_PACKET_NUMBER; } else times=DEF_PACKET_NUMBER; if (argc >3) { datasize = atoi(argv[3]); if (datasize == 0) datasize = DEF_PACKET_SIZE; if (datasize >1024) /* 用户给出的数据包大小太大 */ { fprintf(stderr,"WARNING : data_size is too large !\n"); datasize = DEF_PACKET_SIZE; } } else datasize = DEF_PACKET_SIZE; datasize += sizeof(IcmpHeader); icmp_data = (char*)xmalloc(MAX_PACKET); recvbuf = (char*)xmalloc(MAX_PACKET); if (!icmp_data) { fprintf(stderr,"HeapAlloc 。
很好找,用我的方法找只要10秒。对的话谢谢采纳,不对请追问。 roon Eleven 的Lovely Morning 英文歌词RX--- Oh the horizon moves But I find balance on my knees Where are my clothes? I try to decode words on the post-it That's stuck on my cheek Two socks stare at me Definitely they-re not mine I try to figure out What's written between the lines "You've got my number" "You've got my number" My feet are sore Sticky floor Can't feel my arm no more And my keys are gone like my memory I can't say no to something sweet But its not what I need You keep feeding me When I'm not hungry Oh the radio starts singing last night's story All the clothes I worde Are staring at me My high heels and tightest shirt agree That wasn't me That wasn't me My feet are sore Sticky floor Can't feel my arm no more And my keys are gone like my memory I can't say no to something sweet But its not what I need You keep feeding me When I'm not hungry 基于单片机的产品自动计数器 论文编号:JD923 论文字数:7709,页数:23 摘 要 在当今社会飞速发展的格局下,越来越多的流水线上的产品和各种商业场合的人员需要进行自动计数.基于单片机构成的产品自动计数器有直观和计数精确的优点,目前已在各种行业中普遍使用。 数字式电子计数器有多种计数触发方式,它是由实际使用条件和环境决定的。有采用机械方式的接触式触发的,有采用电子传感器这类非接触式触发的。 本文所设计的计数器是采用红外对射式方式,抗干扰性好,可靠性高.该产品应用广泛,可用于测量流水线上的产品的数量以及可检查产品有无缺损;也可以用于测量宾馆、饭店、商场、超市、博物馆、展览观、车站、码头、银行等场所的人员数量及人员流通数量,同时丝毫不会侵犯到被测人员的个人隐私.本设计的指导思想是利用红外发光管发射红外线,红外接收管接收此红外线,并将其放大、整流形成高电平信号.当有人或物挡住红外光时,接收管没有接收到红外信号,放大器将输出低电平,同时将这个电平信号送入单片机进行控制计数,并经译码驱动电路使数码管显示数值。这样就得到要统计的人或物的数量。 关键词:自动计数、红外检测、单片机、8位数码管. Abstract In today's society under the pattern of rapid development, more and more on the lines of products and various business settings need to automatically count. MCU-based products pose a direct and automatic counters have the advantage of accurate count, is already in the Species commonly used in industry. The digital electronic counter trigger a number of counts, it is from the actual conditions of use and environmental decisions. The use of a mechanical contact the trigger, use electronic sensors to trigger the non-contact, infrared sensors is one of them, it is a non-contact electronic sensors. Using infrared sensors produced by electronic counters. This paper is designed to counter the use of infra-red shading, anti-interference and good, high reliability. The product of extensive and can be used to measure the product lines and the number of defects can check whether products; can also be used to measure the hotels, restaurants, shopping malls, supermarkets, museums, exhibition concept, railway stations, docks, banks and other places of the number of staff The number of staff and circulation, while in no way infringe upon the privacy of individuals tested staff. The circuit's guiding ideology is to use infrared LED fired infrared, infrared receiver of receiving the infrared, and enlarge, a rectifier HIGH signal. When Ren Huo wu blocking the infrared light, not receiving the infrared signal to the receiver, amplifier output will be low, at the same time, the MCU-level signals into the control count, and the drive circuit to decode The numerical digital display. This will be the Ren huo Wu statistics to the number. Key words: automatic counting, infrared detection, SCM, decoding. 目 录摘要…………………………………………………。 。.ⅠAbstract…………………………………………………。 .. Ⅱ第一章 绪论…………………………………………………。 。.1 1.1、前言………………………………………………………。 。..1 1.2、选题背景…………………………………………………………… 1 1.3、设计要求………………………………………………………… 2 1.4、国内外的研究概况……………………………………………………2 1.5、研究的主要内容以及存在的问题………………………………… 2第二章 基于单片机构成的产品自动计数器的设计…………………………。 3 2.1 方案论证与选择……………………………………………………3 2.2 系统总体框图和原理………………………………………………5 2.3 系统各单元部分构成…………………………………………………5 2.3.1 电源供电部分。 ..5 2.3.2 红外线检测部分。 。.6 2.3.3 计数、显示部分。 。9 2.4 系统程序设计。 。..13 2.4.1程序流程图。 ..13 2.4.2 程序设计。 14 2.5 电路总图。 16 2.5.1 电路总图。 。..16第三章 总结。 17参考文献。 。.18致谢。 。..19附录。 。.20 回答引自: http://www.lwtxw.com/html/42-5/5639.htm。 Communication is the process of attempting to suggest information from a sender to a receiver with the use of a medium. Communication requires that all parties have an area of communicative commonality. There are auditory means, such as speaking, singing and sometimes tone of voice, and nonverbal, physical means, such as body language, sign language, paralanguage, touch, eye contact, or the use of writing. Communication is defined as a process by which we assign and convey meaning in an attempt to create shared understanding. This process requires a vast repertoire of skills in intrapersonal and interpersonal processing, listening, observing, speaking, questioning, analyzing, and evaluating. Use of these processes is developmental and transfers to all areas of life: home, school, community, work, and beyond. It is through communication that collaboration and cooperation occur.[1] Communication is the articulation of sending a message through different media,[2] whether it be verbal or nonverbal, so long as a being transmits a thought provoking idea, gesture, action, etc. Communication is a learned skill. Most people are born with the physical ability to talk, but we must learn to speak well and communicate effectively. Speaking, listening, and our ability to understand verbal and nonverbal meanings are skills we develop in various ways. We learn basic communication skills by observing other people and modeling our behaviors based on what we see. We also are taught some communication skills directly through education, and by practicing those skills and having them evaluated.Communication as an academic discipline relates to all the ways we communicate, so it embraces a large body of study and knowledge. The communication discipline includes both verbal and nonverbal messages. A body of scholarship all about communication is presented and explained in textbooks, electronic publications, and academic journals. In the journals, researchers report the results of studies that are the basis for an everexpanding understanding of how we all communicate. Communication happens at many levels (even for one single action), in many different ways, and for most beings, as well as certain machines. Several, if not all, fields of study dedicate a portion of attention to communication, so when speaking about communication it is very important to be sure about what aspects of communication one is speaking about. Definitions of communication range widely, some recognizing that animals can communicate with each other as well as human beings, and some are more narrow, only including human beings within the parameters of human symbolic interaction.Nonetheless, communication is usually described along a few major dimensions: Content (what type of things are communicated), source, emisor, sender or encoder (by whom), form (in which form), channel (through which medium), destination, receiver, target or decoder (to whom), and the purpose or pragmatic aspect. Between parties, communication includes acts that confer knowledge and experiences, give advice and commands, and ask questions. These acts may take many forms, in one of the various manners of communication. The form depends on the abilities of the group communicating. Together, communication content and form make messages that are sent towards a destination. The target can be oneself, another person or being, another entity (such as a corporation or group of beings).Communication can be seen as processes of information transmission governed by three levels of semiotic rules:Syntactic (formal properties of signs and symbols), pragmatic (concerned with the relations between signs/expressions and their users) and semantic (study of relationships between signs and symbols and what they represent). Therefore, communication is social interaction where at least two interacting agents share a common set of signs and a common set of semiotic rules. This commonly held rule in some sense ignores autocommunication, including intrapersonal communication via diaries or self-talk.In a simple model, information or content (e.g. a message in natural language) is sent in some form (as spoken language) from an emisor/ sender/ encoder to a destination/ receiver/ decoder. In a slightly more complex form a sender and a receiver are linked reciprocally. A particular instance of communication is called a speech act. In the presence of "communication noise" on the transmission channel (air, in this case), reception and decoding of content may be faulty, and 。 转载请注明出处51数据库 » decodethewords 计算机毕业论文英文摘要在线等~~~~~
c语言ping程序中文注释
求roon Eleven的《Lovely Morning 》歌词!回答前请将歌词与歌对以遍
单片机毕业论文
急要一篇关于communication的八分钟英文演讲稿
4539