摘要:openssl aes 加密buffer数据
阅读全文
摘要:#include<stdio.h> #include<string.h> int main(void) { int n; char dest[20] = "Hello"; char src[10] = "World"; strncat(dest, src, 5);//n=5为src前n个字符 pri
阅读全文
摘要:#include<stdio.h> #include<string.h> int main(){ char name[]={"Chinanet"},destin[20]={}; strncpy(destin,name,3); printf("%s\n",destin); } Chi strncpy基
阅读全文
摘要:typedef unsigned int UINT32; typedef unsigned int DWORD; typedef unsigned short WORD ; typedef unsigned char BYTE; typedef unsigned char UCHAR; typede
阅读全文
摘要:fcntl flock #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> int FileUnLock(int fd_lock) { struct flo
阅读全文
摘要:#define PROCESS_MM_HTB_SIZE (1<<5) #define PROCESS_MM_HTB_SIZE (10>>1)
阅读全文
摘要:#ifndef _PLATFORMDEF_H_ #define _PLATFORMDEF_H_ #ifdef _LINUX #include <sys/time.h> #include <unistd.h> /* SHOULD be before any other include files */
阅读全文
摘要:enum dscommand{ DS_MIN, DS_MAX } std::cout<<sizeof(DS_MAX)<<std::endl; 4个字节
阅读全文
摘要:1.小写输出 _str_t Val("AFSDFSasdfsdf"); cout<< Val.toLowerCase().data()<<endl; 2.中文输出 _str_t Val("中国人"); cout<< Val.data()<<endl; 3. _str_t agentId("_Want
阅读全文
摘要:#include <stdio.h> #include <string.h> #include <string> #include <iostream> using namespace std; #define CHAR char int GetDate(const string &fmt, str
阅读全文
摘要:T qobject_cast ( QObject * object ) 本方法返回object向下的转型T,如果转型不成功则返回0,如果传入的object本身就是0则返回0。 在使用时有两个限制: 1# T类型必须继承自QObject。 2# 在声明时必须有Q_OBJECT宏。
阅读全文
摘要:#include <stdio.h> #include <iostream> using namespace std; int main() { int q = 0; for(q =0; q < 3; q++) { if(q==0) { cout<<"11111"<<endl; goto label
阅读全文
摘要:1、常规的解决方法:用指针来取代引用,在主函数中传进来地址; 2、将代码扩展名保存成.cpp文件 为什么? 我们可以认为,c不认引用传递,但是c++支持引用传递啊! 【转】:https://blog.csdn.net/donoot/article/details/80155918 https://b
阅读全文
摘要:‘close’ was not declared in this scope ‘read’ was not declared in this scope ‘sysconf’ was not declared in this scope 没有包含头文件 unistd.h 造成的。 加上' #inclu
阅读全文
摘要:建锋:(C)libnet-发送arp/tcp/icmp数据包建锋:可用开源libnet,简单点。
阅读全文
摘要:sudo apt-get install wireshark 必须提前安装qt开发环境
阅读全文
摘要:#include <pcap/pcap.h> #include <stdio.h> int main() { char errbuf[PCAP_ERRBUF_SIZE], *device; device = pcap_lookupdev(errbuf); if(device) { printf("S
阅读全文
摘要:libpcap 过滤 pcap_compile ubuntu安装libpcap https://www.cnblogs.com/flyinggod/p/9322267.html
阅读全文
摘要:#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { char arr[10]; strcpy(arr,getenv("HOME")); printf("%s",arr); return 0; }
阅读全文