Filter for unknown file names

BlackWidow scans websites (it's a site ripper). It can download an entire website, or download portions of a site.
Post Reply
Gub238
Posts: 3
Joined: Fri Oct 05, 2012 10:34 am

Filter for unknown file names

Post by Gub238 » Fri Oct 05, 2012 10:47 am

Hello. Can you help me with the filter please.
There is a site containing several PDF documents with unknown names. I can download this documents if i know the full URL (for ex. : http://www.site.my/download/MyDocument1.pdf). Browsing for this folder is prohibit and no index file available. I know that filenames are from 5 to 30 symbols length and may contains Latin letters (A-Z, a-z), numbers (0-9) and symbols “_” and “-“. If i try download file with wrong name, site returns standard 404 error page.
Is it possible to scan this folder for filenames?
Thank you.

User avatar
Support
Site Admin
Posts: 1830
Joined: Sun Oct 02, 2011 10:49 am

Re: Filter for unknown file names

Post by Support » Fri Oct 05, 2012 12:30 pm

The only way to do it is to make a script that will loop all possibilities, from 5 to 30 characters, but this will take years to complete because 30 characters at (a..z, 0..9, - and _) each is 7.45E56 loops! So I'd say, it can not be done.
Your support team.
http://SoftByteLabs.com

Gub238
Posts: 3
Joined: Fri Oct 05, 2012 10:34 am

Re: Filter for unknown file names

Post by Gub238 » Fri Oct 05, 2012 12:39 pm

I know :)
Lets solve more simpe task. For examle: length no more then 15 and i know first 5 symbols. Is it possible?

User avatar
Support
Site Admin
Posts: 1830
Joined: Sun Oct 02, 2011 10:49 am

Re: Filter for unknown file names

Post by Support » Fri Oct 05, 2012 1:11 pm

Sure it is, here is a script that will scan from aaaaa to eeeee where the letter range is from a to e. Just change the URL to the real one.

Code: Select all

case ScannerEvent of

   Starting:
   begin
    for d = 'aaaaa' to 'eeeee' range('a'..'e') do begin
       aLink = 'http://www.site.my/download/MyDocument'+d+'.pdf';
       Scanlink(aLink);
    end;
   end;

   BeforeAdding:
   begin
      AcceptEvent = (DocumentType ~= 'pdf');
   end;

else
   AcceptEvent = No;

end;
Your support team.
http://SoftByteLabs.com

Gub238
Posts: 3
Joined: Fri Oct 05, 2012 10:34 am

Re: Filter for unknown file names

Post by Gub238 » Fri Oct 05, 2012 1:25 pm

Thank you, i'll try.
Where i can find the script language description?

User avatar
Support
Site Admin
Posts: 1830
Joined: Sun Oct 02, 2011 10:49 am

Re: Filter for unknown file names

Post by Support » Fri Oct 05, 2012 1:56 pm

You can use the BrownRecluse language reference manual attached here. It's the same in BlackWidow.
Attachments
BrownRecluseHelp.zip
(851.21 KiB) Downloaded 723 times
Your support team.
http://SoftByteLabs.com

Post Reply