This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QRubberBand> | |
class RubberBand : public QRubberBand | |
{ | |
Q_OBJECT | |
public: | |
RubberBand(QWidget *parent = 0, QColor c = QColor("red"), Shape s = QRubberBand::Rectangle); | |
void paintEvent(QPaintEvent *); | |
private: | |
QColor color; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern GetStdHandle | |
extern WriteConsoleA | |
extern ExitProcess | |
[SECTION .data] | |
align 32 | |
_dummy: | |
dd 0 | |
_message: | |
db 'Hello, world!', 0dh, 0ah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
#include "dbghelp.h" | |
BOOL WINAPI InitSymHandler( ) | |
{ | |
BOOL bReturn = FALSE; | |
HANDLE hFile; | |
CHAR DirPath[MAX_PATH] = {0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <Windows.h> | |
#include <imagehlp.h> | |
#include <locale.h> | |
#pragma comment(lib,"DbgHelp.lib") | |
BOOL CALLBACK CallBackProc( PSYMBOL_INFO pSymInfo, ULONG SymbolSize, PVOID UserContext ) | |
{ | |
printf( "函数名: %s\r\n地址: %08X \r\n\r\n", pSymInfo->Name, pSymInfo->Address ); | |
return TRUE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
线程ID | |
指定ID为0x080为开始,是否有必要?这是否跟ID的范围有关系 | |
指定ID最大值为400h,0x080~0x400的范围内必然存在GDI线程?(俺用Kernel Detective看过确实必然至少有一个GDI线程) | |
从问题2引出的问题,GDI线程和非GDI线程的ID是否有固定的ID值范围?系统分配这个ID | |
值是否存在某些规律(俺听某人说是随机的,如果是随机的话,这种方法太大偶然性了) | |
还有代码中的ID递增方式是add dwThreadId, 4,通过观察,ID值确实有这样的规律,但是 | |
不懂,这是固定的还是怎么样的?俺有没有必要去了解? | |
PVOID PsGetThreadWin32Thread(KTHREAD* Thread);这个返回KTHREAD后面的Wind2Thread指针,win32Thread保存线程有关GUI的一些信息,如果这个不为空就是GUI的线程了 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class singleton | |
{ | |
private static singleton *_instance = null; | |
protected: | |
singleton() | |
{ | |
if(_instance) | |
{ | |
throw std::logic_error("ss"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <Windows.h> | |
#include <iostream> | |
#define steps_per_second 100; | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
unsigned int skip_ticks = 1000/steps_per_second; | |
int max_script_steps_skip = 10; | |
bool running = true; | |
unsigned int next_step = GetTickCount(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cookielib | |
import requests | |
index = sys.argv[1] | |
g_cookie = [] | |
gs = [] | |
def prepare(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zlib | |
from glob import glob | |
def zipstreams(filename): | |
"""Return all zip streams and their positions in file.""" | |
with open(filename, 'rb') as fh: | |
data = fh.read() | |
i = 0 | |
while i < len(data): | |
try: |