
纠错院
射下北极星
每天多一分钟学习,生命就多一份精彩。
展开
-
IP/TCP/UDP checksum
<br />unsigned short checksum(unsigned short *buf, int nword){ unsigned long sum = 0; for(int i=0; i<nword; i++) { sum += *buf++; } sum = (sum >> 16) + (sum & 0xffff); sum += (sum >> 16); return (unsigned sho原创 2010-11-27 13:44:00 · 1633 阅读 · 0 评论 -
vmware 报错 :"internal error" 内部错误
网上的方法: 1、services.msc查看服务,检查所有服务均已开启,该方法无效; 2、管理员权限运行vmware,同样报错,无效;3、删除报错虚拟机文件夹下的最近的*.vmem文件(记录最近使用的状态和每个快照的状态),重启虚拟机,会提示说找不到快照,要选discard 当前状态。点击确定,虚拟机系统正常重启。 —该方法成功。...原创 2018-04-03 09:57:45 · 7574 阅读 · 0 评论 -
FindFirstFile 错误: ERROR_FILE_NOT_FOUND
错误:hFindFile = FindFirstFile( tCurrentDirecory , &findData );hFindFile = INVALID_HANDLE_VALUE GetLastError()得到的错误提示是2 ERROR_FILE_NOT_FOUND 无法找到要打开的文件。warning C4133: “函数”: 从“char [66]”到“LPCWSTR”的类原创 2017-12-25 19:29:18 · 2975 阅读 · 0 评论 -
Error LNK2001 无法解析的外部符号
查找资料: VC++时经常会遇到链接错误LNK2001,该错误非常讨厌,因为对于编程者来说,最好改的错误莫过于编译错误,而一般说来发生连接错误时,编译都已通过。产生连接错误的原因非常多,尤其LNK2001错误,常常使人不明其所以然。如果不深入地学习和理解VC++,要想改正连接错误LNK2001非常困难。 初学者在学习VC++的过程中,遇到的LNK2001错误的错误消息主要为: unreso原创 2017-12-25 15:12:38 · 1816 阅读 · 0 评论 -
The capture file appears to be damaged or corrupt.
背景通过libpcap库对数据包进行处理,提取离线pcap文件中的部分内容保存为新的pcap文件,使用函数:pcap_open_offline( );pcap_loop( )等。错误The capture file appears to be damaged or corrupt.(pcap: File has 2944323888-byte packet, bigger than maximum原创 2017-10-25 08:26:51 · 12731 阅读 · 0 评论 -
编译调用openssl库出错:d1_enc.c:(text+0x3b):undefined refrence to 'EVP_MD_CTX_md'
编译命令:gcc -g -o xxx xxx.c -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -lssl错误: 查询原因:修改命令:gcc -g -o xxx xxx.c -I/usr/local/ssl/include/ -L/usr/local/ssl/lib/ -lssl -lcrypto -ldl结果: OK原创 2017-09-04 20:01:05 · 3149 阅读 · 0 评论 -
error LNK2019: 无法解析的外部符号 _SQLConnect@28,该符号在函数
error:error LNK2019: 无法解析的外部符号 _SQLConnect@28,该符号在函数 "xxx 中被引用error LNK2019: 无法解析的外部符号 _SQLSetEnvAttr@16,该符号在函数 "xxx 中被引用error LNK2019: 无法解析的外部符号 _SQLAllocHandle@12,该符号在函数 "xxx中被引用解决方法:#include <afxd原创 2017-04-17 20:03:13 · 1821 阅读 · 1 评论 -
vs2013 error:Building an MFC project for a non-Unicode character set is deprecated
1、VS2013多字节工程问题使用VS2013编译旧版VC++程序时,提示Building an MFC project for a non-Unicode character set is deprecated,微软提供了解决方案。2、错误信息1>------ 已启动生成: 项目: Decrypt, 配置: Debug Win32 ------1>C:\Program Files (x86)\原创 2017-03-25 08:54:47 · 1390 阅读 · 0 评论 -
windows下编译wireshark错误
win7 wireshark 1.8.3error:tools/textify.sh: line 50: u2d: command not foundNMAKE : fatal error U1077 : "c:\cygwin\bin\bash.EXE" : 返回代码 “0x7f”解决:需安装:dos2unix Cygwin packageBy:https://ask.wireshark.or原创 2017-02-14 20:32:17 · 867 阅读 · 0 评论 -
selenium与firefox不兼容
error: os.path.basename(self.path), self.start_error_message) WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH. 环境: firefox50.0 selenium 3.0.2 python2.7解决: 安装驱动: geckodr原创 2016-12-21 14:41:04 · 832 阅读 · 0 评论 -
ftp上传文件失败,大小始终为0
主机:win7 虚拟机:ubuntu14.04 ubuntu中安装vsftpd,配置writing_enable=yes以及其它配置。上传文件大小始终为0。原因:磁盘空间被占满,没有空间写入: df -lh 查看磁盘空间。 解决:删除部分不用文件或日志文件,释放空间。原创 2016-08-25 15:09:25 · 7510 阅读 · 0 评论 -
Ubuntu14.04 运行程序错误,调试记录
Ubuntu14.04上运行程序出现如下错误: 运行 ./program no such file 提示没有那个文件或目录 分析:程序为32位程序,uname –m查看系统为x86_64,64位系统,不兼容。安装ia32-libs解决兼容性问题:sudo apt-get install ia32-libsPackage ia32-libs is not available, but is原创 2016-08-23 11:40:48 · 948 阅读 · 0 评论 -
libpcap error.
error1:include<pcap.h> no such filesudo apt-get install libpcap-deverror2:sniffer.c:(.text+0x43): undefined reference to `pcap_findalldevs'sniffer.c:(.text+0x142): undefined reference to `pcap_ope原创 2016-08-23 09:46:38 · 814 阅读 · 0 评论 -
Windows平台下fwrite函数0x0A变成0x0D 0x0A
在Windows环境下,用fwrite向文件中写数据时,当写入0x0A时,其前面总会被加上一个0x0D。后来发现出现这个问题的原因是fwrite 在以文本方式写文件时,碰到0x0A,会自动在前面加上0x0D,以够成回车换行符,因为Windows平台的换行符默认是:0x0D 0x0A。解决办法是以二进制方式打开文件,然后进行写文件。分析问题代码:fopen( "openfile", "a+" );修改原创 2016-07-20 09:45:46 · 1103 阅读 · 0 评论 -
pyinstaller生成exe后无法执行
使用命令:pyinstaller.py -F c:\mypy\mypy.py 运行结果:cmd中运行,缺少module; 原因分析:-F参数打包成一个文件,但其中单独调用的模块没有加 载进来,需要手动设置; 解决方法:-p参数,指向所需的module 新的命令:pyinstaller.py -F -p d:\mymodule\lib; c:\mypy\m原创 2016-06-19 22:46:54 · 10088 阅读 · 1 评论 -
python:ImportError: No module named dpkt
sudo apt-get install python-dpkt原创 2016-06-27 20:53:12 · 2624 阅读 · 0 评论 -
Linux编译问题1
<br />错误:make: *** 没有规则可以创建“pattern.o”需要的目标“/usr/include/iso/stdlib_iso.h”。 停止。原因:缺少该头文件方法:打开Makefile文件,找到该位置,修改其为stdlib_iso.h安装的正确位置。原创 2011-03-10 11:15:00 · 592 阅读 · 0 评论 -
Ubuntu 2.6.25内核编译小结
说明:借鉴了很多资料,对内核编译的过程中也有很多别人没有的问题,这个和环境或时间有关系了,在此做备忘……环境:a、系统是:ubuntu-7.04-desktop-i386 ,内核是: 2.6.20-15-generic b、要编译的内核是:linux-2.6.25.10主要参考文章:http://www.cyberciti.biz/tips/compiling-linux-kernel-26.htmlhttp://forum.ubuntu.org.cn/viewtopic.php?t=134原创 2010-12-10 00:44:00 · 826 阅读 · 0 评论 -
kali 2017 更新源 错误解决
1、更新源#清华deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free加到文件/etc/apt/sources.list中2、更新apt-get update3、错误W: An error occurred during the signature verification....原创 2018-12-10 16:43:51 · 1697 阅读 · 1 评论