Recent Posts

Pages: 1 [2] 3 4 ... 10
HFS ~ HTTP File Server / Re: ban on the run
« Last post by Mars on December 10, 2018, 09:02:39 AM »
if it is necessary to send the addition of a ban ip remotely, it must be sended a form to an hfs script that will support the addition of the value using the macro {.set ini | .} but it is delicate from a safe point of view

you must retrieve the set using {.get ini | ban-list.}
but the data in return are in the form| allowed| # NO!|

including pipes and making the management pretty tricky because of the macros.

it is probably necessary to use these macros, but I do not know the exact effects in the handling of text strings

     'no pipe'        replace '|'  by '{:|:}'
     'no pipe'        replace '{:|:}'  by '|'

the fields must be separated and then reassembled to be fed back into the configuration, which will have to be saved automatically at the output or at regular intervals or in force by means of a macro.
everything that includes remote hfs configuration management is a risk for hacking, especially when the exchanges are not done in SSL

it must be remembered that mishandling or erroneous data may create a ban rendering hfs unreachable

I do not know if there is an equivalent in English but as we say in France, "the game is not worth the candle"
HFS ~ HTTP File Server / Re: ban on the run
« Last post by LeoNeeson on December 10, 2018, 07:26:20 AM »
@Snoop: Welcome to the forum. It's not totally clear how you want to "send a command to HFS to add a ban" using your own program. May I ask you what type of program you want to use?. If you add more details it would be easier to help you. If you need to issue a ban from an external connection (because you are not sitting behind the HFS server), perhaps using some HFS's macro you could do the same and much easier. Please add more details.

@Mars: If I'm not mistaken, this user wants to 'add a ban' using an external program (or from an external connection). But if he externally edits the .ini settings file, HFS won't read those configurations until HFS is restarted. He needs a 'live' way to issue a ban from an external program (and not using HFS's menu option). OR perhaps he wants to issue a ban from an external connection, and using a macro this could be more easier to achieve (it would require an admin login that executes a macro that adds to HFS the IP to be banned).
Bug reports / Re: invalid link
« Last post by bmartino1 on December 09, 2018, 07:26:23 PM »
I also think define the mimetype might fox this before HTML code is required
HTML & templates / Re: Chat for HFS.
« Last post by bmartino1 on December 09, 2018, 07:25:45 PM »
HFS ~ HTTP File Server / Re: ban on the run
« Last post by Mars on December 09, 2018, 01:36:07 AM »
 Start HFS
In Menu/Limits/Bans…, enter the ip you will to be banned  example “” without the quotation marks and yoy can check “Disconnect with no reply”

Apply + OK --> that's all!  ;)
HFS ~ HTTP File Server / ban on the run
« Last post by snoop on December 07, 2018, 11:55:57 PM »
hello! How can I ban IP not directly from HFS? I need to do it using my own program.
I see HFS settings are saved in ini or in registry
So I can modify them using my own tools. But HFS wont reload it in runtime. So how can I solve this problem?
Maybe somehow send a command to HFS to add a ban?
Bug reports / Re: invalid link
« Last post by username1565 on December 05, 2018, 02:29:22 AM »
Found solve in this thread:
and here:
inserts HTML from filelist.tpl if exists in hfs.exe folder, otherwise produces ASCII file list of the requested folder

To get list with URLs:
1. Create filelist.tpl
2. Write this code there:
Code: [Select]

<playlist version="1" xmlns="">

<a href="http://%host%%encoded-folder%%item-url%">http://%host%%encoded-folder%%item-url%</a><br>
3. Run HFS, add folder with files there (if still not added).
4. Go to http://IP:PORT/folder/?search=.png&rev=1&sort=t
Now there is links lists with full path in the href.
Fullpath URL is the main path to file on the server.
And no any relative pathes in response links.

Best regards.
Bug reports / invalid link
« Last post by username1565 on December 04, 2018, 08:33:24 PM »
Need to add fullpath to the link, because path not full, relative and invalid.

1. Run HFS server.
2. Add some "folder" with files there.
3. Go to http://IP:PORT/folder/ - there is the files inside the folder.
4. Open the source code of HTML-page with that response:
and see this:
Code: [Select]
<a href="file1.txt"><img src="/~img47"> file1.txt</a>"file1.txt" - this is relative path for http://IP:PORT/folder/ where this page is generated, and this is - incorrect link.

Need to insert there fullpath:
Code: [Select]
<a href="http://IP:PORT/folder/file1.txt"> file1.txt </a>
I don't know syntax of macroses...

P.S.: I did add there an index.html with the links to all files,
and this seems good with fullpathes... But this is not dynamic page...
HTML & templates / Adding a captcha function to HFS
« Last post by LeoNeeson on December 03, 2018, 10:50:42 PM »
@bmartino1: Yeah, Google reCAPTCHA could be used, but the beauty of HFS is not to depend on external services.

Possible solutions (for adding in the source code):

- Create a captcha with Delphi.
- Using an Image control to draw the Captcha.
- Tutorial on How to Install a Captcha on Delphi.

This gives me an idea that something like this could be used to make a "captive portal", so the user is obliged to solve the captcha before access is granted to any file or resource.

(I think all this should be "moved" to a new thread, since it's not related to the 'Chat for HFS' thing)
HTML & templates / Re: Chat for HFS.
« Last post by bmartino1 on December 03, 2018, 04:40:49 PM »
The only way I'd know how to do this is to pull from Google capcha.

You would have to change the upload button to go to a webpage to validate then send you to the upload code webpage. So each folder would have a capcha.html and a hfs template of the upload code...

Pages: 1 [2] 3 4 ... 10