├── .gitattributes ├── .github └── workflows │ └── continuous.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── COPYING ├── ChangeLog.md ├── INSTALL ├── INSTALL.Linux ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── README.md ├── compile ├── config.guess ├── config.h ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── debian ├── changelog ├── compat ├── control ├── copyright ├── httrack-doc.debhelper.log ├── httrack-doc.doc-base ├── httrack-doc.files ├── httrack-doc.lintian-overrides ├── httrack.debhelper.log ├── httrack.lintian-overrides ├── libhttrack-dev.debhelper.log ├── libhttrack-dev.files ├── libhttrack-dev.lintian-overrides ├── libhttrack-swf1.files ├── libhttrack2.debhelper.log ├── libhttrack2.files ├── proxytrack.debhelper.log ├── proxytrack.files ├── rules ├── source.lintian-overrides ├── source │ ├── format │ └── options ├── watch ├── webhttrack-common.debhelper.log ├── webhttrack-common.files ├── webhttrack.debhelper.log └── webhttrack.files ├── depcomp ├── gpl-fr.txt ├── greetings.txt ├── history.txt ├── html ├── Makefile.am ├── Makefile.in ├── abuse.html ├── addurl.html ├── cache.html ├── cmddoc.html ├── contact.html ├── dev.html ├── div │ └── search.sh ├── faq.html ├── fcguide.html ├── filters.html ├── httrack.css ├── httrack.man.html ├── images │ ├── bg_rings.gif │ ├── header_title_4.gif │ ├── screenshot_01.jpg │ └── screenshot_01b.jpg ├── img │ ├── addurl1.gif │ ├── addurl2.gif │ ├── addurl3.gif │ ├── addurl4.gif │ ├── addurl5.gif │ ├── backblue.gif │ ├── fade.gif │ ├── httrack.gif │ ├── snap1_a.gif │ ├── snap1_b.gif │ ├── snap1_c.gif │ ├── snap2_a.gif │ ├── snap2_b.gif │ ├── snap3_a.gif │ ├── snap4_a.gif │ ├── snap5_a.gif │ ├── snap9.gif │ ├── snap9_a.gif │ ├── snap9_b.gif │ ├── snap9_c.gif │ ├── snap9_d.gif │ ├── snap9_d2.gif │ ├── snap9_d3.gif │ ├── snap9_d4.gif │ ├── snap9_d5.gif │ ├── snap9_d6.gif │ ├── snap9_d7.gif │ ├── snap9_d8.gif │ ├── snap9_e.gif │ ├── snap9_f.gif │ ├── snap9_g.gif │ ├── snap9_g2.gif │ ├── snap9_g3.gif │ ├── snap9_h.gif │ ├── snap9_i.gif │ ├── snap9_j.gif │ └── snap9_k.gif ├── index.html ├── library.html ├── options.html ├── overview.html ├── plug.html ├── plug_330.html ├── scripting.html ├── server │ ├── about.html │ ├── addurl.html │ ├── div │ │ ├── 16x16 │ │ │ └── httrack.png │ │ ├── 32x32 │ │ │ └── httrack.png │ │ ├── 48x48 │ │ │ └── httrack.png │ │ ├── WebHTTrack-Websites.desktop │ │ ├── WebHTTrack.desktop │ │ ├── httrack16x16.xpm │ │ ├── httrack32x32.xpm │ │ └── httrack48x48.xpm │ ├── error.html │ ├── exit.html │ ├── file.html │ ├── finished.html │ ├── help.html │ ├── images │ │ ├── bg_rings.gif │ │ ├── fade.gif │ │ └── header_title_4.gif │ ├── index.html │ ├── option1.html │ ├── option10.html │ ├── option11.html │ ├── option2.html │ ├── option2b.html │ ├── option3.html │ ├── option4.html │ ├── option5.html │ ├── option6.html │ ├── option7.html │ ├── option8.html │ ├── option9.html │ ├── ping.js │ ├── refresh.html │ ├── step2.html │ ├── step3.html │ ├── step4.html │ └── style.css ├── shelldoc.html ├── start.html ├── step.html ├── step1.html ├── step2.html ├── step3.html ├── step4.html ├── step5.html ├── step9.html ├── step9_opt1.html ├── step9_opt10.html ├── step9_opt11.html ├── step9_opt2.html ├── step9_opt3.html ├── step9_opt4.html ├── step9_opt5.html ├── step9_opt6.html ├── step9_opt7.html ├── step9_opt8.html └── step9_opt9.html ├── httrack-doc.html ├── install-sh ├── lang.def ├── lang.indexes ├── lang ├── Bulgarian.txt ├── Castellano.txt ├── Cesky.txt ├── Chinese-BIG5.txt ├── Chinese-Simplified.txt ├── Croatian.txt ├── Dansk.txt ├── Deutsch.txt ├── Eesti.txt ├── English.txt ├── Finnish.txt ├── Francais.txt ├── Greek.txt ├── Italiano.txt ├── Japanese.txt ├── Macedonian.txt ├── Magyar.txt ├── Makefile.am ├── Makefile.in ├── Nederlands.txt ├── Norsk.txt ├── Polski.txt ├── Portugues-Brasil.txt ├── Portugues.txt ├── Romanian.txt ├── Russian.txt ├── Slovak.txt ├── Slovenian.txt ├── Svenska.txt ├── Turkish.txt ├── Ukrainian.txt └── Uzbek.txt ├── libtest ├── Makefile.am ├── Makefile.in ├── callbacks-example-baselinks.c ├── callbacks-example-changecontent.c ├── callbacks-example-contentfilter.c ├── callbacks-example-displayheader.c ├── callbacks-example-filename.c ├── callbacks-example-filename2.c ├── callbacks-example-filenameiisbug.c ├── callbacks-example-listlinks.c ├── callbacks-example-log.c ├── callbacks-example-simple.c ├── example-main.c ├── example-main.h ├── libtest.mak ├── libtest.vcproj ├── libtest.vcxproj ├── libtest.vcxproj.filters └── readme.txt ├── libtool ├── license.txt ├── ltmain.sh ├── m4 ├── Makefile.am ├── Makefile.in ├── ax_check_aligned_access_required.m4 ├── ax_check_compile_flag.m4 ├── ax_check_link_flag.m4 ├── check_zlib.m4 ├── libtool.m4 ├── ltoptions.m4 ├── ltsugar.m4 ├── ltversion.m4 ├── lt~obsolete.m4 ├── snprintf.m4 └── visibility.m4 ├── man ├── Makefile.am ├── Makefile.in ├── htsserver.1 ├── httrack.1 ├── proxytrack.1 └── webhttrack.1 ├── missing ├── src ├── Makefile.am ├── Makefile.in ├── PlatformFixes.c ├── PlatformFixes.h ├── hts-indextmpl.h ├── htsalias.c ├── htsalias.h ├── htsarrays.h ├── htsback.c ├── htsback.h ├── htsbase.h ├── htsbasenet.h ├── htsbasiccharsets.sh ├── htsbauth.c ├── htsbauth.h ├── htscache.c ├── htscache.h ├── htscatchurl.c ├── htscatchurl.h ├── htscharset.c ├── htscharset.h ├── htscodepages.h ├── htsconcat.c ├── htsconfig.h ├── htscore.c ├── htscore.h ├── htscoremain.c ├── htscoremain.h ├── htsdefines.h ├── htsencoding.c ├── htsencoding.h ├── htsentities.h ├── htsentities.sh ├── htsfilters.c ├── htsfilters.h ├── htsftp.c ├── htsftp.h ├── htsglobal.h ├── htshash.c ├── htshash.h ├── htshelp.c ├── htshelp.h ├── htsindex.c ├── htsindex.h ├── htsjava.c ├── htsjava.h ├── htslib.c ├── htslib.h ├── htsmd5.c ├── htsmd5.h ├── htsmodules.c ├── htsmodules.h ├── htsname.c ├── htsname.h ├── htsnet.h ├── htsopt.h ├── htsparse.c ├── htsparse.h ├── htsrobots.c ├── htsrobots.h ├── htssafe.h ├── htsserver.c ├── htsserver.h ├── htsstrings.h ├── htsthread.c ├── htsthread.h ├── htstools.c ├── htstools.h ├── htsweb.c ├── htsweb.h ├── htswizard.c ├── htswizard.h ├── htswrap.c ├── htswrap.h ├── htszlib.c ├── htszlib.h ├── httrack-cli │ ├── httrack.vcxproj │ └── packages.config ├── httrack-library.h ├── httrack.c ├── httrack.dsp ├── httrack.dsw ├── httrack.h ├── libhttrack.dsp ├── libhttrack.dsw ├── libhttrack.vcxproj ├── libhttrack.vcxproj.filters ├── md5.c ├── md5.h ├── packages.config ├── proxy │ ├── AUTHORS │ ├── COPYING │ ├── changelog.txt │ ├── main.c │ ├── packages.config │ ├── proxystrings.h │ ├── proxytrack.c │ ├── proxytrack.h │ ├── proxytrack.vcxproj │ ├── proxytrack.vcxproj.filters │ ├── store.c │ └── store.h ├── punycode.c ├── punycode.h ├── vendor │ ├── README.md │ ├── minizip │ │ ├── MiniZip64_Changes.txt │ │ ├── MiniZip64_info.txt │ │ ├── crypt.h │ │ ├── ioapi.c │ │ ├── ioapi.c.diff │ │ ├── ioapi.c.orig │ │ ├── ioapi.h │ │ ├── ioapi.h.diff │ │ ├── ioapi.h.orig │ │ ├── iowin32.c │ │ ├── iowin32.h │ │ ├── mztools.c │ │ ├── mztools.c.diff │ │ ├── mztools.c.orig │ │ ├── mztools.h │ │ ├── unzip.c │ │ ├── unzip.h │ │ ├── zip.c │ │ ├── zip.c.diff │ │ ├── zip.h │ │ ├── zip.h.diff │ │ └── zip.h.orig │ ├── path-join │ │ ├── Readme.md │ │ ├── path-join.c │ │ ├── path-join.h │ │ ├── str-ends-with.c │ │ ├── str-ends-with.h │ │ ├── str-starts-with.c │ │ └── str-starts-with.h │ ├── safe_config.h │ ├── safe_lib_errno.h │ └── safe_types.h ├── web │ ├── packages.config │ ├── webhttrack.dsp │ ├── webhttrack.dsw │ ├── webhttrack.vcxproj │ └── webhttrack.vcxproj.filters └── webhttrack ├── templates ├── Makefile.am ├── Makefile.in ├── index-body.html ├── index-footer.html ├── index-header.html ├── topindex-body.html ├── topindex-bodycat.html ├── topindex-footer.html └── topindex-header.html ├── test-driver └── tests ├── 00_runnable.test ├── 01_engine-charset.test ├── 01_engine-entities.test ├── 01_engine-hashtable.test ├── 01_engine-idna.test ├── 01_engine-simplify.test ├── 10_crawl-simple.test ├── 11_crawl-cookies.test ├── 11_crawl-idna.test ├── 11_crawl-international.test ├── 11_crawl-longurl.test ├── 11_crawl-parsing.test ├── 12_crawl_https.test ├── Makefile.am ├── Makefile.in ├── check-network.sh ├── crawl-test.sh └── run-all-tests.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | *.png binary 3 | *.jpg binary 4 | *.gif binary 5 | *.ico binary 6 | *.bmp binary 7 | *.ico binary 8 | *.pdf binary 9 | *.aps binary 10 | *.cur binary -------------------------------------------------------------------------------- /.github/workflows/continuous.yml: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # 3 | # 4 | # This code was generated. 5 | # 6 | # - To turn off auto-generation set: 7 | # 8 | # [OurGitHubActions (AutoGenerate = false)] 9 | # 10 | # - To trigger manual generation invoke: 11 | # 12 | # nuke --generate-configuration GitHubActions_continuous --host GitHubActions 13 | # 14 | # 15 | # ------------------------------------------------------------------------------ 16 | 17 | # This workflow is generated by the nuke configuration on mitch-capper/httrack-windows. It runs on the main httrack repo however. 18 | env: 19 | NUKE_TELEMETRY_OPTOUT: 1 20 | name: continuous 21 | 22 | on: 23 | push: 24 | branches-ignore: 25 | - trash 26 | 27 | jobs: 28 | continuous: 29 | name: Run 30 | runs-on: ${{matrix.BaseImage}} 31 | strategy: 32 | matrix: 33 | BaseImage: [windows-latest, ubuntu-latest, ubuntu-18.04] 34 | Configuration: [Debug, Release] 35 | Arch: [x86, x64] 36 | exclude: 37 | - Arch: x86 38 | BaseImage: ubuntu-latest 39 | - Arch: x86 40 | BaseImage: ubuntu-18.04 41 | env: 42 | NUKE_BaseImage: ${{matrix.BaseImage}} 43 | NUKE_Configuration: ${{matrix.Configuration}} 44 | NUKE_Arch: ${{matrix.Arch}} 45 | steps: 46 | - uses: actions/checkout@v2 47 | with: 48 | submodules: recursive 49 | fetch-depth: 0 50 | repository: mitchcapper/httrack-windows 51 | - name: Cache .nuke/temp, ~/.nuget/packages 52 | uses: actions/cache@v2 53 | with: 54 | path: | 55 | .nuke/temp 56 | ~/.nuget/packages 57 | key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }} 58 | - name: Run './build.cmd Pack' 59 | run: ./build.cmd Pack 60 | - uses: actions/upload-artifact@v1 61 | with: 62 | name: httrack-${{matrix.BaseImage}}-${{matrix.Configuration}}-${{matrix.Arch}} 63 | path: final 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.I[12] 2 | *.[EIOX] 3 | *.bak 4 | *.gcda 5 | *.gcno 6 | *.o 7 | *.lo 8 | *.la 9 | *.diff 10 | *.orig 11 | *.a 12 | *~ 13 | ._bootmp 14 | .deps 15 | .dirstamp 16 | missingcat 17 | .gdb-history 18 | .kludge-stamp 19 | .version 20 | /ABOUT-NLS 21 | /ChangeLog 22 | /GNUmakefile 23 | libtest/.libs 24 | src/.libs 25 | /INSTALL 26 | /THANKS-to-translators 27 | /aclocal.m4 28 | /autom4te.cache 29 | /config.cache 30 | /config.log 31 | /config.status 32 | /gnulib-tests 33 | /stamp-h1 34 | ID 35 | *.exe 36 | *.obj 37 | *.log 38 | *.user 39 | httrack 40 | htsserver 41 | proxytrack 42 | Makefile -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/vendor/coucal"] 2 | path = src/vendor/coucal 3 | url = https://github.com/xroche/coucal.git 4 | ignore = untracked 5 | [submodule "src/vendor/cJSON"] 6 | path = src/vendor/cJSON 7 | url = https://github.com/DaveGamble/cJSON.git 8 | ignore = untracked 9 | [submodule "src/vendor/safeclib"] 10 | path = src/vendor/safeclib 11 | url = https://github.com/rurban/safeclib.git 12 | ignore = untracked -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Xavier Roche 2 | -------------------------------------------------------------------------------- /INSTALL.Linux: -------------------------------------------------------------------------------- 1 | HTTrack Website Copier - Install notes 2 | -------------------------------------- 3 | 4 | On most systems (including GNU/Linux), installing can be easily achieved using the following command: 5 | 6 | ./configure && make && make install 7 | -or- (if not compiling as root) 8 | ./configure --prefix=$HOME && make && make install 9 | 10 | See also the INSTALL generic help file. 11 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = src man m4 libtest templates lang html tests 3 | 4 | ACLOCAL_AMFLAGS = -I m4 --install 5 | 6 | EXTRA_DIST = INSTALL.Linux \ 7 | gpl-fr.txt license.txt greetings.txt history.txt \ 8 | httrack-doc.html lang.def README.md \ 9 | config.h.in \ 10 | stamp-h.in \ 11 | tool-versions.txt 12 | 13 | DISTCLEANFILES = tool-versions.txt 14 | 15 | tool-versions.txt: Makefile 16 | ( automake --version ; echo ; \ 17 | autoconf --version ; echo ; \ 18 | $(CC) --version ; echo ; \ 19 | m4 --version ; echo ; \ 20 | makeinfo --version ) > $@ -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/NEWS -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | HTTrack Website Copier, Offline Browser for Windows and Unix 2 | Copyright (C) 1998-2018 Xavier Roche and other contributors 3 | 4 | Welcome to HTTrack Website Copier! 5 | 6 | 7 | Information: 8 | 9 | The folder html/ contains the documentation 10 | You might want to read these files, especially for installing HTTrack: 11 | - See INSTALL file for installation information (NO WARRANTY) 12 | - See license.txt file for license information 13 | 14 | 15 | Contacting us: 16 | 17 | If you want to ask any question, feel free to contact us! 18 | email: httrack@httrack.com 19 | 20 | 21 | Donations: 22 | 23 | HTTrack Website Copier is free software, but if you can, please donate to the Free Software Foundation (FSF) to support free software! 24 | 25 | (Europe) 26 | http://www.fsfeurope.org/help/donate.html 27 | 28 | (World) 29 | http://www.fsf.org/help/donate.html 30 | 31 | 32 | Engine limits: 33 | 34 | These are the principals limits of HTTrack for that moment. Note that we did not heard about any other utility 35 | that would have solved them. 36 | 37 | - Several scripts generating complex filenames may not find them (ex: img.src='image'+a+Mobj.dst+'.gif') 38 | - Some java classes may not find some files on them (class included) 39 | - Cgi-bin links may not work properly in some cases (parameters needed). To avoid them: use filters like -*cgi-bin* 40 | 41 | 42 | Advanced options: 43 | 44 | These options may not be necessary for a normal usage. But they can solve several problems. 45 | 46 | - If you need more than 100,000 links: -#L1000000 (1,000,000 links) 47 | - If you need more than 500 filters: -#F1000 (1,000 filters) 48 | - If you need transfer rate statictics every minutes: -#Z 49 | - If you need transfer operations statistics every minutes: -#T 50 | - If you want log files to be refreshed after every line: -#f 51 | 52 | 53 | Thank you! 54 | 55 | 56 | Have fun with HTTrack Website Copier! 57 | The authors 58 | 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HTTrack Website Copier - Development Repository 2 | 3 | ## This Fork 4 | 5 | HTTrack ( https://github.com/xroche/httrack ) development seems stalled (last release May 2017, last commit Nov, 2019). I make no statements or guarantees on updating this or merging PRs but if they are clean I should have the time to do so. At a minimum should give a good starting point for someone else to continue to maintain this. 6 | 7 | There are automatic binary builds made for every commit. If you are logged into github you are able to download the "artifacts" or zip files of the final products and source from them. See: [Actions · mitchcapper/httrack · GitHub](https://github.com/mitchcapper/httrack/actions/workflows/continuous.yml) for the runs, click on a run and scroll to the bottom to find artifacts. 8 | 9 | ## Fork Changes 10 | 11 | Notable changes made on this fork: 12 | 13 | - New Visual studio solution and projects to compile easily on VS 2022 14 | - SSL/HTTPS Proxying support, `--httpproxy-ssl` 15 | - JSON cookie store rather than netscape cookies.txt (uses standardized plugin cookie fields) 16 | - More and larger cookies (up from 8) along with larger header limits (for user agents etc) 17 | - Nuget dependencies for openssl/zlib so no external libs need to be manually added 18 | - WinHTTrack now pulls httrack in as a sub module for better organization and easier build 19 | - Updated versions of zlib/openssl for windows to much newer versions 20 | - The following PR from the original GH repo have been (or will be) merged: 21 | - [ x ] https://github.com/xroche/httrack/pull/135 22 | - [ x ] https://github.com/xroche/httrack/pull/172 23 | - [ x ] https://github.com/xroche/httrack/pull/199 24 | - [ x ] https://github.com/xroche/httrack/pull/220 25 | - [ x ] https://github.com/xroche/httrack/pull/221 26 | - [ x ] https://github.com/xroche/httrack/pull/227 27 | 28 | ## About 29 | 30 | _Copy websites to your computer (Offline browser)_ 31 | 32 | 33 | 34 | *HTTrack* is an _offline browser_ utility, allowing you to download a World Wide website from the Internet to a local directory, building recursively all directories, getting html, images, and other files from the server to your computer. 35 | 36 | *HTTrack* arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online. 37 | 38 | HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system. 39 | 40 | *WinHTTrack* is the Windows 2000/XP/Vista/Seven release of HTTrack, and *WebHTTrack* the Linux/Unix/BSD release. 41 | 42 | ## Website 43 | 44 | *Main Website:* 45 | http://www.httrack.com/ 46 | 47 | ## Compiling Notes 48 | 49 | ### For Linux 50 | 51 | ```sh 52 | git clone https://github.com/xroche/httrack.git --recurse 53 | cd httrack 54 | ./configure --prefix=$HOME/usr && make -j8 && make install 55 | ``` 56 | 57 | ### For Windows 58 | 59 | For Windows you want to not clone this repo but rather: https://github.com/mitchcapper/httrack-windows it will pull this repo in. You can then option the solution file in VS (tested with 2022) and it should hopefully compile (needs v143 build tools for C++). 60 | 61 | Alternatively you can compile using MinGW/msys tools. Note it currently sets to v143 build tools and Win10 as the minimums. If you need to run on older systems likely adjusting those down would not cause issues. 62 | 63 | ## 3rd party Libraries -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Xavier Roche on 2 | Fri, 27 Sep 2002 16:42:26 +0200 3 | 4 | The current Debian maintainer is Xavier Roche 5 | 6 | Upstream author: Xavier Roche 7 | 8 | Copyright: 1998-2014 Xavier Roche and other contributors 9 | 10 | This program is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | (at your option) any later version. 14 | 15 | On Debian systems, the complete text of the GNU General Public 16 | License can be found in /usr/share/common-licenses/GPL file. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | In addition, as a special exception, Xavier Roche gives permission to 24 | link the code of this program with the openSSL library (or with 25 | modified versions of openSSL that use the same license as openSSL), 26 | and distribute linked combinations including the two. You must obey 27 | the GNU General Public License in all respects for all of the code 28 | used other than openSSL. If you modify this file, you may extend this 29 | exception to your version of the file, but you are not obligated to do 30 | so. If you do not wish to do so, delete this exception statement from 31 | your version. 32 | -------------------------------------------------------------------------------- /debian/httrack-doc.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/httrack-doc.doc-base: -------------------------------------------------------------------------------- 1 | Document: httrack-doc 2 | Title: httrack website copier documentation 3 | Author: Xavier Roche 4 | Abstract: This document describes and discuss on httrack website copier 5 | Section: Network/Web Browsing 6 | 7 | Format: HTML 8 | Index: /usr/share/doc/httrack/httrack-doc.html 9 | Files: /usr/share/doc/httrack/html/*.html 10 | -------------------------------------------------------------------------------- /debian/httrack-doc.files: -------------------------------------------------------------------------------- 1 | usr/share/httrack/html 2 | usr/share/doc/httrack 3 | usr/share/doc/httrack/httrack-doc.html 4 | usr/share/lintian/overrides/httrack-doc 5 | -------------------------------------------------------------------------------- /debian/httrack-doc.lintian-overrides: -------------------------------------------------------------------------------- 1 | extra-license-file usr/share/httrack/html/license.txt 2 | duplicate-changelog-files usr/share/doc/httrack/changelog.gz usr/share/doc/httrack/history.txt.gz 3 | extended-description-is-probably-too-short 4 | -------------------------------------------------------------------------------- /debian/httrack.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/httrack.lintian-overrides: -------------------------------------------------------------------------------- 1 | duplicate-changelog-files usr/share/doc/httrack/changelog.gz usr/share/doc/httrack/history.txt.gz 2 | -------------------------------------------------------------------------------- /debian/libhttrack-dev.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/libhttrack-dev.files: -------------------------------------------------------------------------------- 1 | usr/include/httrack 2 | usr/lib/libhttrack.{so} 3 | usr/lib/libhtsjava.{so} 4 | usr/share/httrack/libtest 5 | usr/lib/httrack/libtest 6 | usr/share/lintian/overrides/libhttrack-dev 7 | -------------------------------------------------------------------------------- /debian/libhttrack-dev.lintian-overrides: -------------------------------------------------------------------------------- 1 | hardening-no-fortify-functions usr/lib/httrack/libtest/libfilenameiisbug.so.1.0.0 2 | -------------------------------------------------------------------------------- /debian/libhttrack-swf1.files: -------------------------------------------------------------------------------- 1 | usr/lib/libhtsswf.so.1.0.0 2 | usr/lib/libhtsswf.so.1 3 | -------------------------------------------------------------------------------- /debian/libhttrack2.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/libhttrack2.files: -------------------------------------------------------------------------------- 1 | usr/lib/libhttrack.so.2.0.49 2 | usr/lib/libhttrack.so.2 3 | usr/lib/libhtsjava.so.2.0.49 4 | usr/lib/libhtsjava.so.2 5 | usr/share/httrack/templates 6 | -------------------------------------------------------------------------------- /debian/proxytrack.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/proxytrack.files: -------------------------------------------------------------------------------- 1 | usr/share/man/man1/proxytrack.1 2 | usr/bin/proxytrack 3 | -------------------------------------------------------------------------------- /debian/source.lintian-overrides: -------------------------------------------------------------------------------- 1 | httrack source: changelog-should-mention-nmu 2 | httrack source: source-nmu-has-incorrect-version-number 3 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/source/options: -------------------------------------------------------------------------------- 1 | extend-diff-ignore="(^|/)(config\.sub|config\.guess|test-driver|Makefile|.*\.in|aclocal\.m4|configure)$" 2 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | # format version number, currently 3; this line is compulsory! 2 | version=3 3 | 4 | # main httrack.com download page ; fetch the mirror version number 5 | http://www.httrack.com/page/2/en/index.html\ 6 | .*/httrack-([\d\.]+).tar.gz 7 | 8 | -------------------------------------------------------------------------------- /debian/webhttrack-common.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/webhttrack-common.files: -------------------------------------------------------------------------------- 1 | usr/share/httrack/html/server 2 | usr/share/httrack/lang 3 | usr/share/httrack/lang.def 4 | usr/share/httrack/lang.indexes 5 | usr/share/pixmaps 6 | usr/share/icons 7 | -------------------------------------------------------------------------------- /debian/webhttrack.debhelper.log: -------------------------------------------------------------------------------- 1 | dh_lintian 2 | dh_autoreconf 3 | -------------------------------------------------------------------------------- /debian/webhttrack.files: -------------------------------------------------------------------------------- 1 | usr/lib/httrack/htsserver 2 | usr/bin/webhttrack 3 | usr/share/man/man1/webhttrack.1 4 | usr/share/man/man1/htsserver.1 5 | usr/share/applications/WebHTTrack-Websites.desktop 6 | usr/share/applications/WebHTTrack.desktop 7 | -------------------------------------------------------------------------------- /html/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | HelpHtmlrootdir = $(docdir) 3 | HelpHtmldir = $(htmldir) 4 | HelpHtmlimgdir = $(HelpHtmldir)/img 5 | HelpHtmldivdir = $(HelpHtmldir)/div 6 | HelpHtmlimagesdir = $(HelpHtmldir)/images 7 | HelpHtmlTxtdir = $(HelpHtmldir) 8 | WebHtmldir = $(HelpHtmldir)/server 9 | WebHtmlimagesdir = $(HelpHtmldir)/server/images 10 | WebPixmapdir = $(datadir)/pixmaps 11 | WebIcon16x16dir = $(datadir)/icons/hicolor/16x16/apps 12 | WebIcon32x32dir = $(datadir)/icons/hicolor/32x32/apps 13 | WebIcon48x48dir = $(datadir)/icons/hicolor/48x48/apps 14 | VFolderEntrydir = $(prefix)/share/applications 15 | 16 | HelpHtmlroot_DATA = ../httrack-doc.html ../history.txt 17 | HelpHtml_DATA = *.html 18 | HelpHtmldiv_DATA = div/search.sh 19 | HelpHtmlimg_DATA = img/* 20 | HelpHtmlimages_DATA = images/* 21 | HelpHtmlTxt_DATA = ../greetings.txt ../history.txt ../license.txt 22 | WebHtml_DATA = server/*.html server/*.js server/*.css 23 | WebHtmlimages_DATA = server/images/* 24 | # note: converted & normalized by 25 | # ico2xpm favicon.ico -o httrack.xpm 26 | # mogrify -format xpm -map /usr/share/doc/menu/examples/cmap.xpm httrack.xpm 27 | WebPixmap_DATA = server/div/*.xpm 28 | WebIcon16x16_DATA = server/div/16x16/*.png 29 | WebIcon32x32_DATA = server/div/32x32/*.png 30 | WebIcon48x48_DATA = server/div/48x48/*.png 31 | VFolderEntry_DATA = server/div/*.desktop 32 | 33 | EXTRA_DIST = $(HelpHtml_DATA) $(HelpHtmlimg_DATA) $(HelpHtmlimages_DATA) \ 34 | $(HelpHtmldiv_DATA) $(WebHtml_DATA) $(WebHtmlimages_DATA) \ 35 | $(WebPixmap_DATA) $(WebIcon16x16_DATA) $(WebIcon32x32_DATA) $(WebIcon48x48_DATA) \ 36 | $(VFolderEntry_DATA) \ 37 | httrack.css 38 | 39 | install-data-hook: 40 | if test ! -L $(DESTDIR)$(prefix)/share/httrack/html ; then \ 41 | ( cd $(DESTDIR)$(prefix)/share/httrack \ 42 | && $(LN_S) $(htmldir) html \ 43 | ) \ 44 | fi 45 | -------------------------------------------------------------------------------- /html/contact.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/contact.html -------------------------------------------------------------------------------- /html/div/search.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/sh 3 | 4 | # Simple indexing test using HTTrack 5 | # A "real" script/program would use advanced search, and 6 | # use dichotomy to find the word in the index.txt file 7 | # This script is really basic and NOT optimized, and 8 | # should not be used for professional purpose :) 9 | 10 | TESTSITE="http://localhost/" 11 | 12 | # Create an index if necessary 13 | if ! test -f "index.txt"; then 14 | echo "Building the index .." 15 | rm -rf test 16 | httrack --display "$TESTSITE" -%I -O test 17 | mv test/index.txt ./ 18 | fi 19 | 20 | # Convert crlf to lf 21 | if test "`head index.txt -n 1 | tr '\r' '#' | grep -c '#'`" = "1"; then 22 | echo "Converting index to Unix LF style (not CR/LF) .." 23 | mv -f index.txt index.txt.old 24 | cat index.txt.old|tr -d '\r' > index.txt 25 | fi 26 | 27 | keyword=- 28 | while test -n "$keyword"; do 29 | printf "Enter a keyword: " 30 | read keyword 31 | 32 | if test -n "$keyword"; then 33 | FOUNDK="`grep -niE \"^$keyword\" index.txt`" 34 | 35 | if test -n "$FOUNDK"; then 36 | if ! test `echo "$FOUNDK"|wc -l` = "1"; then 37 | # Multiple matches 38 | printf "Found multiple keywords: " 39 | echo "$FOUNDK"|cut -f2 -d':'|tr '\n' ' ' 40 | echo "" 41 | echo "Use keyword$ to find only one" 42 | else 43 | # One match 44 | N=`echo "$FOUNDK"|cut -f1 -d':'` 45 | PM=`tail +$N index.txt|grep -nE "\("|head -n 1` 46 | if ! echo "$PM"|grep "ignored">/dev/null; then 47 | M=`echo $PM|cut -f1 -d':'` 48 | echo "Found in:" 49 | cat index.txt | tail "+$N" | head -n "$M" | grep -E "[0-9]* " | cut -f2 -d' ' 50 | else 51 | echo "keyword ignored (too many hits)" 52 | fi 53 | fi 54 | else 55 | echo "not found" 56 | fi 57 | 58 | fi 59 | done 60 | 61 | -------------------------------------------------------------------------------- /html/httrack.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | margin: 0; padding: 0; margin-bottom: 15px; margin-top: 8px; 4 | background: #77b; 5 | } 6 | body, td { 7 | font: 0.96em/1.3em "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 8 | } 9 | 10 | #subTitle { 11 | background: #000; color: #fff; padding: 4px; font-weight: bold; 12 | } 13 | 14 | /* 15 | Width for "#siteNavigation td" based on number of buttons 16 | Six: 16.6% 17 | */ 18 | #siteNavigation td { width: 16.6%; } 19 | #siteNavigation a { 20 | display: block; padding: 2px; 21 | text-align: center; font-weight: bold; color: #448; /* font-size: 12px; */ background-color: #99c; 22 | } 23 | #siteNavigation a:link { text-decoration: none; } 24 | #siteNavigation a:visited { text-decoration: none; } 25 | #siteNavigation a:hover { text-decoration: none; background-color: #fff; color: #000; } 26 | #siteNavigation a:active { text-decoration: none; background-color: #ccc; } 27 | 28 | a:link { text-decoration: underline; color: #00f; } 29 | a:visited { text-decoration: underline; color: #000; } 30 | a:hover { text-decoration: underline; color: #c00; } 31 | a:active { text-decoration: underline; } 32 | 33 | 34 | 35 | #pageContent { 36 | clear: both; 37 | border-bottom: 6px solid #000; 38 | padding: 10px; padding-top: 20px; 39 | line-height: 1.65em; 40 | background-image: url(images/bg_rings.gif); 41 | background-repeat: no-repeat; 42 | background-position: top right; 43 | } 44 | #pageContent p { margin: 0; margin-bottom: 30px; } 45 | 46 | 47 | 48 | #pageContent, #siteNavigation { 49 | background-color: #ccd; 50 | } 51 | 52 | .tableWidth { min-width: 400px; } 53 | 54 | 55 | /* ----------------------------------- */ 56 | 57 | 58 | .imgLeft { float: left; margin-right: 10px; margin-bottom: 10px; } 59 | .imgRight { float: right; margin-left: 10px; margin-bottom: 10px; } 60 | 61 | hr { height: 1px; color: #000; background-color: #000; margin-bottom: 15px; } 62 | 63 | h1 { margin: 0; font-weight: bold; font-size: 2em; } 64 | h2 { margin: 0; font-weight: bold; font-size: 1.6em; } 65 | h3 { margin: 0; font-weight: bold; font-size: 1.3em; } 66 | 67 | .blak { background-color: #000; } 68 | .hide { display: none; } 69 | 70 | 71 | -------------------------------------------------------------------------------- /html/images/bg_rings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/images/bg_rings.gif -------------------------------------------------------------------------------- /html/images/header_title_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/images/header_title_4.gif -------------------------------------------------------------------------------- /html/images/screenshot_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/images/screenshot_01.jpg -------------------------------------------------------------------------------- /html/images/screenshot_01b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/images/screenshot_01b.jpg -------------------------------------------------------------------------------- /html/img/addurl1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/addurl1.gif -------------------------------------------------------------------------------- /html/img/addurl2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/addurl2.gif -------------------------------------------------------------------------------- /html/img/addurl3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/addurl3.gif -------------------------------------------------------------------------------- /html/img/addurl4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/addurl4.gif -------------------------------------------------------------------------------- /html/img/addurl5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/addurl5.gif -------------------------------------------------------------------------------- /html/img/backblue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/backblue.gif -------------------------------------------------------------------------------- /html/img/fade.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/fade.gif -------------------------------------------------------------------------------- /html/img/httrack.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/httrack.gif -------------------------------------------------------------------------------- /html/img/snap1_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap1_a.gif -------------------------------------------------------------------------------- /html/img/snap1_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap1_b.gif -------------------------------------------------------------------------------- /html/img/snap1_c.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap1_c.gif -------------------------------------------------------------------------------- /html/img/snap2_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap2_a.gif -------------------------------------------------------------------------------- /html/img/snap2_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap2_b.gif -------------------------------------------------------------------------------- /html/img/snap3_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap3_a.gif -------------------------------------------------------------------------------- /html/img/snap4_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap4_a.gif -------------------------------------------------------------------------------- /html/img/snap5_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap5_a.gif -------------------------------------------------------------------------------- /html/img/snap9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9.gif -------------------------------------------------------------------------------- /html/img/snap9_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_a.gif -------------------------------------------------------------------------------- /html/img/snap9_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_b.gif -------------------------------------------------------------------------------- /html/img/snap9_c.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_c.gif -------------------------------------------------------------------------------- /html/img/snap9_d.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d.gif -------------------------------------------------------------------------------- /html/img/snap9_d2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d2.gif -------------------------------------------------------------------------------- /html/img/snap9_d3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d3.gif -------------------------------------------------------------------------------- /html/img/snap9_d4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d4.gif -------------------------------------------------------------------------------- /html/img/snap9_d5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d5.gif -------------------------------------------------------------------------------- /html/img/snap9_d6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d6.gif -------------------------------------------------------------------------------- /html/img/snap9_d7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d7.gif -------------------------------------------------------------------------------- /html/img/snap9_d8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_d8.gif -------------------------------------------------------------------------------- /html/img/snap9_e.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_e.gif -------------------------------------------------------------------------------- /html/img/snap9_f.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_f.gif -------------------------------------------------------------------------------- /html/img/snap9_g.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_g.gif -------------------------------------------------------------------------------- /html/img/snap9_g2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_g2.gif -------------------------------------------------------------------------------- /html/img/snap9_g3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_g3.gif -------------------------------------------------------------------------------- /html/img/snap9_h.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_h.gif -------------------------------------------------------------------------------- /html/img/snap9_i.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_i.gif -------------------------------------------------------------------------------- /html/img/snap9_j.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_j.gif -------------------------------------------------------------------------------- /html/img/snap9_k.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/img/snap9_k.gif -------------------------------------------------------------------------------- /html/server/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | '${projname}' - HTTrack Website Copier 8 | 9 | 10 | 11 | 12 | 13 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
HTTrack Website Copier
34 | 35 | 36 | 37 | 38 | 39 |
${LANG_OSFWB}
40 | 41 | 42 | 90 | 91 |
43 | 44 | 45 | 87 | 88 |
46 | 47 | 48 | 84 | 85 |
49 | 50 | 51 | 52 | 55 |
53 |

${LANG_K2}

54 |
56 | 57 |
58 | 59 | 60 | 77 |
61 | 62 |
 63 | ${LANG_K1}
 64 | 
 65 | ${LANG_K3} : ${HTTRACK_WEB}
 66 | 
67 | 68 |
69 | 70 |
71 | 74 |
75 | 76 |
78 | 79 |

80 | 81 | 82 | 83 |
86 |
89 |
92 | 93 | 94 | 95 | 96 | 97 |
98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /html/server/div/16x16/httrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/server/div/16x16/httrack.png -------------------------------------------------------------------------------- /html/server/div/32x32/httrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/server/div/32x32/httrack.png -------------------------------------------------------------------------------- /html/server/div/48x48/httrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/server/div/48x48/httrack.png -------------------------------------------------------------------------------- /html/server/div/WebHTTrack-Websites.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Categories=Network; 5 | Terminal=false 6 | Name=Browse Mirrored Websites 7 | Comment=Browse Websites Mirrored by WebHTTrack 8 | Keywords=browse mirrored; 9 | Exec=webhttrack browse 10 | Icon=httrack 11 | -------------------------------------------------------------------------------- /html/server/div/WebHTTrack.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Categories=Network; 5 | Terminal=false 6 | Name=WebHTTrack Website Copier 7 | Comment=Copy websites to your computer 8 | Keywords=copy website;backup website;capture website;offline browser;surf offline;mirror;mirroring;archiving;forensics;crawl;preservation; 9 | Exec=webhttrack 10 | Icon=httrack 11 | -------------------------------------------------------------------------------- /html/server/div/httrack16x16.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *httrack__[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "16 16 3 1", 5 | " c #000000000000", 6 | ". c #000000008080", 7 | "X c #808080808080", 8 | /* pixels */ 9 | "X. XXXXXX .X", 10 | "X. XXXXXX .X", 11 | "X. XXXXXX .X", 12 | "X. XXXXXX .X", 13 | "X. XXXXXX .X", 14 | "X. XXXXXX .X", 15 | "X. .X", 16 | "X. .X", 17 | "X. .X", 18 | "X. XXXXXX .X", 19 | "X. XXXXXX .X", 20 | "X. XXXXXX .X", 21 | "X. XXXXXX .X", 22 | "X. XXXXXX .X", 23 | "X. XXXXXX .X", 24 | "X. XXXXXX .X" 25 | }; 26 | -------------------------------------------------------------------------------- /html/server/div/httrack32x32.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *httrack__[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "32 32 7 1", 5 | " c #040404040404", 6 | ". c #0C0C0C0C0C0C", 7 | "X c #161616161616", 8 | "o c #333333333333", 9 | "O c #333333336666", 10 | "+ c #666666669999", 11 | "@ c #99999999CCCC", 12 | /* pixels */ 13 | "@@+ @@@@@@@@@@@+ @@@", 14 | "@@+ @@@@@@@@@@@+ @@@", 15 | "@@+ @@@@@@@@@@@+ @@@", 16 | "@@+ @@@@@@@@@@@+ @@@", 17 | "@@+ @@@@@@@@@@@+ @@@", 18 | "@@+ @@@@@@@@@@@+ @@@", 19 | "@@+ @@@@@@@@@@@+ @@@", 20 | "@@+ @@@@@@@@@@@+ @@@", 21 | "@@+ @@@@@@@@@@@+ @@@", 22 | "@@+ @@@@@@@@@@@+ @@@", 23 | "@@+ @@@@@@@@@@@+ @@@", 24 | "@@+ OOOOOOOOOOOo @@@", 25 | "@@+ @@@", 26 | "@@+ @@@", 27 | "@@+ @@@", 28 | "@@+ @@@", 29 | "@@+ @@@", 30 | "@@+ @@@", 31 | "@@+ XXXXXXXXXXX. @@@", 32 | "@@+ @@@@@@@@@@@+ @@@", 33 | "@@+ @@@@@@@@@@@+ @@@", 34 | "@@+ @@@@@@@@@@@+ @@@", 35 | "@@+ @@@@@@@@@@@+ @@@", 36 | "@@+ @@@@@@@@@@@+ @@@", 37 | "@@+ @@@@@@@@@@@+ @@@", 38 | "@@+ @@@@@@@@@@@+ @@@", 39 | "@@+ @@@@@@@@@@@+ @@@", 40 | "@@+ @@@@@@@@@@@+ @@@", 41 | "@@+ @@@@@@@@@@@+ @@@", 42 | "@@+ @@@@@@@@@@@+ @@@", 43 | "@@+ @@@@@@@@@@@+ @@@", 44 | "@@+ @@@@@@@@@@@+ @@@" 45 | }; 46 | -------------------------------------------------------------------------------- /html/server/div/httrack48x48.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *httrack__[] = { 3 | /* columns rows colors chars-per-pixel */ 4 | "48 48 34 1", 5 | " c #040404040404", 6 | ". c #080808080808", 7 | "X c #0C0C0C0C0C0C", 8 | "o c #111111111111", 9 | "O c #161616161616", 10 | "+ c #1C1C1C1C1C1C", 11 | "@ c #222222222222", 12 | "# c #292929292929", 13 | "$ c #333333333333", 14 | "% c #393939393939", 15 | "& c #333333336666", 16 | "* c #424242424242", 17 | "= c #4D4D4D4D4D4D", 18 | "- c #555555555555", 19 | "; c #5F5F5F5F5F5F", 20 | ": c #666666666666", 21 | "> c #777777777777", 22 | ", c #666666669999", 23 | "< c #66666666CCCC", 24 | "1 c #808080808080", 25 | "2 c #868686868686", 26 | "3 c #969696969696", 27 | "4 c #999999999999", 28 | "5 c #A0A0A0A0A4A4", 29 | "6 c #B2B2B2B2B2B2", 30 | "7 c #99999999CCCC", 31 | "8 c #C0C0C0C0C0C0", 32 | "9 c #CCCCCCCCCCCC", 33 | "0 c #D7D7D7D7D7D7", 34 | "q c #DDDDDDDDDDDD", 35 | "w c #E3E3E3E3E3E3", 36 | "e c #EAEAEAEAEAEA", 37 | "r c #F1F1F1F1F1F1", 38 | "t c None", 39 | /* pixels */ 40 | "77777777777777777777777777777777777777777<,,<777", 41 | ";&,77,&-<-&&&&&,-&&&&&,777777777777777777<$$<777", 42 | "# ,77, +X;+34%21X", 73 | ";; -$ 2;tt*qqO:00%1qtq6t8 99q 40e:Xqw=4$rt:9w-", 74 | "$1 1- 4*4=@66$5%:$1%9%5-$ $8#=O9$:8X6:24$6=+6;4", 75 | "O4 51 4*> O4>%5O $1 6 4O >- *2 X0X5O54$3 6O5", 76 | " 6 64O2*4-@42+3: $1 6 5:* 3@ :- 5#5O44$6-@6O4", 77 | " 6O46$>*re*08 =w*$1 6 6e6 5X 2$ 2%6>14$ee;6:2", 78 | " 2=15:=*96$ee% 48$1 6 561 5X 2# 1%wq@4$06*0w$", 79 | " :4-24@*> O4:2 X9*1 6 4O 5O 2% 2$8* 4$3 88 ", 80 | " %w#:0X*> O4#3 4;1 6 4O 3$ :; 6+5 4$3 68X", 81 | " OrO%0 *> O4#24X3;1 6 4+ >1 *6 X8X5 4$4 64#", 82 | " 6 +5 *61#62:6:8*1 6 52: #w=:Xq:13X5 4$81$6;:", 83 | " > : *tt*e0+:r8$1 6 6t8 8eq 3rr%X5 4$rt:6#4", 84 | " @ @ +::O;# O5*O# * *:* $6: +61 % %O;:@% %", 85 | " ", 86 | " ", 87 | " " 88 | }; 89 | -------------------------------------------------------------------------------- /html/server/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | '${projname}' - HTTrack Website Copier 8 | 9 | 10 | 11 | 12 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
HTTrack Website Copier
33 | 34 | 35 | 36 | 37 | 38 |
${LANG_OSFWB}
39 | 40 | 41 | 70 | 71 |
42 | 43 | 44 | 67 | 68 |
45 | 46 | 47 | 64 | 65 |
48 | 49 | 50 |

51 | ${LANG_FATALERR}: 52 |

53 |
54 | 55 | ${error} 56 | 57 | 58 |
59 | ${LANG_CANCLSWND}. 60 | 61 | 62 | 63 |
66 |
69 |
72 | 73 | 74 | 75 | 76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /html/server/exit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | '${projname}' - HTTrack Website Copier 8 | 9 | 22 | 23 | 24 | 25 | 26 | ${LANG_SERVEND}.  27 | 28 | ${LANG_CANCLSWND}. 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /html/server/file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | '${projname}' - HTTrack Website Copier 8 | 9 | 10 | 11 | 12 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
HTTrack Website Copier
33 | 34 | 35 | 36 | 37 | 38 |
${LANG_OSFWB}
39 | 40 | 41 | 94 | 95 |
42 | 43 | 44 | 91 | 92 |
45 | 46 | 47 | 88 | 89 |
48 | 49 | 50 | 51 | 54 |
52 |

${LANG_O1}

53 |
55 | 56 |
57 | 58 | 59 | 68 | 69 | 80 | 81 |
60 | 65 | ${LANG_D8} 66 | 67 |
70 | ${do:loadhash} 71 |
72 | ${LANG_S11b} 73 | 78 |
79 |
82 | 83 |

84 | 85 | 86 | 87 |
90 |
93 |
96 | 97 | 98 | 99 | 100 | 101 |
102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /html/server/help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | '${projname}' - HTTrack Website Copier 8 | 9 | 10 | 11 | 12 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
HTTrack Website Copier
33 | 34 | 35 | 36 | 37 | 38 |
${LANG_OSFWB}
39 | 40 | 41 | 101 | 102 |
42 | 43 | 44 | 98 | 99 |
45 | 46 | 47 | 95 | 96 |
48 | 49 | 50 | 51 | 54 |
52 |

${LANG_O1}

53 |
55 | 56 |
57 | 58 | 59 | 66 | 67 | 75 | 76 | ${/* show help only if available */} 77 | ${do:if-file-exists:html/index.html} 78 | 86 | ${do:end-if} 87 | 88 |
60 | 63 | ${LANG_O16}... 64 | 65 |
68 | 72 | ${LANG_O17}... 73 | 74 |
79 | 83 | ${LANG_P16} 84 | 85 |
89 | 90 |

91 | 92 | 93 | 94 |
97 |
100 |
103 | 104 | 105 | 106 | 107 | 108 |
109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /html/server/images/bg_rings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/server/images/bg_rings.gif -------------------------------------------------------------------------------- /html/server/images/fade.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/server/images/fade.gif -------------------------------------------------------------------------------- /html/server/images/header_title_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/html/server/images/header_title_4.gif -------------------------------------------------------------------------------- /html/server/ping.js: -------------------------------------------------------------------------------- 1 | // Function aimed to ping the webhttrack server regularly to keep it alive 2 | // If the browser window is closed, the server will eventually shutdown 3 | function ping_server() { 4 | var iframe = document.getElementById('pingiframe'); 5 | if (iframe && iframe.src) { 6 | iframe.src = iframe.src; 7 | setTimeout(ping_server, 30000); 8 | } 9 | } 10 | 11 | // Create an invisible iframe to hold the server ping result 12 | // Only modern browsers will support that, but old browsers are compatible 13 | // with the legacy "wait for browser PID" mode 14 | if (document && document.createElement && document.body 15 | && document.body.appendChild && document.getElementById) { 16 | var iframe = document.createElement('iframe'); 17 | if (iframe) { 18 | iframe.id = 'pingiframe'; 19 | iframe.style.display = "none"; 20 | iframe.style.visibility = "hidden"; 21 | iframe.width = iframe.height = 0; 22 | iframe.src = "/ping"; 23 | document.body.appendChild(iframe); 24 | ping_server(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /html/server/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; padding: 0; margin-bottom: 15px; margin-top: 8px; 3 | background: #77b; 4 | } 5 | body, td { 6 | font: 14px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 7 | } 8 | 9 | #subTitle { 10 | background: #000; color: #fff; padding: 4px; font-weight: bold; 11 | } 12 | 13 | .tabCtrl { 14 | background: #000; color: #fff; padding: 4px; font-weight: bold; 15 | } 16 | 17 | #siteNavigation a, #siteNavigation .current { 18 | font-weight: bold; color: #448; 19 | } 20 | #siteNavigation a:link { text-decoration: none; } 21 | #siteNavigation a:visited { text-decoration: none; } 22 | 23 | #siteNavigation .current { background-color: #ccd; } 24 | 25 | #siteNavigation a:hover { text-decoration: none; background-color: #fff; color: #000; } 26 | #siteNavigation a:active { text-decoration: none; background-color: #ccc; } 27 | 28 | 29 | a:link { text-decoration: underline; color: #00f; } 30 | a:visited { text-decoration: underline; color: #000; } 31 | a:hover { text-decoration: underline; color: #c00; } 32 | a:active { text-decoration: underline; } 33 | 34 | #pageContent { 35 | clear: both; 36 | border-bottom: 6px solid #000; 37 | padding: 10px; padding-top: 20px; 38 | line-height: 1.65em; 39 | background-image: url(images/bg_rings.gif); 40 | background-repeat: no-repeat; 41 | background-position: top right; 42 | } 43 | 44 | #pageContent, #siteNavigation { 45 | background-color: #ccd; 46 | } 47 | 48 | 49 | .imgLeft { float: left; margin-right: 10px; margin-bottom: 10px; } 50 | .imgRight { float: right; margin-left: 10px; margin-bottom: 10px; } 51 | 52 | hr { height: 1px; color: #000; background-color: #000; margin-bottom: 15px; } 53 | 54 | h1 { margin: 0; font-weight: bold; font-size: 2em; } 55 | h2 { margin: 0; font-weight: bold; font-size: 1.6em; } 56 | h3 { margin: 0; font-weight: bold; font-size: 1.3em; } 57 | h4 { margin: 0; font-weight: bold; font-size: 1.18em; } 58 | 59 | .blak { background-color: #000; } 60 | .hide { display: none; } 61 | .tableWidth { min-width: 400px; } 62 | 63 | .tblRegular { border-collapse: collapse; } 64 | .tblRegular td { padding: 6px; background-image: url(images/fade.gif); border: 2px solid #99c; } 65 | .tblHeaderColor, .tblHeaderColor td { background: #99c; } 66 | .tblNoBorder td { border: 0; } 67 | -------------------------------------------------------------------------------- /html/start.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HTTrack documentation 5 | 12 | 13 | 14 | HTTrack documentation 15 | 16 | 17 | -------------------------------------------------------------------------------- /httrack-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Documentation 5 | 6 | 7 | 8 | Documentation 9 | 10 | 11 | -------------------------------------------------------------------------------- /lang.indexes: -------------------------------------------------------------------------------- 1 | bg:27 2 | es:3 3 | cs:21 4 | zh_tw:14 5 | zh:13 6 | hr:29 7 | da:15 8 | de:4 9 | et:16 10 | en:1 11 | fi:28 12 | fr:2 13 | el:26 14 | it:9 15 | ja:19 16 | mk:18 17 | hu:11 18 | nl:5 19 | no:23 20 | pl:6 21 | pt_br:12 22 | pt:7 23 | ro:25 24 | ru:8 25 | sk:20 26 | si:24 27 | sv:17 28 | tr:10 29 | uk:22 30 | uz:30 31 | -------------------------------------------------------------------------------- /lang/Bulgarian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Bulgarian.txt -------------------------------------------------------------------------------- /lang/Castellano.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Castellano.txt -------------------------------------------------------------------------------- /lang/Cesky.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Cesky.txt -------------------------------------------------------------------------------- /lang/Chinese-BIG5.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Chinese-BIG5.txt -------------------------------------------------------------------------------- /lang/Chinese-Simplified.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Chinese-Simplified.txt -------------------------------------------------------------------------------- /lang/Croatian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Croatian.txt -------------------------------------------------------------------------------- /lang/Dansk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Dansk.txt -------------------------------------------------------------------------------- /lang/Deutsch.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Deutsch.txt -------------------------------------------------------------------------------- /lang/Eesti.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Eesti.txt -------------------------------------------------------------------------------- /lang/Finnish.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Finnish.txt -------------------------------------------------------------------------------- /lang/Francais.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Francais.txt -------------------------------------------------------------------------------- /lang/Greek.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Greek.txt -------------------------------------------------------------------------------- /lang/Italiano.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Italiano.txt -------------------------------------------------------------------------------- /lang/Japanese.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Japanese.txt -------------------------------------------------------------------------------- /lang/Macedonian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Macedonian.txt -------------------------------------------------------------------------------- /lang/Magyar.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Magyar.txt -------------------------------------------------------------------------------- /lang/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | langdir = $(datadir)/httrack/lang 3 | lang_DATA = *.txt 4 | langrootdir = $(datadir)/httrack 5 | langroot_DATA = ../lang.def ../lang.indexes 6 | 7 | EXTRA_DIST = $(lang_DATA) $(langroot_DATA) 8 | 9 | #dist-hook: 10 | -------------------------------------------------------------------------------- /lang/Nederlands.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Nederlands.txt -------------------------------------------------------------------------------- /lang/Norsk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Norsk.txt -------------------------------------------------------------------------------- /lang/Polski.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Polski.txt -------------------------------------------------------------------------------- /lang/Portugues-Brasil.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Portugues-Brasil.txt -------------------------------------------------------------------------------- /lang/Portugues.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Portugues.txt -------------------------------------------------------------------------------- /lang/Romanian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Romanian.txt -------------------------------------------------------------------------------- /lang/Russian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Russian.txt -------------------------------------------------------------------------------- /lang/Slovak.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Slovak.txt -------------------------------------------------------------------------------- /lang/Slovenian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Slovenian.txt -------------------------------------------------------------------------------- /lang/Svenska.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Svenska.txt -------------------------------------------------------------------------------- /lang/Turkish.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Turkish.txt -------------------------------------------------------------------------------- /lang/Ukrainian.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Ukrainian.txt -------------------------------------------------------------------------------- /lang/Uzbek.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/lang/Uzbek.txt -------------------------------------------------------------------------------- /libtest/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | exemplesdir = $(datadir)/httrack/libtest 3 | exemples_DATA = *.c *.h *.txt 4 | EXTRA_DIST = $(exemples_DATA) libtest.mak libtest.vcproj 5 | 6 | AM_CPPFLAGS = \ 7 | @DEFAULT_CFLAGS@ \ 8 | @THREADS_CFLAGS@ \ 9 | @V6_FLAG@ \ 10 | @LFS_FLAG@ \ 11 | -DPREFIX=\""$(prefix)"\" \ 12 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ 13 | -DDATADIR=\""$(datadir)"\" \ 14 | -DLIBDIR=\""$(libdir)"\" 15 | 16 | AM_CPPFLAGS += -I../src 17 | AM_LDFLAGS = -L../src 18 | 19 | # Examples 20 | libbaselinks_la_SOURCES = callbacks-example-baselinks.c 21 | libbaselinks_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 22 | libbaselinks_la_LDFLAGS = -version-info 1:0:0 23 | libchangecontent_la_SOURCES = callbacks-example-changecontent.c 24 | libchangecontent_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 25 | libchangecontent_la_LDFLAGS = -version-info 1:0:0 26 | libcontentfilter_la_SOURCES = callbacks-example-contentfilter.c 27 | libcontentfilter_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 28 | libcontentfilter_la_LDFLAGS = -version-info 1:0:0 29 | libdisplayheader_la_SOURCES = callbacks-example-displayheader.c 30 | libdisplayheader_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 31 | libdisplayheader_la_LDFLAGS = -version-info 1:0:0 32 | libfilename2_la_SOURCES = callbacks-example-filename2.c 33 | libfilename2_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 34 | libfilename2_la_LDFLAGS = -version-info 1:0:0 35 | libfilename_la_SOURCES = callbacks-example-filename.c 36 | libfilename_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 37 | libfilename_la_LDFLAGS = -version-info 1:0:0 38 | libfilenameiisbug_la_SOURCES = callbacks-example-filenameiisbug.c 39 | libfilenameiisbug_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 40 | libfilenameiisbug_la_LDFLAGS = -version-info 1:0:0 41 | liblistlinks_la_SOURCES = callbacks-example-listlinks.c 42 | liblistlinks_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 43 | liblistlinks_la_LDFLAGS = -version-info 1:0:0 44 | liblog_la_SOURCES = callbacks-example-log.c 45 | liblog_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 46 | liblog_la_LDFLAGS = -version-info 1:0:0 47 | libsimple_la_SOURCES = callbacks-example-simple.c 48 | libsimple_la_LIBADD = $(THREADS_LIBS) $(SOCKET_LIBS) $(top_builddir)/src/libhttrack.la 49 | libsimple_la_LDFLAGS = -version-info 1:0:0 50 | pkglib_LTLIBRARIES = libbaselinks.la libchangecontent.la libcontentfilter.la libdisplayheader.la libfilename2.la libfilename.la libfilenameiisbug.la liblistlinks.la liblog.la libsimple.la 51 | -------------------------------------------------------------------------------- /libtest/callbacks-example-changecontent.c: -------------------------------------------------------------------------------- 1 | /* 2 | HTTrack external callbacks example : display all incoming request headers 3 | Example of _init and _exit call (httrack >> 3.31) 4 | .c file 5 | 6 | How to build: (callback.so or callback.dll) 7 | With GNU-GCC: 8 | gcc -O -g3 -Wall -D_REENTRANT -shared -o mycallback.so callbacks-example.c -lhttrack2 9 | With MS-Visual C++: 10 | cl -LD -nologo -W3 -Zi -Zp4 -DWIN32 -Fe"mycallback.dll" callbacks-example.c libhttrack.lib 11 | 12 | Note: the httrack library linker option is only necessary when using libhttrack's functions inside the callback 13 | 14 | How to use: 15 | httrack --wrapper mycallback .. 16 | */ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | /* Standard httrack module includes */ 23 | #include "httrack-library.h" 24 | #include "htsopt.h" 25 | #include "htsdefines.h" 26 | 27 | /* Local function definitions */ 28 | static int postprocess(t_hts_callbackarg * carg, httrackp * opt, char **html, 29 | int *len, const char *url_address, const char *url_file); 30 | 31 | /* external functions */ 32 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv); 33 | 34 | /* 35 | module entry point 36 | */ 37 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv) { 38 | const char *arg = strchr(argv, ','); 39 | 40 | if (arg != NULL) 41 | arg++; 42 | 43 | /* Plug callback functions */ 44 | CHAIN_FUNCTION(opt, postprocess, postprocess, NULL); 45 | 46 | return 1; /* success */ 47 | } 48 | 49 | static int postprocess(t_hts_callbackarg * carg, httrackp * opt, char **html, 50 | int *len, const char *url_address, 51 | const char *url_file) { 52 | char *old = *html; 53 | 54 | /* Call parent functions if multiple callbacks are chained. */ 55 | if (CALLBACKARG_PREV_FUN(carg, postprocess) != NULL) { 56 | if (CALLBACKARG_PREV_FUN(carg, postprocess) 57 | (CALLBACKARG_PREV_CARG(carg), opt, html, len, url_address, url_file)) { 58 | /* Modified *html */ 59 | old = *html; 60 | } 61 | } 62 | 63 | /* Process */ 64 | *html = strdup(*html); 65 | hts_free(old); 66 | 67 | return 1; 68 | } 69 | -------------------------------------------------------------------------------- /libtest/callbacks-example-displayheader.c: -------------------------------------------------------------------------------- 1 | /* 2 | HTTrack external callbacks example : display all incoming request headers 3 | Example of _init and _exit call (httrack >> 3.31) 4 | .c file 5 | 6 | How to build: (callback.so or callback.dll) 7 | With GNU-GCC: 8 | gcc -O -g3 -Wall -D_REENTRANT -shared -o mycallback.so callbacks-example.c -lhttrack2 9 | With MS-Visual C++: 10 | cl -LD -nologo -W3 -Zi -Zp4 -DWIN32 -Fe"mycallback.dll" callbacks-example.c libhttrack.lib 11 | 12 | Note: the httrack library linker option is only necessary when using libhttrack's functions inside the callback 13 | 14 | How to use: 15 | httrack --wrapper mycallback .. 16 | */ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | /* Standard httrack module includes */ 23 | #include "httrack-library.h" 24 | #include "htsopt.h" 25 | #include "htsdefines.h" 26 | 27 | /* Local function definitions */ 28 | static int process(t_hts_callbackarg * carg, httrackp * opt, char *buff, 29 | const char *adr, const char *fil, const char *referer_adr, 30 | const char *referer_fil, htsblk * incoming); 31 | 32 | /* external functions */ 33 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv); 34 | 35 | /* 36 | module entry point 37 | */ 38 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv) { 39 | const char *arg = strchr(argv, ','); 40 | 41 | if (arg != NULL) 42 | arg++; 43 | 44 | /* Plug callback functions */ 45 | CHAIN_FUNCTION(opt, receivehead, process, NULL); 46 | 47 | return 1; /* success */ 48 | } 49 | 50 | static int process(t_hts_callbackarg * carg, httrackp * opt, char *buff, 51 | const char *adr, const char *fil, const char *referer_adr, 52 | const char *referer_fil, htsblk * incoming) { 53 | 54 | /* Call parent functions if multiple callbacks are chained. */ 55 | if (CALLBACKARG_PREV_FUN(carg, receivehead) != NULL) { 56 | if (!CALLBACKARG_PREV_FUN(carg, receivehead) 57 | (CALLBACKARG_PREV_CARG(carg), opt, buff, adr, fil, referer_adr, 58 | referer_fil, incoming)) { 59 | return 0; /* Abort */ 60 | } 61 | } 62 | 63 | /* Process */ 64 | printf("[ %s%s ]\n%s\n", adr, fil, buff); 65 | 66 | return 1; /* success */ 67 | } 68 | -------------------------------------------------------------------------------- /libtest/callbacks-example-filename.c: -------------------------------------------------------------------------------- 1 | /* 2 | HTTrack external callbacks example : changing the destination filename 3 | .c file 4 | 5 | How to build: (callback.so or callback.dll) 6 | With GNU-GCC: 7 | gcc -O -g3 -Wall -D_REENTRANT -shared -o mycallback.so callbacks-example.c -lhttrack2 8 | With MS-Visual C++: 9 | cl -LD -nologo -W3 -Zi -Zp4 -DWIN32 -Fe"mycallback.dll" callbacks-example.c libhttrack.lib 10 | 11 | Note: the httrack library linker option is only necessary when using libhttrack's functions inside the callback 12 | 13 | How to use: 14 | httrack --wrapper mycallback .. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | /* Standard httrack module includes */ 22 | #include "httrack-library.h" 23 | #include "htsopt.h" 24 | #include "htsdefines.h" 25 | 26 | /* Local function definitions */ 27 | static int mysavename(t_hts_callbackarg * carg, httrackp * opt, 28 | const char *adr_complete, const char *fil_complete, 29 | const char *referer_adr, const char *referer_fil, 30 | char *save); 31 | 32 | /* external functions */ 33 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv); 34 | 35 | /* Options settings */ 36 | #include "htsopt.h" 37 | 38 | /* TOLOWER */ 39 | #define TOLOWER_(a) (a >= 'A' && a <= 'Z') ? (a + ('a' - 'A')) : a 40 | #define TOLOWER(a) ( TOLOWER_( (a) ) ) 41 | 42 | /* 43 | This sample just changes the destination filenames to ROT-13 equivalent ; that is, 44 | a -> n 45 | b -> o 46 | c -> p 47 | d -> q 48 | .. 49 | n -> a 50 | o -> b 51 | .. 52 | 53 | -> 54 | This sample can be improved, for example, to make a map of a website. 55 | */ 56 | 57 | /* 58 | module entry point 59 | */ 60 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv) { 61 | const char *arg = strchr(argv, ','); 62 | 63 | if (arg != NULL) 64 | arg++; 65 | 66 | /* Plug callback functions */ 67 | CHAIN_FUNCTION(opt, savename, mysavename, NULL); 68 | 69 | return 1; /* success */ 70 | } 71 | 72 | static int mysavename(t_hts_callbackarg * carg, httrackp * opt, 73 | const char *adr_complete, const char *fil_complete, 74 | const char *referer_adr, const char *referer_fil, 75 | char *save) { 76 | char *a; 77 | 78 | /* Call parent functions if multiple callbacks are chained. */ 79 | if (CALLBACKARG_PREV_FUN(carg, savename) != NULL) { 80 | if (!CALLBACKARG_PREV_FUN(carg, savename) 81 | (CALLBACKARG_PREV_CARG(carg), opt, adr_complete, fil_complete, 82 | referer_adr, referer_fil, save)) { 83 | return 0; /* Abort */ 84 | } 85 | } 86 | 87 | /* Process */ 88 | for(a = save; *a != 0; a++) { 89 | char c = TOLOWER(*a); 90 | 91 | if (c >= 'a' && c <= 'z') 92 | *a = (((c - 'a') + 13) % 26) + 'a'; // ROT-13 93 | } 94 | 95 | return 1; /* success */ 96 | } 97 | -------------------------------------------------------------------------------- /libtest/callbacks-example-filenameiisbug.c: -------------------------------------------------------------------------------- 1 | /* 2 | HTTrack external callbacks example : changing folder names ending with ".com" 3 | with ".c0m" as a workaround of IIS bug (see KB 275601) 4 | 5 | How to build: (callback.so or callback.dll) 6 | With GNU-GCC: 7 | gcc -O -g3 -Wall -D_REENTRANT -shared -o mycallback.so callbacks-example.c -lhttrack2 8 | With MS-Visual C++: 9 | cl -LD -nologo -W3 -Zi -Zp4 -DWIN32 -Fe"mycallback.dll" callbacks-example.c libhttrack.lib 10 | 11 | Note: the httrack library linker option is only necessary when using libhttrack's functions inside the callback 12 | */ 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | /* Standard httrack module includes */ 19 | #include "httrack-library.h" 20 | #include "htsopt.h" 21 | #include "htsdefines.h" 22 | 23 | /* Function definitions */ 24 | static int mysavename(t_hts_callbackarg * carg, httrackp * opt, 25 | const char *adr_complete, const char *fil_complete, 26 | const char *referer_adr, const char *referer_fil, 27 | char *save); 28 | 29 | /* external functions */ 30 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv); 31 | 32 | /* 33 | module entry point 34 | */ 35 | EXTERNAL_FUNCTION int hts_plug(httrackp * opt, const char *argv) { 36 | const char *arg = strchr(argv, ','); 37 | 38 | if (arg != NULL) 39 | arg++; 40 | CHAIN_FUNCTION(opt, savename, mysavename, NULL); 41 | return 1; /* success */ 42 | } 43 | 44 | /* 45 | Replaces all "offending" IIS extensions (exe, dll..) with "nice" ones 46 | */ 47 | static int mysavename(t_hts_callbackarg * carg, httrackp * opt, 48 | const char *adr_complete, const char *fil_complete, 49 | const char *referer_adr, const char *referer_fil, 50 | char *save) { 51 | static const char *iisBogus[] = { ".com", ".exe", ".dll", ".sh", NULL }; 52 | static const char *iisBogusReplace[] = { ".c0m", ".ex3", ".dl1", ".5h", NULL }; /* MUST be the same sizes */ 53 | char *a; 54 | 55 | /* Call parent functions if multiple callbacks are chained. */ 56 | if (CALLBACKARG_PREV_FUN(carg, savename) != NULL) { 57 | if (!CALLBACKARG_PREV_FUN(carg, savename) 58 | (CALLBACKARG_PREV_CARG(carg), opt, adr_complete, fil_complete, 59 | referer_adr, referer_fil, save)) { 60 | return 0; /* Abort */ 61 | } 62 | } 63 | 64 | /* Process */ 65 | for(a = save; *a != '\0'; a++) { 66 | int i; 67 | 68 | for(i = 0; iisBogus[i] != NULL; i++) { 69 | int j; 70 | 71 | for(j = 0; iisBogus[i][j] == a[j] && iisBogus[i][j] != '\0'; j++) ; 72 | if (iisBogus[i][j] == '\0' 73 | && (a[j] == '\0' || a[j] == '/' || a[j] == '\\')) { 74 | strncpy(a, iisBogusReplace[i], strlen(iisBogusReplace[i])); 75 | break; 76 | } 77 | } 78 | } 79 | 80 | return 1; /* success */ 81 | } 82 | -------------------------------------------------------------------------------- /libtest/libtest.mak: -------------------------------------------------------------------------------- 1 | # Makefile 2 | 3 | OBJDIR = ./Release/ 4 | PATH = $(DEVSTU)\vc\bin;$(DEVSTU)\sharedide\bin;$(PATH) 5 | INCLUDES = /I "." /I ".." /I "../src" /I "$(DEVSTU)\vc\include" /I"../../openssl-1.0.1j\include\openssl" 6 | LIB_FLAGS = /link /LIBPATH:"L:\HTTrack\httrack\src_win\libhttrack" /LIBPATH:"L:\HTTrack\httrack\libhttrack" 7 | COMMON_FLAGS = /W3 /O2 /Fo"$(OBJDIR)" /Fd"$(OBJDIR)" /Fa"$(OBJDIR)" $(INCLUDES) 8 | CPP_FLAGS = /LD $(COMMON_FLAGS) libhttrack.lib 9 | BIN_FLAGS = /link /LIBPATH:"C:\temp\Debuglib" 10 | 11 | all: 12 | cl $(CPP_FLAGS) \ 13 | callbacks-example-simple.c -Fe$(OBJDIR)callbacks-example-simple.dll \ 14 | $(LIB_FLAGS) 15 | cl $(CPP_FLAGS) \ 16 | callbacks-example-log.c -Fe$(OBJDIR)callbacks-example-log.dll \ 17 | $(LIB_FLAGS) 18 | cl $(CPP_FLAGS) \ 19 | callbacks-example-baselinks.c -Fe$(OBJDIR)callbacks-example-baselinks.dll \ 20 | $(LIB_FLAGS) 21 | cl $(CPP_FLAGS) \ 22 | callbacks-example-contentfilter.c -Fe$(OBJDIR)callbacks-example-contentfilter.dll \ 23 | $(LIB_FLAGS) 24 | cl $(CPP_FLAGS) \ 25 | callbacks-example-displayheader.c -Fe$(OBJDIR)callbacks-example-displayheader.dll \ 26 | $(LIB_FLAGS) 27 | cl $(CPP_FLAGS) \ 28 | callbacks-example-filename.c -Fe$(OBJDIR)callbacks-example-filename.dll \ 29 | $(LIB_FLAGS) 30 | cl $(CPP_FLAGS) \ 31 | callbacks-example-filename2.c -Fe$(OBJDIR)callbacks-example-filename2.dll \ 32 | $(LIB_FLAGS) 33 | cl $(CPP_FLAGS) \ 34 | callbacks-example-filenameiisbug.c -Fe$(OBJDIR)callbacks-example-filenameiisbug.dll \ 35 | $(LIB_FLAGS) 36 | cl $(CPP_FLAGS) \ 37 | callbacks-example-changecontent.c -Fe$(OBJDIR)callbacks-example-changecontent.dll \ 38 | $(LIB_FLAGS) 39 | cl $(CPP_FLAGS) \ 40 | callbacks-example-listlinks.c -Fe$(OBJDIR)callbacks-example-listlinks.dll \ 41 | $(LIB_FLAGS) 42 | cl $(COMMON_FLAGS) \ 43 | example.c wsock32.lib libhttrack.lib -Fe$(OBJDIR)example.exe \ 44 | $(BIN_FLAGS) 45 | -------------------------------------------------------------------------------- /libtest/libtest.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | Source Files 50 | 51 | 52 | 53 | 54 | Header Files 55 | 56 | 57 | 58 | 59 | Resource Files 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /libtest/readme.txt: -------------------------------------------------------------------------------- 1 | HTTrack library example 2 | ----------------------- 3 | 4 | Here is an example of how to integrate HTTrack Website Copier into a project 5 | to use it as a "core library". 6 | 7 | 8 | Important Notice: 9 | ---------------- 10 | 11 | These sources are covered by the GNU General Public License (see below) 12 | (Projects based on these sources must follow the GPL, too) 13 | 14 | 15 | Copyright notice: 16 | ---------------- 17 | 18 | HTTrack Website Copier, Offline Browser for Windows and Unix 19 | Copyright (C) Xavier Roche and other contributors 20 | 21 | This program is free software; you can redistribute it and/or 22 | modify it under the terms of the GNU General Public License 23 | as published by the Free Software Foundation; either version 2 24 | of the License, or any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program; if not, write to the Free Software 33 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 34 | 35 | ======================================================================== 36 | MAKEFILE PROJECT : libtest Project Overview 37 | ======================================================================== 38 | 39 | AppWizard has created this libtest project for you. 40 | 41 | This file contains a summary of what you will find in each of the files that 42 | make up your libtest project. 43 | 44 | 45 | libtest.vcproj 46 | This is the main project file for VC++ projects generated using an Application Wizard. 47 | It contains information about the version of Visual C++ that generated the file, and 48 | information about the platforms, configurations, and project features selected with the 49 | Application Wizard. 50 | 51 | This project allows you to build/clean/rebuild from within Visual Studio by calling the commands you have input 52 | in the wizard. The build command can be nmake or any other tool you use. 53 | 54 | This project does not contain any files, so there are none displayed in Solution Explorer. 55 | 56 | ///////////////////////////////////////////////////////////////////////////// 57 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | HTTrack Website Copier License Agreement: 2 | 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | In addition, as a special exception, Xavier Roche gives permission to 20 | link the code of this program with the openSSL library (or with 21 | modified versions of openSSL that use the same license as openSSL), 22 | and distribute linked combinations including the two. You must obey 23 | the GNU General Public License in all respects for all of the code 24 | used other than openSSL. If you modify this file, you may extend this 25 | exception to your version of the file, but you are not obligated to do 26 | so. If you do not wish to do so, delete this exception statement from 27 | your version. 28 | 29 | Important notes: 30 | 31 | We hereby ask people using this source NOT to use it in purpose of grabbing 32 | emails addresses, or collecting any other private informations on persons. 33 | This would disgrace our work, and spoil the many hours we spent on it. 34 | 35 | 36 | Contacting us / support: 37 | Please refer to the README file 38 | 39 | -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = *.m4 2 | -------------------------------------------------------------------------------- /m4/ax_check_aligned_access_required.m4: -------------------------------------------------------------------------------- 1 | # ===================================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_check_aligned_access_required.html 3 | # ===================================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CHECK_ALIGNED_ACCESS_REQUIRED 8 | # 9 | # DESCRIPTION 10 | # 11 | # While the x86 CPUs allow access to memory objects to be unaligned it 12 | # happens that most of the modern designs require objects to be aligned - 13 | # or they will fail with a buserror. That mode is quite known by 14 | # big-endian machines (sparc, etc) however the alpha cpu is little- 15 | # endian. 16 | # 17 | # The following function will test for aligned access to be required and 18 | # set a config.h define HAVE_ALIGNED_ACCESS_REQUIRED (name derived by 19 | # standard usage). Structures loaded from a file (or mmapped to memory) 20 | # should be accessed per-byte in that case to avoid segfault type errors. 21 | # 22 | # The function checks if unaligned access would ignore the lowest bit of 23 | # the address. If that happens or if the test binary crashes, aligned 24 | # access is required. 25 | # 26 | # If cross-compiling, assume that aligned access is needed to be safe. Set 27 | # ax_cv_have_aligned_access_required=no to override that assumption. 28 | # 29 | # LICENSE 30 | # 31 | # Copyright (c) 2008 Guido U. Draheim 32 | # 33 | # Copying and distribution of this file, with or without modification, are 34 | # permitted in any medium without royalty provided the copyright notice 35 | # and this notice are preserved. This file is offered as-is, without any 36 | # warranty. 37 | 38 | #serial 11 39 | 40 | AC_DEFUN([AX_CHECK_ALIGNED_ACCESS_REQUIRED], 41 | [AC_CACHE_CHECK([if pointers to integers require aligned access], 42 | [ax_cv_have_aligned_access_required], 43 | [AC_RUN_IFELSE([ 44 | AC_LANG_PROGRAM([[@%:@include ]], 45 | [[ 46 | int i; 47 | int *p; 48 | int *q; 49 | char *str; 50 | str = (char *) malloc(40); 51 | for (i = 0; i < 40; i++) { 52 | *(str + i) = i; 53 | } 54 | p = (int *) (str + 1); 55 | q = (int *) (str + 2); 56 | return (*p == *q); 57 | ]])], 58 | [ax_cv_have_aligned_access_required=no], 59 | [ax_cv_have_aligned_access_required=yes], 60 | [ax_cv_have_aligned_access_required=maybe])]) 61 | 62 | if test "x$ax_cv_have_aligned_access_required" = "xmaybe"; then 63 | AC_MSG_WARN([Assuming aligned access is required when cross-compiling]) 64 | ax_cv_have_aligned_access_required=yes 65 | fi 66 | 67 | if test "x$ax_cv_have_aligned_access_required" = "xyes"; then 68 | AC_DEFINE([HAVE_ALIGNED_ACCESS_REQUIRED], [1], 69 | [Define if pointers to integers require aligned access]) 70 | fi 71 | ]) 72 | -------------------------------------------------------------------------------- /m4/ax_check_compile_flag.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check whether the given FLAG works with the current language's compiler 12 | # or gives an error. (Warnings, however, are ignored) 13 | # 14 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 15 | # success/failure. 16 | # 17 | # If EXTRA-FLAGS is defined, it is added to the current language's default 18 | # flags (e.g. CFLAGS) when the check is done. The check is thus made with 19 | # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to 20 | # force the compiler to issue an error when a bad flag is given. 21 | # 22 | # INPUT gives an alternative input source to AC_COMPILE_IFELSE. 23 | # 24 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this 25 | # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. 26 | # 27 | # LICENSE 28 | # 29 | # Copyright (c) 2008 Guido U. Draheim 30 | # Copyright (c) 2011 Maarten Bosmans 31 | # 32 | # Copying and distribution of this file, with or without modification, are 33 | # permitted in any medium without royalty provided the copyright notice 34 | # and this notice are preserved. This file is offered as-is, without any 35 | # warranty. 36 | 37 | #serial 6 38 | 39 | AC_DEFUN([AX_CHECK_COMPILE_FLAG], 40 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF 41 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl 42 | AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ 43 | ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS 44 | _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" 45 | AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], 46 | [AS_VAR_SET(CACHEVAR,[yes])], 47 | [AS_VAR_SET(CACHEVAR,[no])]) 48 | _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) 49 | AS_VAR_IF(CACHEVAR,yes, 50 | [m4_default([$2], :)], 51 | [m4_default([$3], :)]) 52 | AS_VAR_POPDEF([CACHEVAR])dnl 53 | ])dnl AX_CHECK_COMPILE_FLAGS 54 | -------------------------------------------------------------------------------- /m4/ax_check_link_flag.m4: -------------------------------------------------------------------------------- 1 | # =========================================================================== 2 | # https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html 3 | # =========================================================================== 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check whether the given FLAG works with the linker or gives an error. 12 | # (Warnings, however, are ignored) 13 | # 14 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 15 | # success/failure. 16 | # 17 | # If EXTRA-FLAGS is defined, it is added to the linker's default flags 18 | # when the check is done. The check is thus made with the flags: "LDFLAGS 19 | # EXTRA-FLAGS FLAG". This can for example be used to force the linker to 20 | # issue an error when a bad flag is given. 21 | # 22 | # INPUT gives an alternative input source to AC_LINK_IFELSE. 23 | # 24 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this 25 | # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. 26 | # 27 | # LICENSE 28 | # 29 | # Copyright (c) 2008 Guido U. Draheim 30 | # Copyright (c) 2011 Maarten Bosmans 31 | # 32 | # Copying and distribution of this file, with or without modification, are 33 | # permitted in any medium without royalty provided the copyright notice 34 | # and this notice are preserved. This file is offered as-is, without any 35 | # warranty. 36 | 37 | #serial 6 38 | 39 | AC_DEFUN([AX_CHECK_LINK_FLAG], 40 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF 41 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl 42 | AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ 43 | ax_check_save_flags=$LDFLAGS 44 | LDFLAGS="$LDFLAGS $4 $1" 45 | AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], 46 | [AS_VAR_SET(CACHEVAR,[yes])], 47 | [AS_VAR_SET(CACHEVAR,[no])]) 48 | LDFLAGS=$ax_check_save_flags]) 49 | AS_VAR_IF(CACHEVAR,yes, 50 | [m4_default([$2], :)], 51 | [m4_default([$3], :)]) 52 | AS_VAR_POPDEF([CACHEVAR])dnl 53 | ])dnl AX_CHECK_LINK_FLAGS 54 | -------------------------------------------------------------------------------- /m4/check_zlib.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis CHECK_ZLIB() 2 | dnl 3 | dnl This macro searches for an installed zlib library. If nothing 4 | dnl was specified when calling configure, it searches first in /usr/local 5 | dnl and then in /usr. If the --with-zlib=DIR is specified, it will try 6 | dnl to find it in DIR/include/zlib.h and DIR/lib/libz.a. If --without-zlib 7 | dnl is specified, the library is not searched at all. 8 | dnl 9 | dnl If either the header file (zlib.h) or the library (libz) is not 10 | dnl found, the configuration exits on error, asking for a valid 11 | dnl zlib installation directory or --without-zlib. 12 | dnl 13 | dnl The macro defines the symbol HAVE_LIBZ if the library is found. You should 14 | dnl use autoheader to include a definition for this symbol in a config.h 15 | dnl file. Sample usage in a C/C++ source is as follows: 16 | dnl 17 | dnl #ifdef HAVE_LIBZ 18 | dnl #include 19 | dnl #endif /* HAVE_LIBZ */ 20 | dnl 21 | dnl @version $Id$ 22 | dnl @author Loic Dachary 23 | dnl 24 | 25 | AC_DEFUN([CHECK_ZLIB], 26 | # 27 | # Handle user hints 28 | # 29 | [AC_MSG_CHECKING(if zlib is wanted) 30 | AC_ARG_WITH(zlib, 31 | [ --with-zlib=DIR root directory path of zlib installation [defaults to 32 | /usr/local or /usr if not found in /usr/local] 33 | --without-zlib to disable zlib usage completely], 34 | [if test "$withval" != no ; then 35 | AC_MSG_RESULT(yes) 36 | ZLIB_HOME="$withval" 37 | else 38 | AC_MSG_RESULT(no) 39 | fi], [ 40 | AC_MSG_RESULT(yes) 41 | ZLIB_HOME=/usr/local 42 | if test ! -f "${ZLIB_HOME}/include/zlib.h" 43 | then 44 | ZLIB_HOME=/usr 45 | fi 46 | ]) 47 | 48 | # 49 | # Locate zlib, if wanted 50 | # 51 | if test -n "${ZLIB_HOME}" 52 | then 53 | ZLIB_OLD_LDFLAGS=$LDFLAGS 54 | ZLIB_OLD_CPPFLAGS=$LDFLAGS 55 | LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" 56 | CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" 57 | AC_LANG_SAVE 58 | AC_LANG_C 59 | AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no]) 60 | AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) 61 | AC_LANG_RESTORE 62 | if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes" 63 | then 64 | # 65 | # If both library and header were found, use them 66 | # 67 | AC_CHECK_LIB(z, inflateEnd) 68 | AC_MSG_CHECKING(zlib in ${ZLIB_HOME}) 69 | AC_MSG_RESULT(ok) 70 | else 71 | # 72 | # If either header or library was not found, revert and bomb 73 | # 74 | AC_MSG_CHECKING(zlib in ${ZLIB_HOME}) 75 | LDFLAGS="$ZLIB_OLD_LDFLAGS" 76 | CPPFLAGS="$ZLIB_OLD_CPPFLAGS" 77 | AC_MSG_RESULT(failed) 78 | AC_MSG_ERROR(either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib) 79 | fi 80 | fi 81 | 82 | ]) 83 | -------------------------------------------------------------------------------- /m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /m4/snprintf.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AC_FUNC_SNPRINTF], 2 | [AC_CHECK_FUNCS(snprintf vsnprintf) 3 | AC_MSG_CHECKING(for working snprintf) 4 | AC_CACHE_VAL(ac_cv_have_working_snprintf, 5 | [AC_TRY_RUN( 6 | [#include 7 | 8 | int main(void) 9 | { 10 | char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; 11 | char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; 12 | int i; 13 | i = snprintf (bufs, 2, "%s", "111"); 14 | if (strcmp (bufs, "1")) exit (1); 15 | if (i != 3) exit (1); 16 | i = snprintf (bufd, 2, "%d", 111); 17 | if (strcmp (bufd, "1")) exit (1); 18 | if (i != 3) exit (1); 19 | exit(0); 20 | }], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)]) 21 | AC_MSG_RESULT([$ac_cv_have_working_snprintf]) 22 | AC_MSG_CHECKING(for working vsnprintf) 23 | AC_CACHE_VAL(ac_cv_have_working_vsnprintf, 24 | [AC_TRY_RUN( 25 | [#include 26 | #include 27 | 28 | int my_vsnprintf (char *buf, const char *tmpl, ...) 29 | { 30 | int i; 31 | va_list args; 32 | va_start (args, tmpl); 33 | i = vsnprintf (buf, 2, tmpl, args); 34 | va_end (args); 35 | return i; 36 | } 37 | 38 | int main(void) 39 | { 40 | char bufs[5] = { 'x', 'x', 'x', '\0', '\0' }; 41 | char bufd[5] = { 'x', 'x', 'x', '\0', '\0' }; 42 | int i; 43 | i = my_vsnprintf (bufs, "%s", "111"); 44 | if (strcmp (bufs, "1")) exit (1); 45 | if (i != 3) exit (1); 46 | i = my_vsnprintf (bufd, "%d", 111); 47 | if (strcmp (bufd, "1")) exit (1); 48 | if (i != 3) exit (1); 49 | exit(0); 50 | }], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)]) 51 | AC_MSG_RESULT([$ac_cv_have_working_vsnprintf]) 52 | if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then 53 | AC_LIBOBJ(snprintf) 54 | AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.]) 55 | AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken") 56 | fi]) 57 | -------------------------------------------------------------------------------- /m4/visibility.m4: -------------------------------------------------------------------------------- 1 | # visibility.m4 serial 5 (gettext-0.18.2) 2 | dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Bruno Haible. 8 | 9 | dnl Tests whether the compiler supports the command-line option 10 | dnl -fvisibility=hidden and the function and variable attributes 11 | dnl __attribute__((__visibility__("hidden"))) and 12 | dnl __attribute__((__visibility__("default"))). 13 | dnl Does *not* test for __visibility__("protected") - which has tricky 14 | dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on 15 | dnl Mac OS X. 16 | dnl Does *not* test for __visibility__("internal") - which has processor 17 | dnl dependent semantics. 18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is 19 | dnl "really only recommended for legacy code". 20 | dnl Set the variable CFLAG_VISIBILITY. 21 | dnl Defines and sets the variable HAVE_VISIBILITY. 22 | 23 | AC_DEFUN([gl_VISIBILITY], 24 | [ 25 | AC_REQUIRE([AC_PROG_CC]) 26 | CFLAG_VISIBILITY= 27 | HAVE_VISIBILITY=0 28 | if test -n "$GCC"; then 29 | dnl First, check whether -Werror can be added to the command line, or 30 | dnl whether it leads to an error because of some other option that the 31 | dnl user has put into $CC $CFLAGS $CPPFLAGS. 32 | AC_MSG_CHECKING([whether the -Werror option is usable]) 33 | AC_CACHE_VAL([gl_cv_cc_vis_werror], [ 34 | gl_save_CFLAGS="$CFLAGS" 35 | CFLAGS="$CFLAGS -Werror" 36 | AC_COMPILE_IFELSE( 37 | [AC_LANG_PROGRAM([[]], [[]])], 38 | [gl_cv_cc_vis_werror=yes], 39 | [gl_cv_cc_vis_werror=no]) 40 | CFLAGS="$gl_save_CFLAGS"]) 41 | AC_MSG_RESULT([$gl_cv_cc_vis_werror]) 42 | dnl Now check whether visibility declarations are supported. 43 | AC_MSG_CHECKING([for simple visibility declarations]) 44 | AC_CACHE_VAL([gl_cv_cc_visibility], [ 45 | gl_save_CFLAGS="$CFLAGS" 46 | CFLAGS="$CFLAGS -fvisibility=hidden" 47 | dnl We use the option -Werror and a function dummyfunc, because on some 48 | dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning 49 | dnl "visibility attribute not supported in this configuration; ignored" 50 | dnl at the first function definition in every compilation unit, and we 51 | dnl don't want to use the option in this case. 52 | if test $gl_cv_cc_vis_werror = yes; then 53 | CFLAGS="$CFLAGS -Werror" 54 | fi 55 | AC_COMPILE_IFELSE( 56 | [AC_LANG_PROGRAM( 57 | [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; 58 | extern __attribute__((__visibility__("default"))) int exportedvar; 59 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); 60 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); 61 | void dummyfunc (void) {} 62 | ]], 63 | [[]])], 64 | [gl_cv_cc_visibility=yes], 65 | [gl_cv_cc_visibility=no]) 66 | CFLAGS="$gl_save_CFLAGS"]) 67 | AC_MSG_RESULT([$gl_cv_cc_visibility]) 68 | if test $gl_cv_cc_visibility = yes; then 69 | CFLAG_VISIBILITY="-fvisibility=hidden" 70 | HAVE_VISIBILITY=1 71 | fi 72 | fi 73 | AC_SUBST([CFLAG_VISIBILITY]) 74 | AC_SUBST([HAVE_VISIBILITY]) 75 | AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], 76 | [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) 77 | ]) 78 | -------------------------------------------------------------------------------- /man/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | # man_MANS = httrack.1 3 | man_MANS = httrack.1 webhttrack.1 htsserver.1 proxytrack.1 4 | 5 | EXTRA_DIST = $(man_MANS) 6 | -------------------------------------------------------------------------------- /man/htsserver.1: -------------------------------------------------------------------------------- 1 | .\" Process this file with 2 | .\" groff -man -Tascii htsserver.1 3 | .\" 4 | .TH htsserver 1 "Mar 2003" "httrack website copier" 5 | .SH NAME 6 | htsserver \- offline browser server : copy websites to a local directory 7 | .SH SYNOPSIS 8 | .B htsserver [ path/ ] [ keyword value [ keyword value .. ] ] 9 | .B 10 | .SH DESCRIPTION 11 | .B htsserver 12 | this program is a web frontend server to 13 | .BR httrack (1). 14 | , a website copier, used by 15 | .BR webhttrack (1). 16 | .SH EXAMPLES 17 | .TP 18 | .B htsserver /usr/share/httrack/ path "$HOME/websites" lang 1 19 | then, browse http://localhost:8080/ 20 | .SH FILES 21 | .I /etc/httrack.conf 22 | .RS 23 | The system wide configuration file. 24 | .SH ENVIRONMENT 25 | .IP HOME 26 | Is being used if you defined in /etc/httrack.conf the line 27 | .I path ~/websites/# 28 | .SH DIAGNOSTICS 29 | Errors/Warnings are reported to 30 | .I hts-log.txt 31 | located in the destination directory. 32 | 33 | .SH BUGS 34 | Please reports bugs to 35 | .B . 36 | Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of (web)httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary. 37 | .SH COPYRIGHT 38 | Copyright (C) 1998-2013 Xavier Roche and other contributors 39 | 40 | This program is free software: you can redistribute it and/or modify 41 | it under the terms of the GNU General Public License as published by 42 | the Free Software Foundation, either version 3 of the License, or 43 | (at your option) any later version. 44 | 45 | This program is distributed in the hope that it will be useful, 46 | but WITHOUT ANY WARRANTY; without even the implied warranty of 47 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 48 | GNU General Public License for more details. 49 | 50 | You should have received a copy of the GNU General Public License 51 | along with this program. If not, see . 52 | .SH AVAILABILITY 53 | The most recent released version of (web)httrack can be found at: 54 | .B http://www.httrack.com 55 | .SH AUTHOR 56 | Xavier Roche 57 | .SH "SEE ALSO" 58 | The 59 | .B HTML 60 | documentation (available online at 61 | .B http://www.httrack.com/html/ 62 | ) contains more detailed information. Please also refer to the 63 | .B httrack FAQ 64 | (available online at 65 | .B http://www.httrack.com/html/faq.html 66 | ) 67 | -------------------------------------------------------------------------------- /man/proxytrack.1: -------------------------------------------------------------------------------- 1 | .\" Process this file with 2 | .\" groff -man -Tascii proxytrack.1 3 | .\" 4 | .TH proxytrack 1 "Mar 2003" "httrack website copier" 5 | .SH NAME 6 | proxytrack \- proxy to serve content archived by httrack website copier 7 | .SH SYNOPSIS 8 | .B proxytrack proxy_address:proxy_port icp_address:icp_port [ httrack_cache_filename_1 [ httrack_cache_filename_2 .. ] ] 9 | .B 10 | .SH DESCRIPTION 11 | .B proxytrack 12 | this program allows you to create a proxy to deliver content already archived by 13 | .BR httrack (1) 14 | , a website copier. 15 | .SH EXAMPLES 16 | .TP 17 | .B proxytrack proxy:8080 localhost:3130 /home/archives/example.com/hts-cache/new.zip 18 | will launch the proxytrack proxy, listening to :8080, to deliver content archived in the /home/archives/example.com/hts-cache/new.zip cache 19 | .SH ENVIRONMENT 20 | .SH DIAGNOSTICS 21 | Errors/Warnings are reported the console and standard error 22 | 23 | .SH BUGS 24 | Please reports bugs to 25 | .B . 26 | Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of (web)httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary. 27 | .SH COPYRIGHT 28 | Copyright (C) 1998-2013 Xavier Roche and other contributors 29 | 30 | This program is free software: you can redistribute it and/or modify 31 | it under the terms of the GNU General Public License as published by 32 | the Free Software Foundation, either version 3 of the License, or 33 | (at your option) any later version. 34 | 35 | This program is distributed in the hope that it will be useful, 36 | but WITHOUT ANY WARRANTY; without even the implied warranty of 37 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 38 | GNU General Public License for more details. 39 | 40 | You should have received a copy of the GNU General Public License 41 | along with this program. If not, see . 42 | .SH AVAILABILITY 43 | The most recent released version of (web)httrack can be found at: 44 | .B http://www.httrack.com 45 | .SH AUTHOR 46 | Xavier Roche 47 | .SH "SEE ALSO" 48 | The 49 | .B HTML 50 | documentation (available online at 51 | .B http://www.httrack.com/html/ 52 | ) contains more detailed information. Please also refer to the 53 | .B httrack FAQ 54 | (available online at 55 | .B http://www.httrack.com/html/faq.html 56 | ) 57 | -------------------------------------------------------------------------------- /man/webhttrack.1: -------------------------------------------------------------------------------- 1 | .\" Process this file with 2 | .\" groff -man -Tascii webhttrack.1 3 | .\" 4 | .TH webhttrack 1 "Mar 2003" "httrack website copier" 5 | .SH NAME 6 | webhttrack \- offline browser : copy websites to a local directory 7 | .SH SYNOPSIS 8 | .B webhttrack [ keyword value [ keyword value .. ] ] 9 | .B 10 | .SH DESCRIPTION 11 | .B webhttrack 12 | this program is a script frontend to 13 | .BR httrack (1) 14 | and 15 | .BR htsserver (1) 16 | , a website copier. 17 | .SH EXAMPLES 18 | .TP 19 | .B webhttrack lang 1 20 | will launch the webhttrack server frontend, and the default system browser, with "lang" set to "english" (language #1) 21 | .SH FILES 22 | .I /etc/httrack.conf 23 | .RS 24 | The system wide configuration file. 25 | .SH ENVIRONMENT 26 | .IP HOME 27 | Is being used if you defined in /etc/httrack.conf the line 28 | .I path ~/websites/# 29 | .SH DIAGNOSTICS 30 | Errors/Warnings are reported to 31 | .I hts-log.txt 32 | located in the destination directory. 33 | 34 | .SH BUGS 35 | Please reports bugs to 36 | .B . 37 | Include a complete, self-contained example that will allow the bug to be reproduced, and say which version of (web)httrack you are using. Do not forget to detail options used, OS version, and any other information you deem necessary. 38 | .SH COPYRIGHT 39 | Copyright (C) 1998-2013 Xavier Roche and other contributors 40 | 41 | This program is free software: you can redistribute it and/or modify 42 | it under the terms of the GNU General Public License as published by 43 | the Free Software Foundation, either version 3 of the License, or 44 | (at your option) any later version. 45 | 46 | This program is distributed in the hope that it will be useful, 47 | but WITHOUT ANY WARRANTY; without even the implied warranty of 48 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 49 | GNU General Public License for more details. 50 | 51 | You should have received a copy of the GNU General Public License 52 | along with this program. If not, see . 53 | .SH AVAILABILITY 54 | The most recent released version of (web)httrack can be found at: 55 | .B http://www.httrack.com 56 | .SH AUTHOR 57 | Xavier Roche 58 | .SH "SEE ALSO" 59 | The 60 | .B HTML 61 | documentation (available online at 62 | .B http://www.httrack.com/html/ 63 | ) contains more detailed information. Please also refer to the 64 | .B httrack FAQ 65 | (available online at 66 | .B http://www.httrack.com/html/faq.html 67 | ) 68 | -------------------------------------------------------------------------------- /src/PlatformFixes.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "PlatformFixes.h" 4 | 5 | #ifndef _WIN32 6 | #pragma GCC diagnostic push 7 | #pragma GCC diagnostic ignored "-Wcast-qual" 8 | 9 | #include "vendor/safeclib/src/str/strcpy_s.c" 10 | #include "vendor/safeclib/src/str/strncat_s.c" 11 | #include "vendor/safeclib/src/str/strncpy_s.c" 12 | #include "vendor/safeclib/src/str/strnlen_s.c" 13 | #include "vendor/safeclib/src/str/strtok_s.c" 14 | #include "vendor/safeclib/src/str/sprintf_s.c" 15 | #include "vendor/safeclib/src/str/strcat_s.c" 16 | #include "vendor/safeclib/src/str/strerror_s.c" 17 | #include "vendor/safeclib/src/str/vsnprintf_s.c" 18 | #include "vendor/safeclib/src/str/safe_str_constraint.c" 19 | #define HAVE_WCHAR_H 20 | #include "vendor/safeclib/src/wchar/wcstombs_s.c" 21 | #include "vendor/safeclib/src/wchar/wcsnlen_s.c" 22 | 23 | #include "vendor/safeclib/src/ignore_handler_s.c" 24 | #include "vendor/safeclib/src/abort_handler_s.c" 25 | 26 | 27 | 28 | #include "vendor/safeclib/src/io/printf_s.c" 29 | #include "vendor/safeclib/src/io/vfprintf_s.c" 30 | #include "vendor/safeclib/src/io/vprintf_s.c" 31 | 32 | #include "vendor/safeclib/src/extstr/strstr_s.c" 33 | #pragma GCC diagnostic pop 34 | #endif 35 | 36 | time_t getGMT(struct tm* tm) { /* hey, time_t is local! */ 37 | time_t t = mktime(tm); 38 | 39 | if (t != (time_t)-1 && t != (time_t)0) { 40 | /* BSD does not have static "timezone" declared */ 41 | #if (defined(BSD) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD_kernel__)) 42 | time_t now = time(NULL); 43 | time_t timezone = -localtime(&now)->tm_gmtoff; 44 | #elif defined(_WIN32) || defined(__ANDROID__) 45 | if (timezone == -9999) 46 | timezone = time_offset(); 47 | #endif 48 | return (time_t)(t - timezone); 49 | } 50 | return (time_t)-1; 51 | } 52 | 53 | 54 | int time_offset(void)//https://stackoverflow.com/questions/13804095/get-the-time-zone-gmt-offset-in-c 55 | { 56 | time_t gmt, rawtime = time(0); 57 | struct tm* ptm; 58 | 59 | #if !defined(_WIN32) 60 | struct tm gbuf; 61 | ptm = gmtime_r(&rawtime, &gbuf); 62 | #else 63 | ptm = gmtime(&rawtime); 64 | #endif 65 | // Request that mktime() looksup dst in timezone database 66 | ptm->tm_isdst = -1; 67 | gmt = mktime(ptm); 68 | 69 | return (int)difftime(rawtime, gmt); 70 | } 71 | -------------------------------------------------------------------------------- /src/PlatformFixes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /* 4 | Win32 redefine of functions to the stdlib names 5 | Win32 & Android fix for missing timezone global 6 | Linux - csafelib safe c functions 7 | 8 | */ 9 | #include "time.h" 10 | /* Safe C functions and those noops for those they dont yet have*/ 11 | #ifndef _WIN32 12 | #include "vendor/safeclib/include/safe_lib.h" 13 | #include "vendor/safeclib/include/safe_str_lib.h" 14 | #include "vendor/safeclib/include/safe_mem_lib.h" 15 | 16 | inline size_t fread_s( 17 | void* buffer, 18 | size_t bufferSize, 19 | size_t elementSize, 20 | size_t count, 21 | FILE* stream 22 | ); 23 | inline size_t fread_s( 24 | void* buffer, 25 | size_t bufferSize, 26 | size_t elementSize, 27 | size_t count, 28 | FILE* stream 29 | ) { 30 | return fread(buffer, elementSize, count, stream); 31 | } 32 | #endif 33 | 34 | /* Specific macros */ 35 | #ifndef malloct 36 | #define malloct malloc 37 | #define freet free 38 | #define calloct calloc 39 | #define strcpybuff strcpy 40 | #endif 41 | 42 | #ifdef _WIN32 //winlist of functions to refine to use as gcc doesn't include stdc versions, note this must appear after standard library includes 43 | #define strcasecmp(a,b) _stricmp(a,b) 44 | #define strncasecmp(a,b,n) _strnicmp(a,b,n) 45 | #define snprintf _snprintf 46 | #define access _access 47 | #define chdir _chdir 48 | #define chmod _chmod 49 | #define close _close 50 | #define creat _creat 51 | #define dup _dup 52 | #define dup2 _dup2 53 | #define ecvt _ecvt 54 | #define execl _execl 55 | #define execle _execle 56 | #define execlp _execlp 57 | #define execv _execv 58 | #define execve _execve 59 | #define execvp _execvp 60 | #define execvpe _execvpe 61 | #define fcloseall _fcloseall 62 | #define fcvt _fcvt 63 | #define fdopen _fdopen 64 | #define fileno _fileno 65 | #define gcvt _gcvt 66 | #define getcwd _getcwd 67 | #define getpid _getpid 68 | #define getw _getw 69 | #define isatty _isatty 70 | #define j0 _j0 71 | #define j1 _j1 72 | #define jn _jn 73 | #define lfind _lfind 74 | #define lsearch _lsearch 75 | #define lseek _lseek 76 | #define memccpy _memccpy 77 | #define mkdir _mkdir 78 | #define mktemp _mktemp 79 | #define open _open 80 | #define putenv _putenv 81 | #define putw _putw 82 | #define read _read 83 | #define rmdir _rmdir 84 | #define strdup _strdup 85 | #define swab _swab 86 | #define tempnam _tempnam 87 | #define tzset _tzset 88 | #define umask _umask 89 | #define unlink _unlink 90 | #define utime _utime 91 | #define wcsdup _wcsdup 92 | #define write _write 93 | #define y0 _y0 94 | #define y1 _y1 95 | #define yn _yn 96 | #endif 97 | 98 | /*Windows/android dont have timezone but we can deduce it*/ 99 | #if defined(_WIN32) || defined(__ANDROID__) 100 | static int timezone = -9999; 101 | #endif // !timezone 102 | int time_offset(void); 103 | time_t getGMT(struct tm* tm); 104 | 105 | 106 | 107 | 108 | #if !defined(_WIN32) && !defined(errno_t) 109 | typedef int errno_t; 110 | #endif 111 | 112 | #ifndef _WIN32 113 | #ifndef BOOL 114 | typedef int BOOL; 115 | #endif 116 | #ifndef TRUE 117 | #define TRUE 1 118 | #define FALSE 0 119 | #endif 120 | 121 | #endif // ! _WIN32 122 | 123 | -------------------------------------------------------------------------------- /src/htsalias.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: htsalias.h subroutines: */ 30 | /* alias for command-line options and config files */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSALIAS_DEFH 35 | #define HTSALIAS_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | extern const char *hts_optalias[][4]; 40 | int optalias_check(int argc, const char *const *argv, int n_arg, 41 | int *return_argc, char **return_argv, char *return_error); 42 | int optalias_find(const char *token); 43 | const char *optalias_help(const char *token); 44 | int optreal_find(const char *token); 45 | int optinclude_file(const char *name, int *argc, char **argv, char *x_argvblk, 46 | int *x_ptr); 47 | const char *optreal_value(int p); 48 | const char *optalias_value(int p); 49 | const char *opttype_value(int p); 50 | const char *opthelp_value(int p); 51 | const char *hts_gethome(void); 52 | void expand_home(String * str); 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/htsbase.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: Basic definitions */ 30 | /* Used in .c files for basic (malloc() ..) definitions */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTS_BASICH 35 | #define HTS_BASICH 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #include "htsglobal.h" 42 | #include "htsstrings.h" 43 | #include "htssafe.h" 44 | 45 | #include 46 | #include 47 | 48 | #ifndef _WIN32 49 | #include 50 | #endif 51 | #include 52 | #include 53 | 54 | #ifndef _WIN32 55 | #include 56 | #endif 57 | 58 | #include 59 | 60 | #ifdef _WIN32 61 | #else 62 | #include 63 | #endif 64 | #include 65 | 66 | /* GCC extension */ 67 | #ifndef HTS_UNUSED 68 | #ifdef __GNUC__ 69 | #define HTS_UNUSED __attribute__ ((unused)) 70 | #define HTS_STATIC static __attribute__ ((unused)) 71 | #define HTS_INLINE __inline__ 72 | #define HTS_PRINTF_FUN(fmt, arg) __attribute__ ((format (printf, fmt, arg))) 73 | #else 74 | #define HTS_UNUSED 75 | #define HTS_STATIC static 76 | #define HTS_INLINE 77 | #define HTS_PRINTF_FUN(fmt, arg) 78 | #endif 79 | #endif 80 | 81 | #undef min 82 | #undef max 83 | #define max(a,b) ((a)<(b)?(b):(a)) 84 | #define min(a,b) ((a)<(b)?(a):(b)) 85 | 86 | #ifndef _WIN32 87 | #undef Sleep 88 | #define Sleep(a) { if (((a)*1000)%1000000) usleep(((a)*1000)%1000000); if (((a)*1000)/1000000) sleep(((a)*1000)/1000000); } 89 | #endif 90 | 91 | // teste égalité de 2 chars, case insensitive 92 | #define hichar(a) ((((a)>='a') && ((a)<='z')) ? ((a)-('a'-'A')) : (a)) 93 | #define streql(a,b) (hichar(a)==hichar(b)) 94 | 95 | // caractère maj 96 | #define isUpperLetter(a) ( ((a) >= 'A') && ((a) <= 'Z') ) 97 | 98 | /* Library internal definictions */ 99 | #ifdef HTS_INTERNAL_BYTECODE 100 | 101 | // functions 102 | #ifdef _WIN32 103 | #define DynamicGet(handle, sym) GetProcAddress(handle, sym) 104 | #else 105 | #define DynamicGet(handle, sym) dlsym(handle, sym) 106 | #endif 107 | 108 | #endif 109 | 110 | #ifdef __cplusplus 111 | } 112 | #endif 113 | 114 | #endif 115 | -------------------------------------------------------------------------------- /src/htsbasiccharsets.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # Change this to download files 5 | if false; then 6 | echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-*.TXT" | lftp 7 | echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP*.TXT" | lftp 8 | echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP*.TXT" | lftp 9 | echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/EBCDIC/CP*.TXT" | lftp 10 | echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/CP*.TXT" | lftp 11 | echo "mget ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8*.TXT" | lftp 12 | rm -f CP932.TXT CP936.TXT CP949.TXT CP950.TXT 13 | fi 14 | 15 | # Produce code 16 | printf "/** GENERATED FILE ($0), DO NOT EDIT **/\n\n" 17 | for i in *.TXT ; do 18 | echo "processing $i" >&2 19 | grep -vE "^(#|$)" $i | grep -E "^0x" | sed -e 's/[[:space:]]/ /g' | cut -f1,2 -d' ' | \ 20 | ( 21 | unset arr 22 | while read LINE ; do 23 | from=$[$(echo $LINE | cut -f1 -d' ')] 24 | if ! test -n "$from"; then 25 | echo "error with $i" >&2 26 | exit 1 27 | elif test $from -ge 256; then 28 | echo "out-of-range ($LINE) with $i" >&2 29 | exit 1 30 | fi 31 | to=$(echo $LINE | cut -f2 -d' ') 32 | arr[$from]=$to 33 | done 34 | name=$(echo $i | tr 'A-Z' 'a-z' | tr '-' '_' | sed -e 's/\.txt//' -e 's/8859/iso_8859/') 35 | printf "/* Table for $i */\nstatic const hts_UCS4 table_${name}[256] = {\n " 36 | i=0 37 | while test "$i" -lt 256; do 38 | if test "$i" -gt 0; then 39 | printf ", " 40 | if test $[${i}%8] -eq 0; then 41 | printf "\n " 42 | fi 43 | fi 44 | value=${arr[$i]:-0} 45 | printf "0x%04x" $value 46 | i=$[${i}+1] 47 | done 48 | printf " };\n\n" 49 | ) 50 | echo "processed $i" >&2 51 | done 52 | 53 | # Indexes 54 | printf "static const struct {\n const char *name;\n const hts_UCS4 *table;\n} table_mappings[] = {\n" 55 | for i in *.TXT ; do 56 | name=$(echo $i | tr 'A-Z' 'a-z' | tr '-' '_' | sed -e 's/\.txt//' -e 's/8859/iso_8859/') 57 | printf " { \"$(echo $name | tr -d '_')\", table_${name} },\n" 58 | done 59 | printf " { NULL, NULL }\n};\n" 60 | -------------------------------------------------------------------------------- /src/htscatchurl.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: URL catch .h */ 30 | /* Author: Xavier Roche */ 31 | /* ------------------------------------------------------------ */ 32 | 33 | // Fichier intercepteur d'URL .h 34 | 35 | #ifndef HTS_CATCHURL_DEFH 36 | #define HTS_CATCHURL_DEFH 37 | 38 | #include "htsbasenet.h" 39 | 40 | /* Library internal definictions */ 41 | #ifdef HTS_INTERNAL_BYTECODE 42 | 43 | // Fonctions 44 | void socinput(T_SOC soc, char *s, int max); 45 | 46 | #define CATCH_RESPONSE \ 47 | "HTTP/1.0 200 OK\r\n"\ 48 | "Content-type: text/html\r\n"\ 49 | "\r\n"\ 50 | "\r\n"\ 51 | "\r\n"\ 52 | "Link caught!\r\n"\ 53 | "\r\n"\ 60 | "\r\n"\ 61 | "\r\n"\ 62 | "

Link captured into HTTrack Website Copier, you can now restore your proxy preferences!

\r\n"\ 63 | "

\r\n"\ 64 | "

Clic here to go back

\r\n"\ 65 | ""\ 66 | "\r\n"\ 67 | "\r\n"\ 68 | 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /src/htsconcat.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mitchcapper/httrack/c99f79532925e8bdfeb80aedf966c7e96bf38e6e/src/htsconcat.c -------------------------------------------------------------------------------- /src/htscoremain.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* main routine (first called) */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSMAINHSR_DEFH 35 | #define HTSMAINHSR_DEFH 36 | 37 | // --assume standard 38 | #define HTS_ASSUME_STANDARD \ 39 | "php2 php3 php4 php cgi asp jsp pl cfm nsf=text/html" 40 | 41 | #include "htsglobal.h" 42 | #include "htsopt.h" 43 | 44 | /* Library internal definictions */ 45 | #ifdef HTS_INTERNAL_BYTECODE 46 | 47 | int cmdl_opt(char* s); 48 | int check_path(String* s, char* defaultname); 49 | 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/htsentities.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | src=html40.txt 5 | url=http://www.w3.org/TR/1998/REC-html40-19980424/html40.txt 6 | dest=htsentities.h 7 | 8 | ( 9 | cat <) 16 | for each entity. We should in theory check using strncmp() that we 17 | actually have the correct entity, but this is actually statistically 18 | not needed. 19 | 20 | We may want to do better, but we expect the hash function to be uniform, and 21 | let the compiler be smart enough to optimize the switch (for example by 22 | checking in log2() intervals) 23 | 24 | This code has been generated using the evil $0 script. 25 | */ 26 | 27 | static int decode_entity(const unsigned int hash, const size_t len) { 28 | switch(hash) { 29 | EOF 30 | ( 31 | if test -f ${src}; then 32 | cat ${src} 33 | else 34 | GET "${url}" 35 | fi 36 | ) \ 37 | | grep -E '^$//' \ 41 | -e 's/\([^ ]*\) CDATA "&#\([^\"]*\);" -- \(.*\)/\1 \2 \3/'\ 42 | | ( \ 43 | read A 44 | while test -n "$A"; do 45 | ent="${A%% *}" 46 | code=$(echo "$A"|cut -f2 -d' ') 47 | # compute hash 48 | hash=0 49 | i=0 50 | a=1664525 51 | c=1013904223 52 | m="$[1 << 32]" 53 | while test "$i" -lt ${#ent}; do 54 | d="$(echo -n "${ent:${i}:1}"|hexdump -v -e '/1 "%d"')" 55 | hash="$[((${hash}*${a})%(${m})+${d}+${c})%(${m})]" 56 | i=$[${i}+1] 57 | done 58 | echo -e " /* $A */" 59 | echo -e " case ${hash}u:" 60 | echo -e " if (len == ${#ent} /* && strncmp(ent, \"${ent}\") == 0 */) {" 61 | echo -e " return ${code};" 62 | echo -e " }" 63 | echo -e " break;" 64 | 65 | # next 66 | read A 67 | done 68 | ) 69 | cat < ${dest} 76 | -------------------------------------------------------------------------------- /src/htsfilters.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* filters ("regexp") */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSFILT_DEFH 35 | #define HTSFILT_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | 40 | #include "htsbase.h" 41 | 42 | int fa_strjoker(int type, char **filters, int nfil, const char *nom, LLint * size, 43 | int *size_flag, int *depth); 44 | HTS_INLINE const char *strjoker(const char *chaine, const char *joker, LLint * size, 45 | int *size_flag); 46 | const char *strjokerfind(const char *chaine, const char *joker); 47 | #endif 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/htsftp.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: basic FTP protocol manager .h */ 30 | /* Author: Xavier Roche */ 31 | /* ------------------------------------------------------------ */ 32 | 33 | #ifndef HTSFTP_DEFH 34 | #define HTSFTP_DEFH 35 | 36 | #include "htsbase.h" 37 | #include "htsbasenet.h" 38 | #include "htsthread.h" 39 | 40 | /* Forward definitions */ 41 | #ifndef HTS_DEF_FWSTRUCT_lien_back 42 | #define HTS_DEF_FWSTRUCT_lien_back 43 | typedef struct lien_back lien_back; 44 | #endif 45 | #ifndef HTS_DEF_FWSTRUCT_httrackp 46 | #define HTS_DEF_FWSTRUCT_httrackp 47 | typedef struct httrackp httrackp; 48 | #endif 49 | 50 | /* Download structure */ 51 | #ifndef HTS_DEF_FWSTRUCT_FTPDownloadStruct 52 | #define HTS_DEF_FWSTRUCT_FTPDownloadStruct 53 | typedef struct FTPDownloadStruct FTPDownloadStruct; 54 | #endif 55 | struct FTPDownloadStruct { 56 | lien_back *pBack; 57 | httrackp *pOpt; 58 | }; 59 | 60 | /* Library internal definictions */ 61 | #ifdef HTS_INTERNAL_BYTECODE 62 | #if USE_BEGINTHREAD 63 | void launch_ftp(FTPDownloadStruct * params); 64 | void back_launch_ftp(void *pP); 65 | #else 66 | void launch_ftp(FTPDownloadStruct * params, char *path, char *exec); 67 | int back_launch_ftp(FTPDownloadStruct * params); 68 | #endif 69 | 70 | int run_launch_ftp(FTPDownloadStruct * params); 71 | int send_line(T_SOC soc, const char *data); 72 | int get_ftp_line(T_SOC soc, char *line, size_t line_size, int timeout); 73 | T_SOC get_datasocket(char *to_send, size_t to_send_size); 74 | int stop_ftp(lien_back * back); 75 | char *linejmp(char *line); 76 | int check_socket(T_SOC soc); 77 | int check_socket_connect(T_SOC soc); 78 | int wait_socket_receive(T_SOC soc, int timeout); 79 | #endif 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /src/htshash.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* hash table system (fast index) */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSHASH_DEFH 35 | #define HTSHASH_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | 40 | /* Forward definitions */ 41 | #ifndef HTS_DEF_FWSTRUCT_hash_struct 42 | #define HTS_DEF_FWSTRUCT_hash_struct 43 | typedef struct hash_struct hash_struct; 44 | #endif 45 | 46 | /** Type of hash. **/ 47 | typedef enum hash_struct_type { 48 | HASH_STRUCT_FILENAME = 0, 49 | HASH_STRUCT_ADR_PATH, 50 | HASH_STRUCT_ORIGINAL_ADR_PATH 51 | } hash_struct_type; 52 | 53 | // tables de hachage 54 | void hash_init(httrackp *opt, hash_struct *hash, int normalized); 55 | void hash_free(hash_struct *hash); 56 | int hash_read(const hash_struct * hash, const char *nom1, const char *nom2, 57 | hash_struct_type type); 58 | void hash_write(hash_struct * hash, size_t lpos); 59 | int *hash_calc_chaine(hash_struct * hash, hash_struct_type type, int pos); 60 | unsigned long int hash_cle(const char *nom1, const char *nom2); 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/htshelp.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* command-line help system */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSHELP_DEFH 35 | #define HTSHELP_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | 40 | /* Forward definitions */ 41 | #ifndef HTS_DEF_FWSTRUCT_httrackp 42 | #define HTS_DEF_FWSTRUCT_httrackp 43 | typedef struct httrackp httrackp; 44 | #endif 45 | 46 | void infomsg(const char *msg); 47 | void help(const char *app, int more); 48 | void make_empty_index(const char *str); 49 | void help_wizard(httrackp * opt); 50 | int help_query(const char *list, int def); 51 | void help_catchurl(const char *dest_path); 52 | 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/htsindex.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: htsindex.h */ 30 | /* keyword indexing system (search index) */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSKINDEX_DEFH 35 | #define HTSKINDEX_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | 40 | #include "htsglobal.h" 41 | 42 | int index_keyword(const char *html_data, LLint size, const char *mime, 43 | const char *filename, const char *indexpath); 44 | void index_init(const char *indexpath); 45 | void index_finish(const char *indexpath, int mode); 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/htsjava.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: Java classes parser .h */ 30 | /* Author: Yann Philippot */ 31 | /* ------------------------------------------------------------ */ 32 | 33 | #ifndef HTSJAVA_DEFH 34 | #define HTSJAVA_DEFH 35 | 36 | #ifndef HTS_DEF_FWSTRUCT_JAVA_HEADER 37 | #define HTS_DEF_FWSTRUCT_JAVA_HEADER 38 | typedef struct JAVA_HEADER JAVA_HEADER; 39 | #endif 40 | struct JAVA_HEADER { 41 | unsigned long int magic; 42 | unsigned short int minor; 43 | unsigned short int major; 44 | unsigned short int count; 45 | }; 46 | 47 | #ifndef HTS_DEF_FWSTRUCT_RESP_STRUCT 48 | #define HTS_DEF_FWSTRUCT_RESP_STRUCT 49 | typedef struct RESP_STRUCT RESP_STRUCT; 50 | #endif 51 | struct RESP_STRUCT { 52 | int file_position; 53 | // 54 | unsigned int index1; 55 | unsigned int type; 56 | char name[1024]; 57 | }; 58 | 59 | /* Library internal definictions */ 60 | #ifdef HTS_INTERNAL_BYTECODE 61 | 62 | EXTERNAL_FUNCTION int hts_plug_java(httrackp * opt, const char *argv); 63 | 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /src/htsmd5.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: htsmd5.c subroutines: */ 30 | /* generate a md5 hash */ 31 | /* */ 32 | /* Written March 1993 by Branko Lankester */ 33 | /* Modified June 1993 by Colin Plumb for altered md5.c. */ 34 | /* Modified October 1995 by Erik Troan for RPM */ 35 | /* Modified 2000 by Xavier Roche for domd5mem */ 36 | /* ------------------------------------------------------------ */ 37 | 38 | #ifndef HTSMD5_DEFH 39 | #define HTSMD5_DEFH 40 | 41 | /* Library internal definictions */ 42 | #ifdef HTS_INTERNAL_BYTECODE 43 | int domd5mem(const char *buf, size_t len, char *digest, int asAscii); 44 | unsigned long int md5sum32(const char *buff); 45 | void md5selftest(void); 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/htsrobots.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* robots.txt (website robot file) */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSROBOTS_DEFH 35 | #define HTSROBOTS_DEFH 36 | 37 | // robots wizard 38 | #ifndef HTS_DEF_FWSTRUCT_robots_wizard 39 | #define HTS_DEF_FWSTRUCT_robots_wizard 40 | typedef struct robots_wizard robots_wizard; 41 | #endif 42 | struct robots_wizard { 43 | char adr[128]; 44 | char token[4096]; 45 | struct robots_wizard *next; 46 | }; 47 | 48 | /* Library internal definictions */ 49 | #ifdef HTS_INTERNAL_BYTECODE 50 | int checkrobots(robots_wizard * robots, const char *adr, const char *fil); 51 | void checkrobots_free(robots_wizard * robots); 52 | int checkrobots_set(robots_wizard * robots, const char *adr, const char *data); 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/htsthread.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: Threads */ 30 | /* Author: Xavier Roche */ 31 | /* ------------------------------------------------------------ */ 32 | 33 | #ifndef HTS_DEFTHREAD 34 | #define HTS_DEFTHREAD 35 | 36 | #include "htsglobal.h" 37 | #ifndef _WIN32 38 | #include 39 | #endif 40 | #ifdef _WIN32 41 | #include "windows.h" 42 | #endif 43 | #ifndef USE_BEGINTHREAD 44 | #error needs USE_BEGINTHREAD 45 | #endif 46 | 47 | /* Forward definition */ 48 | #ifndef HTS_DEF_FWSTRUCT_htsmutex_s 49 | #define HTS_DEF_FWSTRUCT_htsmutex_s 50 | typedef struct htsmutex_s htsmutex_s, *htsmutex; 51 | #endif 52 | #define HTSMUTEX_INIT NULL 53 | 54 | #ifdef _WIN32 55 | struct htsmutex_s { 56 | HANDLE handle; 57 | }; 58 | #else /* #ifdef _WIN32 */ 59 | struct htsmutex_s { 60 | pthread_mutex_t handle; 61 | }; 62 | #endif /* #ifdef _WIN32 */ 63 | 64 | /* Library internal definictions */ 65 | HTSEXT_API int hts_newthread(void (*fun) (void *arg), void *arg); 66 | 67 | HTSEXT_API void htsthread_wait_n(int n_wait); 68 | 69 | /* Locking functions */ 70 | HTSEXT_API void hts_mutexinit(htsmutex * mutex); 71 | HTSEXT_API void hts_mutexfree(htsmutex * mutex); 72 | HTSEXT_API void hts_mutexlock(htsmutex * mutex); 73 | HTSEXT_API void hts_mutexrelease(htsmutex * mutex); 74 | 75 | #ifdef HTS_INTERNAL_BYTECODE 76 | /* Thread initialization */ 77 | HTSEXT_API void htsthread_init(void); 78 | HTSEXT_API void htsthread_uninit(void); 79 | #endif 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /src/htswizard.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* wizard system (accept/refuse links) */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSWIZARD_DEFH 35 | #define HTSWIZARD_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | 40 | #include "htsglobal.h" 41 | 42 | /* Forward definitions */ 43 | #ifndef HTS_DEF_FWSTRUCT_httrackp 44 | #define HTS_DEF_FWSTRUCT_httrackp 45 | typedef struct httrackp httrackp; 46 | #endif 47 | #ifndef HTS_DEF_FWSTRUCT_lien_url 48 | #define HTS_DEF_FWSTRUCT_lien_url 49 | typedef struct lien_url lien_url; 50 | #endif 51 | 52 | int hts_acceptlink(httrackp * opt, int ptr, 53 | const char *adr, const char *fil, 54 | const char *tag, const char *attribute, 55 | int *set_prio_to_0, int *just_test_it); 56 | int hts_testlinksize(httrackp * opt, const char *adr, const char *fil, LLint size); 57 | int hts_acceptmime(httrackp * opt, int ptr, 58 | const char *adr, const char *fil, const char *mime); 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/htswrap.c: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* wrapper system (for shell */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | /* Internal engine bytecode */ 35 | #define HTS_INTERNAL_BYTECODE 36 | 37 | #include "htswrap.h" 38 | #include "htshash.h" 39 | #include "coucal.h" 40 | #include "htslib.h" 41 | 42 | HTSEXT_API int htswrap_init(void) { // LEGACY 43 | return 1; 44 | } 45 | 46 | HTSEXT_API int htswrap_free(void) { // LEGACY 47 | return 1; 48 | } 49 | 50 | HTSEXT_API int htswrap_add(httrackp * opt, const char *name, void *fct) { 51 | return hts_set_callback((t_hts_htmlcheck_callbacks *) opt->callbacks_fun, 52 | name, fct); 53 | } 54 | 55 | HTSEXT_API uintptr_t htswrap_read(httrackp * opt, const char *name) { 56 | return (uintptr_t) hts_get_callback((t_hts_htmlcheck_callbacks *) opt-> 57 | callbacks_fun, name); 58 | } 59 | -------------------------------------------------------------------------------- /src/htswrap.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: httrack.c subroutines: */ 30 | /* wrapper system (for shell */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTSWRAP_DEFH 35 | #define HTSWRAP_DEFH 36 | 37 | /* Library internal definictions */ 38 | #ifdef HTS_INTERNAL_BYTECODE 39 | 40 | #include "htsglobal.h" 41 | #include "coucal.h" 42 | 43 | /* Forward definitions */ 44 | #ifndef HTS_DEF_FWSTRUCT_httrackp 45 | #define HTS_DEF_FWSTRUCT_httrackp 46 | typedef struct httrackp httrackp; 47 | #endif 48 | 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | HTSEXT_API int htswrap_init(void); // LEGACY 54 | HTSEXT_API int htswrap_free(void); // LEGACY 55 | 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | 60 | //HTSEXT_API int htswrap_add(httrackp * opt, const char *name, void *fct); 61 | //HTSEXT_API uintptr_t htswrap_read(httrackp * opt, const char *name); 62 | 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /src/htszlib.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: Unpacking subroutines using Jean-loup Gailly's Zlib */ 30 | /* for http compressed data */ 31 | /* Author: Xavier Roche */ 32 | /* ------------------------------------------------------------ */ 33 | 34 | #ifndef HTS_DEFZLIB 35 | #define HTS_DEFZLIB 36 | 37 | /* ZLib */ 38 | #include "zlib.h" 39 | //#include "zutil.h" 40 | 41 | /* MiniZip */ 42 | #include "minizip/zip.h" 43 | #include "minizip/unzip.h" 44 | #include "minizip/mztools.h" 45 | 46 | /* Library internal definictions */ 47 | #ifdef HTS_INTERNAL_BYTECODE 48 | extern int hts_zunpack(char *filename, char *newfile); 49 | extern int hts_extract_meta(const char *path); 50 | extern const char *hts_get_zerror(int err); 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/httrack-cli/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/httrack.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "httrack"=.\httrack.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name libhttrack 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "libhttrack"=.\libhttrack\libhttrack.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /src/httrack.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Important notes: 20 | 21 | - We hereby ask people using this source NOT to use it in purpose of grabbing 22 | emails addresses, or collecting any other private information on persons. 23 | This would disgrace our work, and spoil the many hours we spent on it. 24 | 25 | Please visit our Website: http://www.httrack.com 26 | */ 27 | 28 | /* ------------------------------------------------------------ */ 29 | /* File: htsshow.c console progress info */ 30 | /* Author: Xavier Roche */ 31 | /* ------------------------------------------------------------ */ 32 | 33 | #ifndef HTSTOOLS_DEFH 34 | #define HTSTOOLS_DEFH 35 | 36 | #include "htsglobal.h" 37 | #include "htscore.h" 38 | #include "htssafe.h" 39 | 40 | #ifndef HTS_DEF_FWSTRUCT_t_StatsBuffer 41 | #define HTS_DEF_FWSTRUCT_t_StatsBuffer 42 | typedef struct t_StatsBuffer t_StatsBuffer; 43 | #endif 44 | struct t_StatsBuffer { 45 | char name[1024]; 46 | char file[1024]; 47 | char state[256]; 48 | char BIGSTK url_sav[HTS_URLMAXSIZE * 2]; // pour cancel 49 | char BIGSTK url_adr[HTS_URLMAXSIZE * 2]; 50 | char BIGSTK url_fil[HTS_URLMAXSIZE * 2]; 51 | LLint size; 52 | LLint sizetot; 53 | int offset; 54 | // 55 | int back; 56 | // 57 | int actived; // pour disabled 58 | }; 59 | 60 | #ifndef HTS_DEF_FWSTRUCT_t_InpInfo 61 | #define HTS_DEF_FWSTRUCT_t_InpInfo 62 | typedef struct t_InpInfo t_InpInfo; 63 | #endif 64 | struct t_InpInfo { 65 | int ask_refresh; 66 | int refresh; 67 | LLint stat_bytes; 68 | int stat_time; 69 | int lien_n; 70 | int lien_tot; 71 | int stat_nsocket; 72 | int rate; 73 | int irate; 74 | int ft; 75 | LLint stat_written; 76 | int stat_updated; 77 | int stat_errors; 78 | int stat_warnings; 79 | int stat_infos; 80 | TStamp stat_timestart; 81 | int stat_back; 82 | }; 83 | 84 | int main(int argc, char** argv); 85 | #endif 86 | 87 | extern HTSEXT_API hts_stat_struct HTS_STAT; 88 | extern int _DEBUG_HEAD; 89 | extern FILE* ioinfo; 90 | -------------------------------------------------------------------------------- /src/libhttrack.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libhttrack"=.\libhttrack.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /src/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef MD5_H 2 | #define MD5_H 3 | 4 | #ifdef _WIN32 5 | #ifndef SIZEOF_LONG 6 | #define SIZEOF_LONG 4 7 | #endif 8 | #else 9 | #include "config.h" 10 | #endif 11 | 12 | #if SIZEOF_LONG==8 13 | typedef unsigned int uint32; 14 | #elif SIZEOF_LONG==4 15 | typedef unsigned long uint32; 16 | #else 17 | #error undefined: SIZEOF_LONG 18 | #endif 19 | 20 | struct MD5Context { 21 | union { 22 | unsigned char ui8[64]; 23 | uint32 ui32[16]; 24 | } in; 25 | uint32 buf[4]; 26 | uint32 bits[2]; 27 | int doByteReverse; 28 | }; 29 | 30 | void MD5Init(struct MD5Context *context, int brokenEndian); 31 | void MD5Update(struct MD5Context *context, unsigned char const *buf, 32 | unsigned len); 33 | void MD5Final(unsigned char digest[16], struct MD5Context *context); 34 | void MD5Transform(uint32 buf[4], uint32 const in[16]); 35 | 36 | int mdfile(char *fn, unsigned char *digest); 37 | int mdbinfile(char *fn, unsigned char *bindigest); 38 | 39 | /* These assume a little endian machine and return incorrect results! 40 | They are here for compatibility with old (broken) versions of RPM */ 41 | int mdfileBroken(char *fn, unsigned char *digest); 42 | int mdbinfileBroken(char *fn, unsigned char *bindigest); 43 | 44 | /* 45 | * This is needed to make RSAREF happy on some MS-DOS compilers. 46 | */ 47 | typedef struct MD5Context MD5CTX; 48 | 49 | #endif /* !MD5_H */ 50 | -------------------------------------------------------------------------------- /src/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/proxy/AUTHORS: -------------------------------------------------------------------------------- 1 | Xavier Roche 2 | -------------------------------------------------------------------------------- /src/proxy/changelog.txt: -------------------------------------------------------------------------------- 1 | 0.5 - May 8 2006 2 | - added ARC (Internet Archive 1.0) file format 3 | - first index output routines (proxytrack --convert ..) 4 | 5 | 0.4 - Sept 18 2005 6 | - implemented very limited WebDAV (RFC2518) primitives 7 | - index enumeration fixes 8 | - limited access to the proxy server through HTTP in non-proxy mode 9 | 10 | 0.3 - Sept 10 2005 11 | - implemented ICPv2 server (tested with Squid Web Proxy Cache) implementing ICP_OP_QUERY and ICP_OP_SECHO 12 | - redirects for URLs with missing ending '/' 13 | - fixed htsnet.h macro errors (bogus port during address copy) 14 | - keep-alive fixes 15 | 16 | 0.2 - Sept 4 2005 17 | - hack to fix the "external files stored as absolute references" bug 18 | - proper locking for indexes (unlocked zFile) 19 | - added previous httrack .dat/.ndx cache format 20 | - added catalog as index fallback 21 | - started to write ICPv2 server (RFC2186), but not yet ready 22 | 23 | 0.1 - Aug 27 2005 24 | - initial release: HTTP (RFC2616) proxy and aggregation ready 25 | -------------------------------------------------------------------------------- /src/proxy/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/proxy/proxystrings.h: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------ */ 2 | /* 3 | HTTrack Website Copier, Offline Browser for Windows and Unix 4 | Copyright (C) 1998-2017 Xavier Roche and other contributors 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | 19 | Please visit our Website: http://www.httrack.com 20 | */ 21 | 22 | /* ------------------------------------------------------------ */ 23 | /* File: Strings */ 24 | /* Author: Xavier Roche */ 25 | /* ------------------------------------------------------------ */ 26 | 27 | // Strings a bit safer than static buffers 28 | 29 | #ifndef HTS_PROXYSTRINGS_DEFSTATIC 30 | #define HTS_PROXYSTRINGS_DEFSTATIC 31 | 32 | #include "htsstrings.h" 33 | 34 | /* Tools */ 35 | 36 | HTS_UNUSED static int ehexh(char c) { 37 | if ((c >= '0') && (c <= '9')) 38 | return c - '0'; 39 | if ((c >= 'a') && (c <= 'f')) 40 | c -= ('a' - 'A'); 41 | if ((c >= 'A') && (c <= 'F')) 42 | return (c - 'A' + 10); 43 | return 0; 44 | } 45 | 46 | HTS_UNUSED static int ehex(const char *s) { 47 | return 16 * ehexh(*s) + ehexh(*(s + 1)); 48 | } 49 | 50 | HTS_UNUSED static void unescapehttp(const char *s, String * tempo) { 51 | int i; 52 | 53 | for(i = 0; s[i] != '\0'; i++) { 54 | if (s[i] == '%' && s[i + 1] == '%') { 55 | i++; 56 | StringAddchar(*tempo, '%'); 57 | } else if (s[i] == '%') { 58 | char hc; 59 | 60 | i++; 61 | hc = (char) ehex(s + i); 62 | StringAddchar(*tempo, (char) hc); 63 | i++; // sauter 2 caractères finalement 64 | } else if (s[i] == '+') { 65 | StringAddchar(*tempo, ' '); 66 | } else 67 | StringAddchar(*tempo, s[i]); 68 | } 69 | } 70 | 71 | HTS_UNUSED static void escapexml(const char *s, String * tempo) { 72 | int i; 73 | 74 | for(i = 0; s[i] != '\0'; i++) { 75 | if (s[i] == '&') 76 | StringCat(*tempo, "&"); 77 | else if (s[i] == '<') 78 | StringCat(*tempo, "<"); 79 | else if (s[i] == '>') 80 | StringCat(*tempo, ">"); 81 | else if (s[i] == '\"') 82 | StringCat(*tempo, """); 83 | else 84 | StringAddchar(*tempo, s[i]); 85 | } 86 | } 87 | 88 | HTS_UNUSED static char* file_convert(char *dest, size_t size, const char *src) { 89 | size_t i; 90 | for(i = 0 ; src[i] != '\0' && i + 1 < size ; i++) { 91 | #ifdef _WIN32 92 | if (src[i] == '/') { 93 | dest[i] = '\\'; 94 | } else { 95 | #endif 96 | dest[i] = src[i]; 97 | #ifdef _WIN32 98 | } 99 | #endif 100 | } 101 | dest[i] = '\0'; 102 | return dest; 103 | } 104 | 105 | #endif 106 | -------------------------------------------------------------------------------- /src/proxy/proxytrack.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | Source Files 50 | 51 | 52 | Source Files 53 | 54 | 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | 67 | 68 | Resource Files 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/vendor/README.md: -------------------------------------------------------------------------------- 1 | The 3 safe_ files here are just taken from the official releases that match the tag for the current checkout. We do this to avoid any autoconf dependency or build requirements for them. -------------------------------------------------------------------------------- /src/vendor/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derrived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /src/vendor/minizip/MiniZip64_info.txt: -------------------------------------------------------------------------------- 1 | MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson 2 | 3 | Introduction 4 | --------------------- 5 | MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0. 8 | All possible work was done for compatibility. 9 | 10 | 11 | Background 12 | --------------------- 13 | When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64 14 | support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ ) 15 | 16 | That was used as a starting point. And after that ZIP64 support was added to zip.c 17 | some refactoring and code cleanup was also done. 18 | 19 | 20 | Changed from MiniZip 1.0 to MiniZip 1.1 21 | --------------------------------------- 22 | * Added ZIP64 support for unzip ( by Even Rouault ) 23 | * Added ZIP64 support for zip ( by Mathias Svensson ) 24 | * Reverted some changed that Even Rouault did. 25 | * Bunch of patches received from Gulles Vollant that he received for MiniZip from various users. 26 | * Added unzip patch for BZIP Compression method (patch create by Daniel Borca) 27 | * Added BZIP Compress method for zip 28 | * Did some refactoring and code cleanup 29 | 30 | 31 | Credits 32 | 33 | Gilles Vollant - Original MiniZip author 34 | Even Rouault - ZIP64 unzip Support 35 | Daniel Borca - BZip Compression method support in unzip 36 | Mathias Svensson - ZIP64 zip support 37 | Mathias Svensson - BZip Compression method support in zip 38 | 39 | Resources 40 | 41 | ZipLayout http://result42.com/projects/ZipFileLayout 42 | Command line tool for Windows that shows the layout and information of the headers in a zip archive. 43 | Used when debugging and validating the creation of zip files using MiniZip64 44 | 45 | 46 | ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT 47 | Zip File specification 48 | 49 | 50 | Notes. 51 | * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined. 52 | 53 | License 54 | ---------------------------------------------------------- 55 | Condition of use and distribution are the same than zlib : 56 | 57 | This software is provided 'as-is', without any express or implied 58 | warranty. In no event will the authors be held liable for any damages 59 | arising from the use of this software. 60 | 61 | Permission is granted to anyone to use this software for any purpose, 62 | including commercial applications, and to alter it and redistribute it 63 | freely, subject to the following restrictions: 64 | 65 | 1. The origin of this software must not be misrepresented; you must not 66 | claim that you wrote the original software. If you use this software 67 | in a product, an acknowledgment in the product documentation would be 68 | appreciated but is not required. 69 | 2. Altered source versions must be plainly marked as such, and must not be 70 | misrepresented as being the original software. 71 | 3. This notice may not be removed or altered from any source distribution. 72 | 73 | ---------------------------------------------------------- 74 | 75 | -------------------------------------------------------------------------------- /src/vendor/minizip/ioapi.c.diff: -------------------------------------------------------------------------------- 1 | --- ioapi.c.orig 2014-06-10 18:55:32.778807408 +0200 2 | +++ ioapi.c 2014-06-22 12:22:06.606696274 +0200 3 | @@ -14,7 +14,7 @@ 4 | #define _CRT_SECURE_NO_WARNINGS 5 | #endif 6 | 7 | -#if defined(__APPLE__) || defined(IOAPI_NO_64) 8 | +#if defined(__APPLE__) || defined(__ANDROID__) || defined(IOAPI_NO_64) 9 | // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions 10 | #define FOPEN_FUNC(filename, mode) fopen(filename, mode) 11 | #define FTELLO_FUNC(stream) ftello(stream) 12 | @@ -73,6 +73,7 @@ 13 | p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; 14 | p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; 15 | p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; 16 | + p_filefunc64_32->zfile_func64.zflush_file = p_filefunc32->zflush_file; 17 | p_filefunc64_32->zfile_func64.ztell64_file = NULL; 18 | p_filefunc64_32->zfile_func64.zseek64_file = NULL; 19 | p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; 20 | @@ -89,6 +90,8 @@ 21 | static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); 22 | static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); 23 | static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); 24 | +static int ZCALLBACK fflush_file_func OF((voidpf opaque, voidpf stream)); 25 | + 26 | static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); 27 | static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); 28 | 29 | @@ -206,6 +209,12 @@ 30 | return ret; 31 | } 32 | 33 | +static int ZCALLBACK fflush_file_func (voidpf opaque, voidpf stream) 34 | +{ 35 | + int ret; 36 | + ret = fflush((FILE *)stream); 37 | + return ret; 38 | +} 39 | 40 | static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) 41 | { 42 | @@ -221,14 +230,14 @@ 43 | return ret; 44 | } 45 | 46 | -void fill_fopen_filefunc (pzlib_filefunc_def) 47 | - zlib_filefunc_def* pzlib_filefunc_def; 48 | +void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def) 49 | { 50 | pzlib_filefunc_def->zopen_file = fopen_file_func; 51 | pzlib_filefunc_def->zread_file = fread_file_func; 52 | pzlib_filefunc_def->zwrite_file = fwrite_file_func; 53 | pzlib_filefunc_def->ztell_file = ftell_file_func; 54 | pzlib_filefunc_def->zseek_file = fseek_file_func; 55 | + pzlib_filefunc_def->zflush_file = fflush_file_func; 56 | pzlib_filefunc_def->zclose_file = fclose_file_func; 57 | pzlib_filefunc_def->zerror_file = ferror_file_func; 58 | pzlib_filefunc_def->opaque = NULL; 59 | @@ -241,6 +250,7 @@ 60 | pzlib_filefunc_def->zwrite_file = fwrite_file_func; 61 | pzlib_filefunc_def->ztell64_file = ftell64_file_func; 62 | pzlib_filefunc_def->zseek64_file = fseek64_file_func; 63 | + pzlib_filefunc_def->zflush_file = fflush_file_func; 64 | pzlib_filefunc_def->zclose_file = fclose_file_func; 65 | pzlib_filefunc_def->zerror_file = ferror_file_func; 66 | pzlib_filefunc_def->opaque = NULL; 67 | -------------------------------------------------------------------------------- /src/vendor/minizip/ioapi.h.diff: -------------------------------------------------------------------------------- 1 | --- ioapi.h.orig 2012-01-17 03:51:31.000000000 +0100 2 | +++ ioapi.h 2014-06-08 21:54:18.326360527 +0200 3 | @@ -67,6 +67,24 @@ 4 | #endif 5 | #endif 6 | 7 | +/* As reported by sammyx, z_crc_t and z_const are not defined in pre-1.2.70 releases of zlib */ 8 | +/* See */ 9 | +#if ZLIB_VERNUM < 0x1270 10 | + 11 | +#ifdef Z_U4 12 | + typedef Z_U4 z_crc_t; 13 | +#else 14 | + typedef unsigned long z_crc_t; 15 | +#endif 16 | + 17 | +#if defined(ZLIB_CONST) && !defined(z_const) 18 | +# define z_const const 19 | +#else 20 | +# define z_const 21 | +#endif 22 | + 23 | +#endif 24 | + 25 | /* 26 | #ifndef ZPOS64_T 27 | #ifdef _WIN32 28 | @@ -135,6 +153,7 @@ 29 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); 30 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); 31 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); 32 | +typedef int (ZCALLBACK *flush_file_func) OF((voidpf opaque, voidpf stream)); 33 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); 34 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); 35 | 36 | @@ -148,6 +167,7 @@ 37 | open_file_func zopen_file; 38 | read_file_func zread_file; 39 | write_file_func zwrite_file; 40 | + flush_file_func zflush_file; 41 | tell_file_func ztell_file; 42 | seek_file_func zseek_file; 43 | close_file_func zclose_file; 44 | @@ -164,6 +184,7 @@ 45 | open64_file_func zopen64_file; 46 | read_file_func zread_file; 47 | write_file_func zwrite_file; 48 | + flush_file_func zflush_file; 49 | tell64_file_func ztell64_file; 50 | seek64_file_func zseek64_file; 51 | close_file_func zclose_file; 52 | @@ -186,6 +207,7 @@ 53 | 54 | #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) 55 | #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) 56 | +#define ZFLUSH64(filefunc,filestream) ((*((filefunc).zfile_func64.zflush_file)) ((filefunc).zfile_func64.opaque,filestream)) 57 | //#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) 58 | //#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) 59 | #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) 60 | -------------------------------------------------------------------------------- /src/vendor/minizip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); 22 | void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def)); 23 | void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def)); 24 | void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def)); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /src/vendor/minizip/mztools.c.diff: -------------------------------------------------------------------------------- 1 | --- mztools.c.orig 2012-01-21 20:58:45.000000000 +0100 2 | +++ mztools.c 2014-05-24 13:27:22.516230485 +0200 3 | @@ -10,6 +10,7 @@ 4 | #include 5 | #include "zlib.h" 6 | #include "unzip.h" 7 | +#include "mztools.h" 8 | 9 | #define READ_8(adr) ((unsigned char)*(adr)) 10 | #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) ) 11 | @@ -27,12 +28,9 @@ 12 | WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \ 13 | } while(0) 14 | 15 | -extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered) 16 | -const char* file; 17 | -const char* fileOut; 18 | -const char* fileOutTmp; 19 | -uLong* nRecovered; 20 | -uLong* bytesRecovered; 21 | +int ZEXPORT unzRepair(const char* file, const char* fileOut, 22 | + const char* fileOutTmp, uLong* nRecovered, 23 | + uLong* bytesRecovered) 24 | { 25 | int err = Z_OK; 26 | FILE* fpZip = fopen(file, "rb"); 27 | @@ -147,8 +145,8 @@ 28 | /* Central directory entry */ 29 | { 30 | char header[46]; 31 | - char* comment = ""; 32 | - int comsize = (int) strlen(comment); 33 | + const char* comment = ""; 34 | + const size_t comsize = strlen(comment); 35 | WRITE_32(header, 0x02014b50); 36 | WRITE_16(header + 4, version); 37 | WRITE_16(header + 6, version); 38 | @@ -195,7 +193,7 @@ 39 | 40 | /* Comment field */ 41 | if (comsize > 0) { 42 | - if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) { 43 | + if (fwrite(comment, 1, comsize, fpOutCD) == comsize) { 44 | offsetCD += comsize; 45 | } else { 46 | err = Z_ERRNO; 47 | @@ -222,8 +220,8 @@ 48 | { 49 | int entriesZip = entries; 50 | char header[22]; 51 | - char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; 52 | - int comsize = (int) strlen(comment); 53 | + const char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools"; 54 | + const size_t comsize = strlen(comment); 55 | if (entriesZip > 0xffff) { 56 | entriesZip = 0xffff; 57 | } 58 | @@ -241,7 +239,7 @@ 59 | 60 | /* Comment field */ 61 | if (comsize > 0) { 62 | - if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) { 63 | + if (fwrite(comment, 1, comsize, fpOutCD) != comsize) { 64 | err = Z_ERRNO; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/vendor/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/vendor/minizip/zip.h.diff: -------------------------------------------------------------------------------- 1 | --- zip.h.orig 2010-02-15 12:58:22.000000000 +0100 2 | +++ zip.h 2014-05-24 13:47:52.838188589 +0200 3 | @@ -144,6 +144,11 @@ 4 | zipcharpc* globalcomment, 5 | zlib_filefunc64_def* pzlib_filefunc_def)); 6 | 7 | +extern zipFile ZEXPORT zipOpen3 OF((const void *pathname, 8 | + int append, 9 | + zipcharpc* globalcomment, 10 | + zlib_filefunc64_32_def* pzlib_filefunc64_32_def)); 11 | + 12 | extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, 13 | const char* filename, 14 | const zip_fileinfo* zipfi, 15 | @@ -311,6 +316,11 @@ 16 | Write data in the zipfile 17 | */ 18 | 19 | +extern int ZEXPORT zipFlush OF((zipFile file)); 20 | +/* 21 | + Flush the zipfile output 22 | +*/ 23 | + 24 | extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); 25 | /* 26 | Close the current file in the zipfile 27 | -------------------------------------------------------------------------------- /src/vendor/path-join/Readme.md: -------------------------------------------------------------------------------- 1 | https://github.com/stephenmathieson/path-join.c 2 | # path-join 3 | 4 | Join a path 5 | 6 | ## Installation 7 | 8 | Install with [clib(1)](https://github.com/clibs/clib): 9 | 10 | $ clib install stephenmathieson/path-join.c 11 | 12 | ## API 13 | 14 | ### `char *path_join(const char *dir, const char *file)` 15 | 16 | Join `dir` and `file`, seperating with `/` (or `\\` on Windows) 17 | 18 | ## License 19 | 20 | (The MIT License) 21 | 22 | Copyright (c) 2013 Stephen Mathieson <me@stephenmathieson.com> 23 | 24 | Permission is hereby granted, free of charge, to any person obtaining 25 | a copy of this software and associated documentation files (the 26 | 'Software'), to deal in the Software without restriction, including 27 | without limitation the rights to use, copy, modify, merge, publish, 28 | distribute, sublicense, and/or sell copies of the Software, and to 29 | permit persons to whom the Software is furnished to do so, subject to 30 | the following conditions: 31 | 32 | The above copyright notice and this permission notice shall be 33 | included in all copies or substantial portions of the Software. 34 | 35 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 36 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 37 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 38 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 39 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 40 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 41 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/vendor/path-join/path-join.c: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // path-join.c 4 | // 5 | // Copyright (c) 2013 Stephen Mathieson 6 | // MIT licensed 7 | // 8 | 9 | #include 10 | #include 11 | 12 | #include "str-ends-with.h" 13 | #include "str-starts-with.h" 14 | #include "path-join.h" 15 | #include "../PlatformFixes.h" 16 | 17 | #define WIN_PATH_JOIN_SEPERATOR "\\" 18 | 19 | #define PATH_JOIN_SEPERATOR "/" 20 | 21 | 22 | /* 23 | * Join `dir` with `file` 24 | */ 25 | char* replace_char(char* str, char find, char replace); 26 | char* replace_char(char* str, char find, char replace) { 27 | char* current_pos = strchr(str, find); 28 | while (current_pos) { 29 | *current_pos = replace; 30 | current_pos = strchr(current_pos, find); 31 | } 32 | return str; 33 | } 34 | char * 35 | path_join(const char *dir, const char *file) { 36 | size_t size = strlen(dir) + strlen(file) + 2; 37 | char *buf = malloc(size * sizeof(char)); 38 | if (NULL == buf) return NULL; 39 | 40 | strcpy_s(buf, size * sizeof(char), dir); 41 | 42 | // add the sep if necessary 43 | if (!str_ends_with(dir, PATH_JOIN_SEPERATOR) && !str_ends_with(dir, WIN_PATH_JOIN_SEPERATOR)) 44 | strcat_s(buf, size * sizeof(char), PATH_JOIN_SEPERATOR); 45 | 46 | 47 | // remove the sep if necessary 48 | if (str_starts_with(file, PATH_JOIN_SEPERATOR) || str_starts_with(file, WIN_PATH_JOIN_SEPERATOR)) 49 | file++; 50 | 51 | strcat_s(buf, size * sizeof(char), file); 52 | replace_char(buf, WIN_PATH_JOIN_SEPERATOR[0], PATH_JOIN_SEPERATOR[0]);//not needed win is fine with bopth but might a well 53 | 54 | return buf; 55 | } 56 | -------------------------------------------------------------------------------- /src/vendor/path-join/path-join.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // path-join.h 4 | // 5 | // Copyright (c) 2013 Stephen Mathieson 6 | // MIT licensed 7 | // 8 | 9 | 10 | #ifndef PATH_JOIN_H 11 | #define PATH_JOIN_H 1 12 | 13 | char * 14 | path_join(const char *, const char *); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/vendor/path-join/str-ends-with.c: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // str-ends-with.c 4 | // 5 | // Copyright (c) 2013 Stephen Mathieson 6 | // MIT licensed 7 | // 8 | 9 | #include 10 | #include 11 | #include "str-ends-with.h" 12 | 13 | bool str_ends_with(const char *str, const char *end) { 14 | size_t end_len; 15 | size_t str_len; 16 | 17 | if (NULL == str || NULL == end) return false; 18 | 19 | end_len = strlen(end); 20 | str_len = strlen(str); 21 | 22 | return str_len < end_len 23 | ? false 24 | : !strcmp(str + str_len - end_len, end); 25 | } 26 | -------------------------------------------------------------------------------- /src/vendor/path-join/str-ends-with.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // str-ends-with.h 4 | // 5 | // Copyright (c) 2013 Stephen Mathieson 6 | // MIT licensed 7 | // 8 | 9 | 10 | #ifndef STR_ENDS_WITH 11 | #define STR_ENDS_WITH 12 | 13 | #include 14 | #include 15 | 16 | bool str_ends_with(const char *str, const char *end); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/vendor/path-join/str-starts-with.c: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // str-starts-with.c 4 | // 5 | // Copyright (c) 2013 Stephen Mathieson 6 | // MIT licensed 7 | // 8 | 9 | #include 10 | #include 11 | #include "str-starts-with.h" 12 | 13 | bool str_starts_with(const char *str, const char *start) { 14 | for (; ; str++, start++) 15 | if (!*start) 16 | return true; 17 | else if (*str != *start) 18 | return false; 19 | } 20 | -------------------------------------------------------------------------------- /src/vendor/path-join/str-starts-with.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // str-starts-with.h 4 | // 5 | // Copyright (c) 2013 Stephen Mathieson 6 | // MIT licensed 7 | // 8 | 9 | 10 | #ifndef STR_STARTS_WITH 11 | #define STR_STARTS_WITH 12 | 13 | #include 14 | 15 | bool str_starts_with(const char *str, const char *start); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/web/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/web/webhttrack.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "libhttrack"=..\libhttrack\libhttrack.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "webhttrack"=.\webhttrack.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | Begin Project Dependency 27 | Project_Dep_Name libhttrack 28 | End Project Dependency 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /src/web/webhttrack.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {e3bb87d9-c0b8-4a64-b588-2af5a7818118} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {049c3fc0-4024-4bbd-acd8-c833e21f52c7} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {19607e1a-6de4-4e05-811c-c5b9b44b06e5} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /templates/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | templatesdir = $(datadir)/httrack/templates 3 | templates_DATA = index-body.html index-header.html topindex-footer.html \ 4 | index-footer.html topindex-body.html topindex-header.html \ 5 | topindex-bodycat.html 6 | 7 | EXTRA_DIST = $(templates_DATA) 8 | -------------------------------------------------------------------------------- /templates/index-body.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | · 4 | 5 | %s 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /templates/index-footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 |
6 | Mirror and index made by HTTrack Website Copier [XR&CO'2008] 7 |
8 | %s 9 | 10 | %s 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /templates/topindex-body.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | · %s 4 | 5 | 6 | -------------------------------------------------------------------------------- /templates/topindex-bodycat.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | %s 4 | 5 | -------------------------------------------------------------------------------- /templates/topindex-footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | Mirror and index made by HTTrack Website Copier [XR&CO'2008] 5 |
6 | %s 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 | -------------------------------------------------------------------------------- /tests/00_runnable.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # check that httrack starts 5 | httrack --version >/dev/null 6 | -------------------------------------------------------------------------------- /tests/01_engine-charset.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # minimalistic charset test 5 | test "$(httrack -O /dev/null -#3 "iso-8859-1" "café")" == "café" || exit 1 6 | -------------------------------------------------------------------------------- /tests/01_engine-entities.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # basic entities handling (with boggy entities handling) 5 | test "$(httrack -O /dev/null -#6 "&foo; thé&café&#e9;もののけ姫")" == "&foo; thé&café&#e9;もののけ姫" || exit 1 6 | -------------------------------------------------------------------------------- /tests/01_engine-hashtable.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # httrack internal hashtable autotest on 100K keys 5 | httrack -#7 100000 6 | -------------------------------------------------------------------------------- /tests/01_engine-idna.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # IDNA routine 5 | test "$(httrack -O /dev/null -#4 "www.café.com")" == "www.xn--caf-dma.com" || exit 1 6 | test "$(httrack -O /dev/null -#4 "www.もののけ姫-the-movie.com")" == "www.xn---the-movie-g63irla2z8297c.com" || exit 1 7 | 8 | # reverse IDNA 9 | test "$(httrack -O /dev/null -#5 "www.xn--caf-dma.com")" == "www.café.com" || exit 1 10 | test "$(httrack -O /dev/null -#5 "www.xn---the-movie-g63irla2z8297c.com")" == "www.もののけ姫-the-movie.com" || exit 1 11 | -------------------------------------------------------------------------------- /tests/01_engine-simplify.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # simplify engine 5 | test "$(httrack -O /dev/null -#1 ./foo/bar/)" == "simplified=foo/bar/" || exit 1 6 | test "$(httrack -O /dev/null -#1 ./foo/bar)" == "simplified=foo/bar" || exit 1 7 | test "$(httrack -O /dev/null -#1 ./foo/./bar)" == "simplified=foo/bar" || exit 1 8 | test "$(httrack -O /dev/null -#1 ./foo/bar/.././tmp/foobar)" == "simplified=foo/tmp/foobar" || exit 1 9 | test "$(httrack -O /dev/null -#1 ./foo/bar/.././tmp/foobar/../foobaz)" == "simplified=foo/tmp/foobaz" || exit 1 10 | -------------------------------------------------------------------------------- /tests/10_crawl-simple.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | bash crawl-test.sh --errors 0 --files 5 httrack http://ut.httrack.com/simple/basic.html 7 | -------------------------------------------------------------------------------- /tests/11_crawl-cookies.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | bash crawl-test.sh --errors 0 --files 3 \ 7 | --found ut.httrack.com/cookies/third.html \ 8 | --found ut.httrack.com/cookies/second.html \ 9 | --found ut.httrack.com/cookies/entrance.html \ 10 | httrack http://ut.httrack.com/cookies/entrance.php 11 | -------------------------------------------------------------------------------- /tests/11_crawl-idna.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | # unicode tests 7 | bash crawl-test.sh \ 8 | --errors 1 --files 5 \ 9 | --found 'café.ut.httrack.com/unicode-links/café3860.html' \ 10 | --found 'café.ut.httrack.com/unicode-links/café30f4.html' \ 11 | --found 'café.ut.httrack.com/unicode-links/café5e1f.html' \ 12 | --found 'café.ut.httrack.com/unicode-links/café7b30.html' \ 13 | httrack 'http://ut.httrack.com/unicode-links/idna.html' \ 14 | '+*.ut.httrack.com/*' --robots=0 15 | 16 | # unicode tests (bogus links) 17 | bash crawl-test.sh \ 18 | --errors 0 --files 1 \ 19 | --found 'ut.httrack.com/unicode-links/idna_bogus.html' \ 20 | httrack 'http://ut.httrack.com/unicode-links/idna_bogus.html' \ 21 | '-*' --robots=0 22 | -------------------------------------------------------------------------------- /tests/11_crawl-international.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | # unicode tests 7 | bash crawl-test.sh \ 8 | --errors 1 --files 10 \ 9 | --found ut.httrack.com/unicode-links/caf%a91bce.html \ 10 | --found ut.httrack.com/unicode-links/café30f4.html \ 11 | --found ut.httrack.com/unicode-links/café3860.html \ 12 | --found ut.httrack.com/unicode-links/café463e.html \ 13 | --found ut.httrack.com/unicode-links/café5e1f.html \ 14 | --found ut.httrack.com/unicode-links/café7b30.html \ 15 | --found ut.httrack.com/unicode-links/café8007.html \ 16 | --found ut.httrack.com/unicode-links/café9fa8.html \ 17 | --found ut.httrack.com/unicode-links/caféae52.html \ 18 | --found ut.httrack.com/unicode-links/caféc009.html \ 19 | --found ut.httrack.com/unicode-links/utf8.html \ 20 | httrack http://ut.httrack.com/unicode-links/utf8.html 21 | 22 | bash crawl-test.sh \ 23 | --errors 4 --files 7 \ 24 | --found ut.httrack.com/unicode-links/café3860.html \ 25 | --found ut.httrack.com/unicode-links/café9fa8.html \ 26 | --found ut.httrack.com/unicode-links/café30f4.html \ 27 | --found ut.httrack.com/unicode-links/café5e1f.html \ 28 | --found ut.httrack.com/unicode-links/café7b30.html \ 29 | --found ut.httrack.com/unicode-links/café8007.html \ 30 | --found ut.httrack.com/unicode-links/caf%e939bd.html \ 31 | --found ut.httrack.com/unicode-links/caf%e9ae52.html \ 32 | --found ut.httrack.com/unicode-links/caféaec2.html \ 33 | --found ut.httrack.com/unicode-links/caféfad6.html \ 34 | --found ut.httrack.com/unicode-links/default.html \ 35 | httrack http://ut.httrack.com/unicode-links/default.html 36 | 37 | bash crawl-test.sh \ 38 | --errors 2 --files 9 \ 39 | --found ut.httrack.com/unicode-links/caf%a9ae52.html \ 40 | --found ut.httrack.com/unicode-links/caf%a9bf59.html \ 41 | --found ut.httrack.com/unicode-links/café30f4.html \ 42 | --found ut.httrack.com/unicode-links/café3860.html \ 43 | --found ut.httrack.com/unicode-links/café5e1f.html \ 44 | --found ut.httrack.com/unicode-links/café647f.html \ 45 | --found ut.httrack.com/unicode-links/café7b30.html \ 46 | --found ut.httrack.com/unicode-links/café8007.html \ 47 | --found ut.httrack.com/unicode-links/caféaec2.html \ 48 | --found ut.httrack.com/unicode-links/caféfad6.html \ 49 | --found ut.httrack.com/unicode-links/iso88591.html \ 50 | httrack http://ut.httrack.com/unicode-links/iso88591.html 51 | 52 | bash crawl-test.sh \ 53 | --errors 4 --files 9 \ 54 | --found ut.httrack.com/unicode-links/caf%a8%a6c72a.html \ 55 | --found ut.httrack.com/unicode-links/caf%a9bf59.html \ 56 | --found ut.httrack.com/unicode-links/café8007.html \ 57 | --found ut.httrack.com/unicode-links/cafébf43.html \ 58 | --found ut.httrack.com/unicode-links/cafédcd8.html \ 59 | --found ut.httrack.com/unicode-links/café2461.html \ 60 | --found ut.httrack.com/unicode-links/caf%a8%a61bce.html \ 61 | --found ut.httrack.com/unicode-links/caf%a9ae52.html \ 62 | --found ut.httrack.com/unicode-links/café7b30.html \ 63 | --found ut.httrack.com/unicode-links/café30f4.html \ 64 | --found ut.httrack.com/unicode-links/café5e1f.html \ 65 | --found ut.httrack.com/unicode-links/café3860.html \ 66 | --found ut.httrack.com/unicode-links/gb18030.html \ 67 | httrack http://ut.httrack.com/unicode-links/gb18030.html 68 | -------------------------------------------------------------------------------- /tests/11_crawl-longurl.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | # http://code.google.com/p/httrack/issues/detail?id=42&can=1 7 | # we expect 2 errors only because other links are too longs (to be modified if suitable) 8 | bash crawl-test.sh --errors 2 --files 1 \ 9 | --found ut.httrack.com/overflow/longquerywithaccents.html \ 10 | httrack http://ut.httrack.com/overflow/longquerywithaccents.php 11 | -------------------------------------------------------------------------------- /tests/11_crawl-parsing.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | # http://code.google.com/p/httrack/issues/detail?id=4&can=1 7 | bash crawl-test.sh --errors 0 --files 4 \ 8 | --found ut.httrack.com/parsing/back5e1f.gif \ 9 | --found ut.httrack.com/parsing/events.html \ 10 | --found ut.httrack.com/parsing/fade230f4.gif \ 11 | --found ut.httrack.com/parsing/fade3860.gif \ 12 | httrack http://ut.httrack.com/parsing/events.html 13 | 14 | # http://code.google.com/p/httrack/issues/detail?id=2&can=1 15 | bash crawl-test.sh --errors 0 --files 3 \ 16 | --found ut.httrack.com/parsing/background-image.css \ 17 | --found ut.httrack.com/parsing/background-image.html \ 18 | --found ut.httrack.com/parsing/fade.gif \ 19 | httrack http://ut.httrack.com/parsing/background-image.html 20 | 21 | # javascript parsing 22 | bash crawl-test.sh --errors 0 --files 3 \ 23 | --found ut.httrack.com/parsing/back.gif \ 24 | --found ut.httrack.com/parsing/fade.gif \ 25 | --found ut.httrack.com/parsing/javascript.html \ 26 | httrack http://ut.httrack.com/parsing/javascript.html 27 | 28 | # handling of + before query string 29 | bash crawl-test.sh --errors 0 --files 6 \ 30 | --found ut.httrack.com/parsing/escaping.html \ 31 | --found "ut.httrack.com/parsing/foo bar30f4.html" \ 32 | --found "ut.httrack.com/parsing/foo bar5e1f.html" \ 33 | --found "ut.httrack.com/parsing/foo+bar+plus3860.html" \ 34 | --found "ut.httrack.com/parsing/foo barae52.html" \ 35 | --found "ut.httrack.com/parsing/foo bar7b30.html" \ 36 | httrack http://ut.httrack.com/parsing/escaping.html 37 | 38 | # handling of # encoded in filename 39 | # see http://code.google.com/p/httrack/issues/detail?id=25 40 | bash crawl-test.sh --errors 2 --files 4 \ 41 | --found "ut.httrack.com/parsing/escaping2.html" \ 42 | --found "ut.httrack.com/parsing/++foo++bar++plus++.html" \ 43 | --found "ut.httrack.com/parsing/foo#bar#.html" \ 44 | --found "ut.httrack.com/parsing/foo bar.html" \ 45 | httrack http://ut.httrack.com/parsing/escaping2.html 46 | -------------------------------------------------------------------------------- /tests/12_crawl_https.test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | bash check-network.sh || ! echo "skipping online unit tests" || exit 77 5 | 6 | if test "$HTTPS_SUPPORT" == "no"; then 7 | echo "no https support compiled, skipping" 8 | exit 77 9 | fi 10 | 11 | bash crawl-test.sh --errors 0 --files 5 httrack https://ut.httrack.com/simple/basic.html 12 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = $(TESTS) crawl-test.sh run-all-tests.sh check-network.sh 2 | 3 | TESTS_ENVIRONMENT = 4 | TESTS_ENVIRONMENT += PATH=$(top_builddir)/src$(PATH_SEPARATOR)$$PATH 5 | # note: libtool should handle that 6 | ### TESTS_ENVIRONMENT += $(SHLIBPATH_VAR)="$(top_builddir)/src/$(LT_CV_OBJDIR)$${$(SHLIBPATH_VAR):+$(PATH_SEPARATOR)}$$$(SHLIBPATH_VAR)" 7 | TESTS_ENVIRONMENT += ONLINE_UNIT_TESTS=$(ONLINE_UNIT_TESTS) 8 | TESTS_ENVIRONMENT += HTTPS_SUPPORT=$(HTTPS_SUPPORT) 9 | 10 | TEST_EXTENSIONS = .test 11 | TESTS = 00_runnable.test 01_engine-charset.test 01_engine-entities.test 01_engine-hashtable.test 01_engine-idna.test 01_engine-simplify.test 10_crawl-simple.test 11_crawl-cookies.test 11_crawl-idna.test 11_crawl-international.test 11_crawl-longurl.test 11_crawl-parsing.test 12_crawl_https.test 12 | 13 | CLEANFILES = check-network_sh.cache 14 | -------------------------------------------------------------------------------- /tests/check-network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | # ensure the httrack unit tests are available so that ut will not break 5 | # the build in case of network outage 6 | 7 | # do not enable online tests (./configure --disable-online-unit-tests) 8 | if test "$ONLINE_UNIT_TESTS" == "no"; then 9 | echo "online tests are disabled" >&2 10 | exit 1 11 | 12 | # enable online tests (--enable-online-unit-tests) 13 | elif test "$ONLINE_UNIT_TESTS" == "yes"; then 14 | exit 0 15 | 16 | # check if online tests are reachable 17 | else 18 | 19 | # test url 20 | url=http://ut.httrack.com/enabled 21 | 22 | # cache file name 23 | cache=check-network_sh.cache 24 | 25 | # cached result ? 26 | if test -f $cache ; then 27 | if grep -q "ok" $cache ; then 28 | exit 0 29 | else 30 | echo "online tests are disabled (cached)" >&2 31 | exit 1 32 | fi 33 | 34 | # fetch single file 35 | elif bash crawl-test.sh --errors 0 --files 1 httrack --timeout=3 --max-time=3 "$url" 2>/dev/null >/dev/null ; then 36 | echo "ok" > $cache 37 | exit 0 38 | else 39 | echo "error" > $cache 40 | echo "online tests are disabled (auto)" >&2 41 | exit 1 42 | fi 43 | 44 | fi 45 | -------------------------------------------------------------------------------- /tests/run-all-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | error=0 5 | for i in *.test ; do 6 | if bash $i ; then 7 | echo "$i: passed" >&2 8 | else 9 | echo "$i: ERROR" >&2 10 | error=$[${error}+1] 11 | fi 12 | done 13 | 14 | if test "$error" -eq 0; then 15 | echo "all tests passed" >&2 16 | else 17 | echo "${error} test(s) failed" >&2 18 | fi 19 | 20 | exit $error 21 | --------------------------------------------------------------------------------