PureCode
文章平均质量分 66
vizee
这个作者很懒,什么都没留下…
展开
-
Copy来自网上的一段代码
因为当时没注意作者,所以这里也不好写出处了,膜拜大牛吧#include stdio.h>#include stdlib.h>int pow2(int n){ return n * n;}int main(){ int i,j; freopen("what.html","w+",stdout); for(i =转载 2012-04-24 09:08:39 · 476 阅读 · 0 评论 -
HDOJ 2066
无脑dijkstra, 转问题为单源再处理(稀疏图用邻接表才是最优处理方式)#include #include int dist[1001];char k[1001];int g[1001][1001];int main(){ int t, s, d; int a, b, time; int i; int c; int e; int next; int m原创 2013-12-06 19:49:00 · 965 阅读 · 0 评论 -
C DoEvents
void DoEvents(){ MSG tMsg; if(PeekMessage(&tMsg,NULL,0,0,PM_NOREMOVE) { GetMessage(&tMsg,NULL,0,0); TranslateMessage(&tMsg); DispatchMessage(&tMsg); } return;}原创 2012-07-12 14:27:41 · 694 阅读 · 0 评论 -
获取进程路径
//获取进程路径,理论上至少支持XP;进程句柄需要PROCESS_QUERY_INFORMATION和PROCESS_VM_READ权限...实现方法和GetModuleFileNameEx类似....//DESP: get process image pathBOOL process_get_path(HANDLE hProcess, LPTSTR szImagePath, DWORD d原创 2013-02-12 18:30:53 · 874 阅读 · 0 评论 -
计算文件MD5(含MD5算法)
#include #include #define A (0x67452301)#define B (0xefcdab89)#define C (0x98badcfe)#define D (0x10325476)#define X(_a, _b, _r, _m, _s, _t) \ ((_a) = (_b) + rol((_a) + (_r) + (_m) + (_t), (_s原创 2013-03-04 23:02:38 · 2653 阅读 · 1 评论 -
MD5 for Assembler
.386.model flat,stdcalloption casemap:nonemmov macro _d,_s,_tr mov _tr,_s mov _d,_trendm.data_T0 dd 0d76aa478h,0e8c7b756h,242070dbh,0c1bdceeeh,0f57c0fafh,4787c62ah,0a8304613h原创 2012-10-02 11:56:23 · 938 阅读 · 0 评论 -
还原GetModuleFileNameExW
//thanks for powerful windbg~BOOL FindModule(HANDLE hProcess, HMODULE hModule, PLDR_DATA_TABLE_ENTRY pLdrData){ DWORD i; PLIST_ENTRY pListEntry; PPEB_LDR_DATA pPebLdr; PROCESS_BASIC_INFORMATION原创 2013-02-12 13:35:08 · 2747 阅读 · 2 评论 -
FormatMessage
Private Const FORMAT_MESSAGE_ALLOCATE_BUFFER As Long = 256Private Const FORMAT_MESSAGE_IGNORE_INSERTS As Long = 512Private Const FORMAT_MESSAGE_FROM_STRING As Long = 1024Private Const FORMAT_MESSAG原创 2012-12-09 19:34:46 · 822 阅读 · 0 评论 -
Brainfuck VM
package org.vizee.brainfuckvm;public class BrainfuckVM { private byte[] ds; private byte[] cs; private int[] es; private int dp; private void ds_resize(int size, boolean preserve) { byte原创 2012-12-28 12:37:52 · 696 阅读 · 0 评论 -
VB.NET多线程Socket实现简单HTTP服务
Imports System.NetImports System.Net.SocketsImports System.ThreadingModule monkeyServer Private Const HttpVersion As String = "HTTP/1.1" Private Const WebTitle As String = "Monkey Server" Priv原创 2012-12-08 19:45:50 · 5023 阅读 · 1 评论 -
C# DriverControl
class DriverControl{ private IntPtr hSCManager; private IntPtr hService; private IntPtr hDevice; private uint dwErrorCode; public const int MAX_SERVICE_NAME = 256; public const int MAX_DISPLAY原创 2012-12-03 18:19:36 · 908 阅读 · 0 评论 -
判斷進程是否具有管理員權限(代碼來自微軟SDK)
BOOL IsUserAdmin(){ BOOL bIsAdmin = FALSE; SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY; PSID Administrators转载 2012-10-29 21:38:10 · 950 阅读 · 0 评论 -
VB Unescape
Public Function unescape(szEscape As String) As String Dim i As Long, l As Long Dim c As String, s As String l = Len(szEscape) unescape = "" For i = 1 To l c = Mid$(sz原创 2012-08-08 19:17:13 · 832 阅读 · 1 评论 -
VB的SizeOfCode 有一点点的Bug
Option ExplicitDim initFlag As LongPublic opflag(0 To 255) As Byte, opexflag(0 To 255) As BytePrivate Function flagInitialize() As Long opflag(0) = 1: opflag(1) = 1 opflag(2) = 1: opflag(原创 2012-06-26 01:43:15 · 956 阅读 · 0 评论 -
學校DrCom登錄腳本
'configureConst DELETE_CONFIG = 0 'put 1 to delete script configure in registryConst KEEP_QUIET = 0 'put 1 to no longer pop up MessageBoxConst DRCOM_URL = "http://172.16.3.11/"Const DRCOM_LOGOFF_U原创 2012-06-10 20:33:21 · 3134 阅读 · 1 评论 -
MD5 review
//鏈性變量 A B C D#define A (0x67452301UL) //在內存中是 01 23 45 67#define B (0xefcdab89UL) //89 ab cd ef#define C (0x98badcfeUL) //fe dc ba 98#define D (0x10325476UL) //76 54 32 10#define XX(_a,_b,_r,_M,原创 2012-09-21 08:14:16 · 740 阅读 · 0 评论