Archives for 编程资料 Category

首先建立key openssl req -new -newkey rsa:4096 -keyout your_key.pem -out your_csr.pem 然后去StartSSL那边申请Object Code Signing,黏贴your_csr.pem内的内容进去。 等证书颁发下来后,解密your_key.pem的内容保存为your_key_dec.pem。 下载证书链ca-bundle.pem 保存颁发给你的证书内容到your_cert.pem 最后通过命令签名即可: openssl smime -sign -in a.mobileconfig -out b.mobileconf

Continue Reading...

今天突然老爸从公司带回1年前我组装的电脑让我修一下....起初以为是硬件问题,开机一看原来是windows7需要重新激活了...当初我都设置好半年自动运行一次kms服务器端来自动激活啊啊靠...怎么回事呢,然后发现到了运行slmgr.vbs的时候,竟然提示...无法找到脚本引擎Vbscript....我靠我从没见过这种问题啊..果断google之,然后搜到的答案都是没用的啊啊啊你妹!只能自己解决了,打开注册表摸索了半天发现是vbscript里服

Continue Reading...

unit ntdll; interface uses Windows; type PLARGE_INTEGER = ^LARGE_INTEGER; //------------------------------------------------------------- type NTSTATUS = Longint; const STATUS_SUCCESS           = NTSTATUS(0); STATUS_NO_MORE_DATA      = NTSTATUS($8000001a); STATUS_NO_MORE_FILES     = NTSTATUS($80000006); STATUS_INVALID_PARAMETER = NTSTATUS($C000000D); funct

Continue Reading...

function GetSysTime:dword; asm  int $2a //调用2a号中断获取系统从启动运行时间(毫秒) end; procedure TForm1.Button1Click(Sender: TObject); var  hours:dword;//小时  sec:dword;  //分钟 begin  hours:=GetSysTime() div 3600000;  sec:=GetSysTime() mod 3600000 div 60000;  edit1.Text:='系统从启动运行了:'+inttostr(hours)+'小时'+inttostr(sec)+'分钟'; end;

function EnumWindowsFunc(Handle: THandle; List: TStringList):boolean; stdcall; var Caption: array[0..256] of Char; begin if GetWindowText(Handle, Caption, SizeOf(Caption)-1) <> 0 then begin List.Add(Caption); //SetWindowText(Handle, PChar('About - ' + Caption)); end; Result :=True; end; //用法 procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Clear; EnumWindows(@EnumWindowsFunc, LParam(Memo1.Lines)); end;

function   CanGetIECookie(const   URL:   string;   var   Cookie:   string):   boolean;    var    lpvBuffer:   array[0..1000]   of   byte;    lpdwBufferLength:   cardinal;    begin    lpdwBufferLength   :=   sizeof(lpvBuffer);    result   :

Continue Reading...

function GetSpecialFolderDir(const folderid:integer):string; var   pidl:pItemIDList;   buffer:array [ 0..255 ] of char ; begin   //取指定的文件夹项目表   SHGetSpecialFolderLocation( application.Handle , folderid, pidl);   SHGetPathFromIDList(pidl, buffer);    //转换成文件系统的路径   result:=strpas(buffer); end; 其

Continue Reading...

function FindProcess(AFileName: string): boolean; var hSnapshot: THandle; lppe: TProcessEntry32; Found: Boolean; KillHandle: THandle; begin Result :=False; hSnapshot := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); lppe.dwSize := SizeOf(TProcessEntry32); Found := Process32First(hSnapshot, lppe); while Found do begin   if ((UpperCase(ExtractFileName(lp

Continue Reading...

Page 1 of 2Prev12Next