资源简介
这个扒站工具,设置好参数,90%的企业类型或者商城类型的网站都可以完全下载下来,而且还可以自动整理界面链接
代码片段和文件信息
/*
HTTrack external callbacks example : enforce a constant base href
Can be useful to make copies of site‘s archives using site‘s URL base href as root reference
.c file
How to build: (callback.so or callback.dll)
With GNU-GCC:
gcc -O -g3 -Wall -D_REENTRANT -shared -o mycallback.so callbacks-example.c -lhttrack1
With MS-Visual C++:
cl -LD -nologo -W3 -Zi -Zp4 -DWIN32 -Fe“mycallback.dll“ callbacks-example.c libhttrack1.lib
Note: the httrack library linker option is only necessary when using libhttrack‘s functions inside the callback
How to use:
httrack --wrapper mycallback ..
*/
#include
#include
#include
/* Standard httrack module includes */
#include “httrack-library.h“
#include “htsopt.h“
#include “htsdefines.h“
/* Local function definitions */
static int process_file(t_hts_callbackarg *carg httrackp* opt char* html int len const char* url_address const char* url_file);
static int check_detectedlink(t_hts_callbackarg *carg httrackp* opt char* link);
static int check_detectedlink_end(t_hts_callbackarg *carg httrackp *opt);
/*
module entry point
*/
EXTERNAL_FUNCTION int hts_plug(httrackp *opt const char* argv) {
const char *arg = strchr(argv ‘‘);
if (arg != NULL)
arg++;
/* Check args */
fprintf(stderr “Plugged..\n“);
if (arg == NULL || *arg == ‘\0‘ || strlen(arg) >= HTS_URLMAXSIZE / 2) {
fprintf(stderr “** callback error: arguments expected or bad arguments\n“);
fprintf(stderr “usage: httrack --wrapper modulenamebase\n“);
fprintf(stderr “example: httrack --wrapper callbackhttp://www.example.com/\n“);
return 0; /* failed */
} else {
char *callbacks_userdef = strdup(arg); /* userdef */
/* Plug callback functions */
CHAIN_FUNCTION(opt check_html process_file callbacks_userdef);
CHAIN_FUNCTION(opt linkdetected check_detectedlink callbacks_userdef);
CHAIN_FUNCTION(opt end check_detectedlink_end callbacks_userdef);
fprintf(stderr “Using root ‘%s‘\n“ callbacks_userdef);
}
return 1; /* success */
}
static int process_file(t_hts_callbackarg *carg httrackp* opt char* html int len const char* url_address const char* url_file) {
char* prevbase;
/* Call parent functions if multiple callbacks are chained. */
if (CALLBACKARG_PREV_FUN(carg check_html) != NULL) {
if (!CALLBACKARG_PREV_FUN(carg check_html)(CALLBACKARG_PREV_CARG(carg) opt html len url_address url_file)) {
return 0; /* Abort */
}
}
/* Disable base href if any */
if ( ( prevbase = strstr(html “se HREF=\““) ) != NULL) {
prevbase[1] = ‘X‘;
}
return 1; /* success */
}
static int check_detectedlink(t_hts_callbackarg *carg httrackp* opt char* link) {
const char *base = (char*) CALLBACKARG_USERDEF(carg);
/* Call parent functions if multiple callbacks are chained. */
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 70114 2012-07-13 06:24 HTTrackPortable.exe
文件 137 2019-01-29 11:34 HTTrackPortable.ini
文件 69504 2014-07-29 05:11 App\32\htsjava.dll
文件 170368 2014-07-29 05:12 App\32\htsswf.dll
文件 24448 2014-07-29 05:11 App\32\httrack.exe
文件 1177088 2014-04-08 13:26 App\32\libeay32.dll
文件 563072 2014-07-29 05:11 App\32\libhttrack.dll
文件 1156600 2010-02-14 22:18 App\32\mfc90.dll
文件 1857 2009-10-28 02:54 App\32\Microsoft.VC90.CRT.manifest
文件 2354 2010-02-14 22:18 App\32\Microsoft.VC90.MFC.manifest
文件 655872 2009-10-28 02:54 App\32\msvcr90.dll
文件 283008 2014-07-29 05:14 App\32\proxytrack.exe
文件 270336 2014-04-08 13:26 App\32\ssleay32.dll
文件 76160 2014-07-29 05:12 App\32\webhttrack.exe
文件 460672 2014-07-29 05:13 App\32\WinHTTrack.exe
文件 123392 2014-07-29 05:11 App\32\zlib1.dll
文件 73600 2014-07-29 05:15 App\64\htsjava.dll
文件 207744 2014-07-29 05:15 App\64\htsswf.dll
文件 33152 2014-07-29 05:15 App\64\httrack.exe
文件 1649152 2014-04-08 14:16 App\64\libeay32.dll
文件 775552 2014-07-29 05:15 App\64\libhttrack.dll
文件 352768 2014-04-08 14:16 App\64\libssl32.dll
文件 1671160 2010-02-14 22:19 App\64\mfc90.dll
文件 1859 2010-02-14 22:19 App\64\Microsoft.VC90.CRT.manifest
文件 2356 2010-02-14 22:19 App\64\Microsoft.VC90.MFC.manifest
文件 627200 2010-02-14 22:19 App\64\msvcr90.dll
文件 348032 2014-07-29 05:17 App\64\proxytrack.exe
文件 352768 2014-04-08 14:16 App\64\ssleay32.dll
文件 91520 2014-07-29 05:15 App\64\webhttrack.exe
文件 683392 2014-07-29 05:17 App\64\WinHTTrack.exe
............此处省略209个文件信息
- 上一篇:软件系统安全保障方案
- 下一篇:UserGuide_IPNC_RDK_DM36x
评论
共有 条评论