rejetto forum

User-Agent

Guest · 16 · 9177

0 Members and 1 Guest are viewing this topic.

ebola

  • Guest
Hi

How would a macro look like that disconnects a User-Agent with name "xyz" imediatelly ?


Thx,
ebola


Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
Something like this should work (untested):

{.if|{.header|User-Agent.}=xyz|{.disconnect.}|Aww you  are free to go.}


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
very close jellyfrog

ALT+F6 and enter

[request]
{.if|{.{.header|User-Agent.}=xyz.}|{.disconnect.}.}



untested as well :D


Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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 :)


ebola

  • Guest
Hi

Thx for your answers.

Sadly this solution disconnects EVERY User-Agent - not only the one I specific.
This is realy weird....


Cheers,
ebola


Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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 ;)


Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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.}:}.}


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile

ebola

  • Guest
Thank you so much @JellyFrog :)
Working like a charm.

Thank you for this software @rejetto, too.


good n8,
ebola


Offline JellyFrog

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
Thank you so much @JellyFrog :)
Working like a charm.

Thank you for this software @rejetto, too.


good n8,
ebola
No problem :)


Offline CR1T1C4L

  • Occasional poster
  • *
    • Posts: 31
    • View Profile
what would this be used for?? may I ask


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
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/
« Last Edit: January 12, 2009, 05:18:40 AM by maverick »
maverick


Offline securityguard123

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
    • Local Security Guard
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!


Offline Anykeev

  • Occasional poster
  • *
    • Posts: 2
    • View Profile
Quote
[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


Offline Roessi

  • Tireless poster
  • ****
    • Posts: 107
    • View Profile
err sth like this ?

{.if|{.pos|en-Us|{.header|User-Agent.}.}|{:{.disconnect.}:}.}
« Last Edit: January 22, 2010, 04:58:54 PM by rejetto »