Compiling Poppler on Windows
admin | Qt Gui | 2013-04-13
I’ve been struggling trying to install Poppler under Windows, and there is no much information out there. And the few people who claim that works on Windows don’t say how they did it.
Thus, today I will try to guide you on how to make Poppler works on Windows with QT. The goal of this tutorial is to compile the poppler_qt4vie... [阅读全文]
EasyHook远程代码注入
admin | 屏幕取词 | 2013-04-10
最近一段时间由于使用MinHook的API挂钩不稳定,经常因为挂钩地址错误而导致宿主进程崩溃。听同事介绍了一款智能强大的挂钩引擎EasyHook。它比微软的detours好的一点是它的x64注入支持是免费开源的。不想微软的detours,想搞x64还得购买。
好了,闲话不多说,先下载EasyHook的开发库,当然有兴趣的同学可以下载源码进行学习。下载地址:http://easyhook.... [阅读全文]
VC6.0 MFC下截取窗口特定部分并保存为bmp图片的类
admin | C++ | 2013-04-04
C++
/*类名称:bmpScreen.h。
; 类功能:提供了一个MFC下截取窗口特定部分并保存为bmp图片的类。
; 类参数:Crect rect, int left, int top, int top, char* name。
; 类参数说明:
; (1)Crect rect 定义截图框的大小。
; (2)int left 定义截图框距截图窗口左边的距离。
; (3)int top 定义截... [阅读全文]
Qt不规则窗体的实现
admin | Qt Gui | 2013-04-04
C++
//shapewidget.h
/*
*@date 2012-11-17
*/
#ifndef __SHAPE_WIDGET_H
#define __SHAPE_WIDGET_H
#include <QWidget>
#include <QMouseEvent>
#include <QPaintEvent>
#include <QPoint>
class ShapeWidget:public QWidget
{
Q_OBJECT
public:
ShapeWidget(QWidget *... [阅读全文]
Get IP by Hostname
admin | net work | 2013-04-04
C++
#include<stdio.h>
#include<stdlib.h>
#include<netdb.h>
#include<arpa/inet.h>
int main(int argc, char **argv) {
struct hostent *host;
char str[100];
char addr[INET_ADDRSTRLEN];
char **p;
int c;
while (1){
c=0;
gets(str);
printf("%s\n",str);
if ... [阅读全文]
ip地址正则表达式测试是否正确
admin | net work | 2013-04-04
C++
#include <sys/types.h>
#include <regex.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
char *test;
/*
int regcomp(regex_t *preg, const char *regex, int cflags);
int regexec(const regex_t *preg, const char *string, size_t nmatch,
... [阅读全文]
raw socket 发送阻断包
admin | net work | 2013-04-04
C++
来源:http://bugkill.01safe.com/thread-207-1-1.html
*int sndpkt_tcp_rst(u32 seq,u32 src_ip, u32 dst_ip, u16 src_prt, u16 dst_prt)
{
static int i=0;
int one=1; /* R.Stevens says we need this variable for the setsockopt call */
int tcphdrlen = sizeof(struct tcphdr);
int iphdrlen = sizeof(str... [阅读全文]
raw socket 发送阻断包
admin | net work | 2013-04-04
C++
来源:http://bugkill.01safe.com/thread-207-1-1.html
*int sndpkt_tcp_rst(u32 seq,u32 src_ip, u32 dst_ip, u16 src_prt, u16 dst_prt)
{
static int i=0;
int one=1; /* R.Stevens says we need this variable for the setsockopt call */
int tcphdrlen = sizeof(struct tcphdr);
int iphdrlen = sizeof(str... [阅读全文]
当前程序退出后重启
admin | win32 | 2013-04-04
C++
TCHAR szPath[MAX_PATH]; //
GetModuleFileName(NULL, szPath, MAX_PATH); //获取当前应用程序的全路径
//定义俩变量,具体的请参见msdn
STARTUPINFO startupInfo;
PROCESS_INFORMATION procInfo;
memset(&startupInfo,0x00,sizeof(STARTUPINFO));
startupInfo.cb = sizeof(STARTUPINFO);
// 这个变量是标... [阅读全文]
获取本地主机ipv4地址和ipv6地址
admin | net work | 2013-04-04
C++
#include <Winsock2.h>
#include <stdio.h>
#include <iostream>
#include <cstring>
#include<ws2tcpip.h>
#pragma comment(lib, "ws2_32.lib ") //linking to the library
using namespace std;
int get_ip()
{
struct addrinfo *ailist, *aip;
struct addrinfo hin... [阅读全文]