rejetto forum

Recent Posts

Bug reports / user account login
« Last post by rubberbutt on March 25, 2021, 07:37:34 PM »
Hello all.

I have a question about the user accounts. Or lack off

I use HFS 2,3. I forwarded port 8080 to my pc in my router. I don't have a domain name yet, but I can reach my HFS through my external wan ip address.
Everyone can see the "homepage"of HFS. So everyone sees the files and can download them.
I haven't even made a user account.
Is this normal behaviour from  HFS ? So why bother even making user accounts ?
Programmers corner / Re: [Tutorial] How to compile the HFS's Source code
« Last post by newbie on March 25, 2021, 03:24:05 PM »
I'm trying to build 2.4.0 rc07 with Embarcadero 10.3.3 Community Edition.

1. Do I use the same Library pack as mentioned by LeoNeeson at the top of this thread? Or is there a new one somewhere?
2. Delphi fails to build with this error: "Cannot resolve unit name 'uFreeLocalizer' at line 28 of hfs.dpr" Got past this.
3. I now get an error in uFreeLocalizer.pas
Code: [Select]
WideToAnsiString(ws, s, GetACP);. Modified definition to
Code: [Select]
s: AnsiString; and it got past.
4. Next compile error in OverbytelcsMimeUtils.pas Undeclared identifier errors: TBufferedFileStream(Stream).Mode & TBufferedFileStream(Stream).FastSize

I'm playing whack-a-mole here so it kinda appears that there is a new Library Pack, I need to use.

HFS ~ HTTP File Server / Re: passing utf-8 characters in hfs.tpl function
« Last post by newbie on March 25, 2021, 03:11:02 PM »
Looking at the 2.4.0 rc07 src:
utillib.pas Line 1238:
Code: [Select]
result:=(cmd > '') and (32 < shellexecute(0, 'open', pchar(cmd), pchar(pars), NIL, showCmd)
Should this be:
Code: [Select]
result:=(cmd > '') and (32 < shellexecuteW(0, 'open', pwidechar(cmd), pwidechar(pars), NIL, showCmd)
HFS ~ HTTP File Server / Re: passing utf-8 characters in hfs.tpl function
« Last post by danny on March 25, 2021, 10:22:28 AM »
I wonder if one of HFS versions will do a little differently? 

Other things to explore
powershell Get-Content .\test.txt | Set-Content -Encoding utf8 test-utf8.txt
Programmers corner / Re: Template/events for QOS or traffic shaping.
« Last post by danny on March 23, 2021, 08:19:35 PM »
Thank you for doing the edits and the briefing.  Awesome!!!   

I wonder how to get upload speed/#/status when not on the upload page?
HFS ~ HTTP File Server / passing utf-8 characters in hfs.tpl function
« Last post by newbie on March 23, 2021, 05:18:36 PM »
I created a simple function like below which exec's an external application.
It takes 2 utf-8 arguments. I've noticed that the args show up with ???? chars for the utf-8 characters in the Powershell script.
I've tried changing the active code page in the PS1 script by adding chcp 65001 and Input/Output encoding to UTF-8, but makes no difference.

However, if I change the active code page for the machine by changing this registry entry and then RESTARTING windows..
Code: [Select]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\OEMCP 65001it sends utf-8 characters into the PS1 script.

Is there anyway to do this, without changing the active page of the machine & restarting?

Code: [Select]
[|public|no log]
{.check session.}
{.exec|powershell.exe -F foo.ps1 "{.^x.}" "{.^y.}"|out=#output.}
This site uses the latest newspaper
Programmers corner / Re: Template/events for QOS or traffic shaping.
« Last post by Mars on March 23, 2021, 01:17:45 PM »
whether it is possible to perform a comparison test without going through a macro as it
{.if|{.8000 > 7500.}|{: busy :}|{: archive :}.}

it is strongly preferable to place the equivalent macro as a precautionary measure
{.if|{.>|8000|7500.}|{: busy :}|{: archive :}.}

this allows you to acquire good habits and write functional code,  HFS does not support direct literal numerical calculations as javascript

{.%number-addresses-downloading%*%speed-out% > 7500.} is bad

{.>|{.calc|%number-addresses-downloading%*%speed-out%.}|7500.} is correct

{.256*3 < 10 .} is similar to "256*3" < "10"  as  strings comparaison

you can test this in menu>>debug>run script

{.if|{. 25.6*2 < 100.}|true|false.} ->>   "25.6*2"  > "100"   >:(

{.if|{. {.calc|25.6*2.} < 100.}|true|false.}  ->>  56.2 < 100   ;D

Bug reports / Re: [Solved] Robots are scanning my HFS server
« Last post by danny on March 23, 2021, 06:14:14 AM »
I did associate / webroot with a real empty folder.  So, I don't have any virtual folders. 

And as for the Robots/Hacks/Scans, just weekly I review the accesses and use the Ban and the *

You know like, that bother from Censys?  Well, I just ban 167.248.133.* to minimize the inconvenience. 

This plan wasn't instantaneous, but it wasn't laborious. 
If anything, upping the ante on the ban ranges has been best for both security and convenience.
In fact, it has been convenient for the miscreants to put their addresses in my logs so that I can increase scope of range blocking on them. . . resulting in a sharp decrease of bother; and, a whopping good bout of better security. 

The robots.txt contains suggestions.  But, suggestions are only good for real people.  However, as for bots, just use force. 
Programmers corner / Template/events for QOS or traffic shaping.
« Last post by danny on March 23, 2021, 05:57:47 AM »
This won't be complete because full equal-opposite metrics/status/measures aren't provisioned. 

But, this is what I've 'cooked-up' so far: 

{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .}> 7500.}|{: busy :}|{: archive :}.} 
can also be used for style display none or style display initial (to hide/show buttons)


{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .} < 7500.}|{:
archive script
upload script
If reasonable load, do script (else omit)


soft version {.if|{.%connections% > 39.}|{: busy excuse + javascript recheck timer :}|{: do file list :}.}
connection count management without high cpu load cost

hard version {.if|{.%connections% > 49.}|{:{.redirect|/~busyexcuse.}:}.}
new [busyexcuse|public] section is page for javascript recheck timer wait seconds, if less than x connections then back..
connection count management without high cpu load cost + connection desist (disconnect/redirect) kills downloader/scanner.

Multi-user scalable:  These above examples run condition detect on the server but the stalling waiting part runs on the Client cpu.
To make stronger logic, the scope was purposefully confined to doable.   Just sayin' that hard road North got 2 more signposts, like Snacks > and < Else.