rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: ebola on December 17, 2008, 09:14:03 PM
-
Hi
How would a macro look like that disconnects a User-Agent with name "xyz" imediatelly ?
Thx,
ebola
-
Something like this should work (untested):
{.if|{.header|User-Agent.}=xyz|{.disconnect.}|Aww you are free to go.}
-
very close jellyfrog
ALT+F6 and enter
[request]
{.if|{.{.header|User-Agent.}=xyz.}|{.disconnect.}.}
untested as well :D
-
very close jellyfrog
ALT+F6 and enter
[request]
{.if|{.{.header|User-Agent.}=xyz.}|{.disconnect.}.}
untested as well :D
[request]
{.if|{.{.header|User-Agent.}=xyz.}|{.disconnect.}.}
in hfs.events disconnects me ;)
Your User Agent is: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
HFS 2.3 beta (217)
Hm.. is it possible it just listen to:{.header|User-Agent.}? and skip the =xyz?
so it looks like this:
{.if|{.header|User-Agent.}|do something.}
That should return true? Just a thought :)
-
Hi
Thx for your answers.
Sadly this solution disconnects EVERY User-Agent - not only the one I specific.
This is realy weird....
Cheers,
ebola
-
Hi
Thx for your answers.
Sadly this solution disconnects EVERY User-Agent - not only the one I specific.
This is realy weird....
Cheers,
ebola
Yes it does, like I said... I guess rejetto is looking at this right now ;)
-
Oh..found it!
In hfs.events (alt+F6):
[request]
{.if|{.{.header|User-Agent.}=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5.}|{:{.disconnect.}:}.}
Disconnect all browsers with "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5" as user-agent
Disconnect all browsers with "xyz" as user-agent:
[request]
{.if|{.{.header|User-Agent.}=xyz.}|{:{.disconnect.}:}.}
-
yes, {: :} were missing
-
Thank you so much @JellyFrog :)
Working like a charm.
Thank you for this software @rejetto, too.
good n8,
ebola
-
Thank you so much @JellyFrog :)
Working like a charm.
Thank you for this software @rejetto, too.
good n8,
ebola
No problem :)
-
what would this be used for?? may I ask
-
what would this be used for?? may I ask
Read this thread. It should answer your question on what can be done with HFS event scripts. -> http://www.rejetto.com/forum/?topic=6154
In the example above in this thread, they are using a HFS event script to disconnect anybody coming to their site with the firefox browser. Different script could also be used to show a different web page depending on the browser being used. etc. User agent identifies your browser. What's your user agent -> http://whatsmyuseragent.com/
-
Hi guys!
I am looking for HTML code forums...
lurking around and absorbing everything I can see and understand...
This one is tough and sure very nice if I'll understand it hehehe!
-
[request]
{.if|{.{.header|User-Agent.}=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5.}|{:{.disconnect.}:}.}
Disconnect all browsers with "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5" as user-agent
It is possible to block certain keywords? For example, block "en-US" only?
PS sorry for my english, translated by google
-
err sth like this ?
{.if|{.pos|en-Us|{.header|User-Agent.}.}|{:{.disconnect.}:}.}
-
Thank you Roessi, it's work :)