09 2009 档案

摘要:调用分四步: 1. bind(会在数据包中传送uuid,和函数的ID号) 2. ack 3. request 4. response 阅读全文
posted @ 2009-09-24 17:19 Fan Zhang 阅读(485) 评论(1) 推荐(0)
摘要:http://www.codeproject.com/KB/IP/rpcintro1.aspx http://www.codeproject.com/KB/IP/rpcintro2.aspx 在Windows XP SP2版本时,需要将RpcServerRegisterIf替换成RpcServerRegisterIf2。 使用如下: Have a global function called Se... 阅读全文
posted @ 2009-09-24 15:09 Fan Zhang 阅读(433) 评论(0) 推荐(0)
摘要:1. 从nessus server点击获取邀请码 2. 下载plugin 3. 在server端建立账户和密码 4. 在client端连接server,扫描 阅读全文
posted @ 2009-09-21 16:40 Fan Zhang 阅读(599) 评论(0) 推荐(0)
摘要:netstat 显示established的连接 netstat –a 显示所有连接(按机器名和已知端口名显示) netstat –an 显示所有连接(按IP和端口号显示) netstat –r 显示路由信息 阅读全文
posted @ 2009-09-21 13:29 Fan Zhang 阅读(215) 评论(0) 推荐(0)
摘要:  class ATL_NO_VTABLE CPolyCtl : public CComObjectRootEx<CComSingleThreadModel>, public CStockPropImpl<CPolyCtl, IPolyCtl, &IID_IPolyCtl, &LIBID_POLYGONLib>, public CComContr... 阅读全文
posted @ 2009-09-20 23:31 Fan Zhang 阅读(256) 评论(0) 推荐(0)
摘要:In general, the simplest way to view the COM threading architecture is to think of all the COM objects in the process as divided into groups called apartments. A COM object lives in exactly one apartm... 阅读全文
posted @ 2009-09-20 21:35 Fan Zhang 阅读(335) 评论(0) 推荐(0)
摘要://CLSID_PolyCtl CComPtr<IUnknown> spUnk; spUnk.CoCreateInstance(__uuidof(Beeper)); CComDispatchDriver spDisp = spUnk; CComVariant vResult; HRESULT hr = spDisp.Invoke0( L"Beep"... 阅读全文
posted @ 2009-09-17 23:38 Fan Zhang 阅读(255) 评论(0) 推荐(0)
摘要:#include <iostream>using namespace std;class Base {public: Base() { cout << "In Base" << endl; cout << "Virtual Pointer = " << (int*)this << end... 阅读全文
posted @ 2009-09-11 17:51 Fan Zhang 阅读(252) 评论(0) 推荐(0)
摘要:#include <iostream>using namespace std;class Base {public: Base() { cout << "In Base" << endl; cout << "Virtual Pointer = " << (int*)this << endl; cout << "Ad... 阅读全文
posted @ 2009-09-11 16:18 Fan Zhang 阅读(396) 评论(0) 推荐(0)
摘要:REFIID iid = __uuidof(IUnknown); 翻译成汇编就是 00404AC2   mov         dword ptr [ebp-14h],offset __GUID_00000000_0000_0000_c000_000000000046 (0043b178) &... 阅读全文
posted @ 2009-09-10 23:15 Fan Zhang 阅读(276) 评论(0) 推荐(0)
摘要:例子aptserve、freclien在link阶段会报错,修改makefile文件 APPLIBS = apputil.lib shell32.lib LIBCMT.LIB 阅读全文
posted @ 2009-09-08 22:49 Fan Zhang 阅读(199) 评论(0) 推荐(0)
摘要:1. 加密和解密 可以用对称加密,即用Session Key。 先用一个字符串做密码,然后对他进行hash运算,通过hash结果得到Session Key。然后用Session Key进行加密、解密。Session Key可以导入、到处。 2. 签名 需要用到公钥和私钥。用私钥签名,用公钥验证。 会用到Message协助签名,其中Message操作有两组函数,Low-Level Mess... 阅读全文
posted @ 2009-09-04 18:21 Fan Zhang 阅读(292) 评论(0) 推荐(0)
摘要:You can do this.. to create private key and the certificate makecert.exe -sv a.pvk –n “CN=XXXX”a.cer    //其中XXXX是用于CertFindCertificateInStore函数 And you can make *.spc file like this. ce... 阅读全文
posted @ 2009-09-04 15:19 Fan Zhang 阅读(224) 评论(0) 推荐(0)
摘要:In cryptography, PKCS refers to a group of Public Key Cryptography Standards devised and published by RSA Security.   PKCS #7 Cryptographic Message Syntax Standard PKCS #8  Private-Key In... 阅读全文
posted @ 2009-09-04 13:49 Fan Zhang 阅读(195) 评论(0) 推荐(0)
摘要:Base64编码要求把3个8位字节(3*8=24)转化为4个6位的字节(4*6=24),之后在6位的前面补两个0,形成8位一个字节的形式。 之所以用6位表示,是为了能用可显示的ASCII码。   利用Cryptography API也可以完成Base64的编码和解码   void BinaryToBase64( BYTE *pbSignedMessageBlob, ... 阅读全文
posted @ 2009-09-04 10:22 Fan Zhang 阅读(613) 评论(0) 推荐(0)
摘要:运行certmgr.msc 阅读全文
posted @ 2009-09-03 12:33 Fan Zhang 阅读(1131) 评论(0) 推荐(0)
摘要:创建数字认证的过程如下: 1.Alice sends a signed certificate request containing her name, her public key, and perhaps some additional information to a CA. 2.The CA creates a message, m, from Alice's request. The C... 阅读全文
posted @ 2009-09-02 22:59 Fan Zhang 阅读(256) 评论(0) 推荐(0)
摘要:对称算法,在加密和解密的时候使用相同的密钥,优点是速度快,缺点是管理起来很麻烦,而且容易泄露。非对称密钥也被称为Session Key。 非对称算法,在加密和解密的时候使用两套密钥,优点是可以公布公钥给所有人,缺点是速度慢,计算速度是对称算法的1000倍。非对称密钥,被用于加密Session Key和数字签名。数字签名时,先对Message进行hash运算,然后用私钥加密。别人用公钥还原后,如果... 阅读全文
posted @ 2009-09-02 22:14 Fan Zhang 阅读(231) 评论(0) 推荐(0)
摘要:CA即Certification Authority,是一些值得信赖的组织。他们负责颁发个人或者团体的公钥。这些个人或团体被称为subject of that certificate。 发布的certificate中包括:公钥/私钥对中的公钥。 Hash的校验可以保证数据的完整性,数据是否被篡改依赖于数字认证。   A digital certificate is a crede... 阅读全文
posted @ 2009-09-02 18:00 Fan Zhang 阅读(392) 评论(0) 推荐(0)