8 港产零零柒

尚未进行身份认证

Hello, World!

等级
博文 37
排名 35w+

TLS-PRF实现示例

#include#include#include#include#include#include#includevoidhmac_sha1(unsignedchar*key,intkey_len,unsignedchar*text,inttext_len,unsignedchar*digest){inti;unsign

2016-12-06 16:16:43

数字签名&数字信封

1,生成数字签名2,验证数字签名3,生成数字信封4,解密数字信封

2016-11-10 14:29:49

UNIX Domain Socket

#include#include#include#include#include#include#include#include#include#include#include#include#include#includeintunix_socket(){intfd=socket(AF_UNIX,SOCK_STREA

2016-11-07 14:54:45

栈和队列

#include#include#include#include#defineDATA_SIZE2048#defineSTACK_SIZE65536typedefstructdata_s{ intlen; charval[DATA_SIZE];}data_t;typedefstructstack_s{ intcount; data_

2016-09-21 16:51:57

内核rbtree使用示例

/***@authorlijk@.infosec.com.cn*@version0.0.1*@date2016-9-2011:52:06*/#include#include#include"rbtree.h"typedefstructroc_node_s{structrb_nodenode;void*ctx;i

2016-09-20 11:45:31

创建/销毁线程操作示例

#include#include#include#include#include#include#include#include#include#defineMAX_NUM65536#ifndefECHO#defineECHO(fp,fmt,...)

2016-08-29 17:02:14

awk/sed操作ini文件

#!/bin/sh#authorlijk@.infosec.com.cn#date2016-8-1615:16:36function_ini_usage(){echo"Usage:$0getfilename.inisectionkeyorUsage:$0setfilename.inisectionkeyvalue"return

2016-08-24 14:00:39

父子进程间分发FD

intfd_pair(intfd[2]){returnsocketpair(AF_UNIX,SOCK_DGRAM,0,fd);}intfd_send(intsockfd,intfd,inttype){intdata;structioveciov_data;structmsghdrmsg_hdr;struc

2016-08-23 13:38:14

OpenSSL多线程互斥锁

staticpthread_mutex_t*crypto_lock=NULL;staticpthread_tpthread_id_cb(){returnpthread_self();}staticvoidpthread_locking_cb(intmode,intn,constchar*file,intline){if(mode

2016-08-22 22:22:20

rtp/rtcp header

#ifndef__RTP_H__#define__RTP_H__structrtphdr{#if__BYTE_ORDER==__LITTLE_ENDIANuint16_tcc:4;/*CSRCcount*/uint16_tx:1;/*headerextensionflag*/

2016-06-28 18:03:51

标记路由

#ipruleshow#iprouteshowtable1000##客户端主机:#IP:192.168.10.10#GW:192.168.10.11#test:ping192.168.110.110-t#客户端网关:#eth0:192.168.10.11#eth1:192.168.100.11#route

2016-06-27 16:42:46

vim + ctags + taglist

安装ctags: tarxvfctags-5.8.tar.gz cdctags-5.8 ./configure&&make&&makeinstall cd.. rm-rfctags-5.8安装taglist: rm-rf~/.vim mkdir-pv~/.vim unziptaglist_46.zip-d~/.vim配置vimrc(可选)

2016-05-24 23:06:10

合并CentOS镜像

#1,创建目录rm-rf/media/dvd1/media/dvd2/media/CentOSmkdir-pv/media/dvd1/media/dvd2/media/CentOS#2,挂载镜像mount-oloop/root/CentOS-6.5-i386-bin-DVD1to2/CentOS-6.5-i386-bin-DVD1.iso/media/dvd1

2016-05-12 18:20:01

使用VS2010编译OpenSSL源码

1,下载OpenSSL源码;2,安装VisualStudio2010(确认选中:X64编译器和工具);3,安装ActivePerl;4,下载NSAM;5,拷贝nsam.exe和ndisam.exe至D:\ProgramFiles(x86)\MicrosoftVisualStudio10.0\VC\bin\目录;6,打开VisualStudioCo

2016-04-16 13:43:50

CentOS本地yum源

1,mkdir-pv/media/CentOS/2,挂载镜像.png2',拷贝镜像至Linux根目录:/root/3,mount/dev/sr0/media/CentOS/3',mount-oloop/root/CentOS-6.5-i386-bin-DVD1.iso/media/CentOS/4,ls/etc/yum.repos.d/|grep

2016-03-21 11:06:22

LVS+Keepalived配置示例

1,说明#应用层:PROTOCOL#传输层:PORT#网络层:ICMP#关闭NetworkManager服务#setup->Systemservices->NetworkManager#LB服务器tarxvfpopt-1.16.tar.gzcdpopt-1.16./configure&&make&&makeinstallcd..rm-r

2016-03-04 14:20:14

HTTP客户端(libcurl) & HTTP服务端(libevent)

#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include"log.h"#ifndeflikely#definelikely(x)

2016-03-04 14:06:16

开机自启脚本示例

#!/bin/sh#chkconfig:2359999#description:ljkautoscript(1,vim/etc/init.d/auto;2,chmoda+x/etc/init.d/auto;3,chkconfig--addauto)case"${1}"instart)echo""${0}"start";log

2016-02-22 12:06:19

Epoll使用示例

#include"xdjaapi.h"#include"log.h"#include"utils.h"#defineSERVER_IP"0.0.0.0"#defineSERVER_PORT1988#defineLISTEN_BACKLOG5#defineMAX_FDS256#defineTIMEOUT3000staticvolatilesig_at

2016-02-16 21:15:43

libpcap使用示例

/***@authorlijk@.infosec.com.cn*@version0.0.1*@date2016-6-111:50:10*/#include#include#include#include#include#include#include#include#include#include#include#incl

2016-02-16 19:21:24
奖章
    暂无奖章