rejetto forum
May 25, 2012, 07:11:40 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: 1 2 [All]
  Print  
Author Topic: User-Agent  (Read 2094 times)
0 Members and 2 Guests are viewing this topic.
ebola
Guest


Email
« on: December 17, 2008, 03:14:03 PM »

Hi

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


Thx,
ebola
Logged
JellyFrog
Experienced poster
***
Offline Offline

Sweden Sweden

Posts: 39


View Profile
« Reply #1 on: December 28, 2008, 10:45:35 AM »

Something like this should work (untested):

{.if|{.header|User-Agent.}=xyz|{.disconnect.}|Aww you  are free to go.}
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11830


View Profile
« Reply #2 on: December 28, 2008, 10:49:31 AM »

very close jellyfrog

ALT+F6 and enter

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



untested as well Cheesy
Logged
JellyFrog
Experienced poster
***
Offline Offline

Sweden Sweden

Posts: 39


View Profile
« Reply #3 on: December 28, 2008, 10:57:42 AM »

very close jellyfrog

ALT+F6 and enter

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



untested as well Cheesy

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

in hfs.events disconnects me Wink

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 Smiley
Logged
ebola
Guest


Email
« Reply #4 on: December 28, 2008, 11:16:36 AM »

Hi

Thx for your answers.

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


Cheers,
ebola
Logged
JellyFrog
Experienced poster
***
Offline Offline

Sweden Sweden

Posts: 39


View Profile
« Reply #5 on: December 28, 2008, 11:18:03 AM »

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 Wink
Logged
rejetto forum
« Reply #5 on: December 28, 2008, 11:18:03 AM »

Do you like this software? Consider even $2
 Logged
JellyFrog
Experienced poster
***
Offline Offline

Sweden Sweden

Posts: 39


View Profile
« Reply #6 on: December 28, 2008, 11:29:03 AM »

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.}:}.}
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11830


View Profile
« Reply #7 on: December 28, 2008, 01:03:24 PM »

yes, {: :} were missing
Logged
ebola
Guest


Email
« Reply #8 on: December 28, 2008, 03:03:04 PM »

Thank you so much @JellyFrog Smiley
Working like a charm.

Thank you for this software @rejetto, too.


good n8,
ebola
Logged
JellyFrog
Experienced poster
***
Offline Offline

Sweden Sweden

Posts: 39


View Profile
« Reply #9 on: December 28, 2008, 03:08:56 PM »

Thank you so much @JellyFrog Smiley
Working like a charm.

Thank you for this software @rejetto, too.


good n8,
ebola
No problem Smiley
Logged
CR1T1C4L
Experienced poster
***
Offline Offline

United States United States

Posts: 31


View Profile Email
« Reply #10 on: January 11, 2009, 10:17:50 PM »

what would this be used for?? may I ask
Logged
maverick
Insane poster
*****
Offline Offline

Posts: 1056


Computer Solutions


View Profile
« Reply #11 on: January 11, 2009, 11:13:58 PM »

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 11, 2009, 11:18:40 PM by maverick » Logged

maverick
securityguard123
Occasional poster
*
Offline Offline

Philippines Philippines

Posts: 3


View Profile WWW
« Reply #12 on: January 12, 2009, 09:19:39 AM »

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!
Logged

Anykeev
Occasional poster
*
Offline Offline

Russian Federation Russian Federation

Posts: 2


View Profile Email
« Reply #13 on: January 22, 2010, 07:59:28 AM »

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
Logged
Roessi
Tireless poster
****
Offline Offline

Posts: 107


314780875
View Profile Email
« Reply #14 on: January 22, 2010, 09:45:31 AM »

err sth like this ?

{.if|{.pos|en-Us|{.header|User-Agent.}.}|{:{.disconnect.}:}.}
« Last Edit: January 22, 2010, 10:58:54 AM by rejetto, Reason: {:added braces:} » Logged

Anykeev
Occasional poster
*
Offline Offline

Russian Federation Russian Federation

Posts: 2


View Profile Email
« Reply #15 on: January 22, 2010, 12:11:02 PM »

Thank you Roessi, it's work  Smiley
Logged
Pages: 1 2 [All]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 19, 2012, 06:53:49 PM
anything