HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: error 404 browsing mirrored site...
Author: Xavier Roche
Date: 06/27/2004 13:12
 
You can also adapt the libtest/callbacks-example-filename.c 
example in the HTTrack 3.32 archive and use:

httrack --wrapper save-
name=/usr/share/httrack/libtest/libfilenameiisbug.so:mysaven
ame www.example.com

Using the modified function below.

But you'll need to compile the DLL yoyrself, or use the 
Linux version (the .so example will be included soon)

EXTERNAL_FUNCTION int mysavename(char* adr_complete, char* 
fil_complete, char* referer_adr, char* referer_fil, char* 
save) {
  static const char* iisBogus[]        = 
{ ".com", ".exe", ".dll", ".sh", NULL };
  static const char* iisBogusReplace[] = 
{ ".c0m", ".ex3", ".dl1", ".5h", NULL }; /* MUST be the 
same sizes */
  char* a;
  for(a = save ; *a != '\0' ; a++) {
    int i;
    for(i = 0 ; iisBogus[i] != NULL ; i++) {
      int j;
      for(j = 0 ; iisBogus[i][j] == a[j] && iisBogus[i][j] !
= '\0' ; j++);
      if (iisBogus[i][j] == '\0' && ( a[j] == '\0' || a[j] 
== '/' || a[j] == '\\' ) ) {
        strncpy(a, iisBogusReplace[i], strlen
(iisBogusReplace[i]));
        break;
      }
    }
  }
  return 1;  /* success */
}

 
Reply Create subthread


All articles

Subject Author Date
Re: error 404 browsing mirrored site...

06/27/2004 10:20
Re: error 404 browsing mirrored site...

06/27/2004 13:12




e

Created with FORUM 2.0.11