杂。

好久没有分享一些东西,日子过得也越来越迷茫,不知道能做些什么。

还好有一个人会给我一些动力,记录一下,文笔也越来越差,以前还会写一些裤裆文学,现在啥也不会了。

Fighting,Fighting,Fighting。

目标一:完美PDF转换工具

简单的像一,爆破点00424853
0F85 05030000 jnz 完美PDF?00424B5E
下载地址:http://www.downxia.com/downinfo/81703.html

目标二:PDF压缩工具

同样简单的像一,爆破点00512BD2,00512BDD ,00512BE8,
00512BF3
0F85 65030000 jnz PDFCompr.00512F3D
0F85 5A030000 jnz PDFCompr.00512F3D
0F85 4F030000 jnz PDFCompr.00512F3D
0F85 44030000 jnz PDFCompr.00512F3D
下载地址:http://www.duote.com/soft/5479.html

目标三:某收费文档下载

这个略微复杂些,下载https://ashrae.iwrapper.com/网站的收费文档,关于这个网站请参考百度百科
http://baike.baidu.com/link?url=xXfefzMS_yss6A_e5QyIoUL1MGzvm7M_FYuoph12bEGd-pJNiZhWLuIA_uFFh2r7nhMWMjUM6qhGOz5X0EMapa
抓包看了下得到了一个感兴趣的链接
分析后得之386处为文章页数,修改即可下载对应页数,文件格式是svg。
利用curl实现下载功能,详细见代码,代码写的略搓,各位看官勿喷啊,能用就行。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
static size_t DownloadCallback(char *buffer, size_t size, size_t nmemb, void *userp)
{
int nRet = 0;
HANDLE hFile;
DWORD dwSize;
DWORD dwBytes;
int nSize;
if (buffer != NULL)
{
CreateDirectory(L"Download", NULL);
wchar_t lpPath[256] = { 0 };
if (GetModuleFileName(NULL, lpPath, MAX_PATH))
{
PathRemoveFileSpec(lpPath);
}
wchar_t lpFileName[256] = { 0 };
_stprintf_s(lpFileName, L"%s\\Download\\%d.svg",lpPath,g_nTotal);
hFile = CreateFile(lpFileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile != NULL)
{
dwSize = GetFileSize(hFile, NULL);
SetFilePointer(hFile, 0, NULL, FILE_END);
dwBytes = 0;
nSize = size * nmemb;
nRet = WriteFile(hFile, buffer, nSize, &dwBytes, NULL);
if (nRet == 0)
{
OutputDebugString(L"WriteFile Error\r\n");
}
}
}
return size * nmemb;
}
static int ProgressCallback(void *pParam, double dltotal, double dlnow, double ultotal, double ulnow)
{
CAshraeDownloaderDlg *dlg = (CAshraeDownloaderDlg*)pParam;
int nPos = (int)((dlnow / dltotal) * 100);
//通知进度条更新下载进度
dlg->m_ProcessRate.SetPos(nPos);
Sleep(100);
return 0;
}
DWORD WINAPI DownThreadProc(_In_ LPVOID lpParameter)
{
CAshraeDownloaderDlg *dlg = (CAshraeDownloaderDlg*)lpParameter;
CURL* curl = curl_easy_init();
CURLcode urlCode;
char *PROXY = "127.0.0.1:1080";
CString strTotal;
dlg->m_editTotal.GetWindowText(strTotal);
dlg->m_editTotal.EnableWindow(FALSE);
//CString 转int
int nTotal = 0;
nTotal = _ttoi(strTotal);
g_nTotal = _ttoi(strTotal);
char lpBuf[256] = { 0 };
for (int i = 0; i < nTotal; i++)
{
sprintf(lpBuf, "感兴趣的链接", i);
dlg->m_editAddr.SetWindowText((CString)lpBuf);
urlCode = curl_easy_setopt(curl, CURLOPT_URL, lpBuf);
urlCode = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, DownloadCallback);
//urlCode = curl_easy_setopt(curl, CURLOPT_PROXY, PROXY); //设置代理服务器,不然抓不到包
//m_urlCode = curl_easy_setopt(m_lpCurl, CURLOPT_COOKIEFILE, COOKIES_PATH); //设置Cookies
//m_urlCode = curl_easy_setopt(m_lpCurl, CURLOPT_COOKIEJAR, COOKIES_PATH);
//urlCode = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 100); //设置超时时间
urlCode = curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE);
urlCode = curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, ProgressCallback);
urlCode = curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, dlg);
//Https 设置
urlCode = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查
urlCode = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, false); // 从证书中检查SSL加密算法是否存在
//保存文件名
g_nTotal = i;
urlCode = curl_easy_perform(curl);
Sleep(1000);
}
curl_easy_cleanup(curl);
MessageBox(NULL, L"DownloadAll...", L"Success", MB_ICONASTERISK);
dlg->m_editTotal.EnableWindow(TRUE);
return 0;
}


Ps:会封IP =.=