Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2001
  • Last Modified:

Regular Expression - SPAM Block URL

I need a regular expression that do detect a URL that contains a file ending with certain extensions, example below:
http://54.200.175.233/boleto/NF4354.zip
http://example.org.br/ex.zip
https://example.com.br/teste.exe
What better way to prepare this regular expression that detects various formats that URL?
Thank you
Marcelo
0
fmarcelo14
Asked:
fmarcelo14
1 Solution
 
dan_blagutCommented:
Hi

did you try some pattern like http://*.exe or http://*.zip? What antispam do you use?

dan
0
 
fmarcelo14Author Commented:
Hi,
I have AntiSpam Ironport and I need use regular expression, your suggestion does not meet the format of regular expression.
0
 
dan_blagutCommented:
0
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
mark_harris231Commented:
Agree with dan_blagut - you can see an example very close to what you want at the top of page 291  (NOTE: page numbers reference the numbers printed on the page, not the PDF page count).

This should do what you want:

http://.*?\.(exe|bin|zip)

Points to Dan...
0
 
Derek JensenCommented:
you might also need to escape your //'s (to avoid delimiter errors):

http:\/\/.*?\.(exe|bin|zip)

Open in new window

0
 
dan_blagutCommented:
Thank's Mark
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Tackle projects and never again get stuck behind a technical roadblock.
Join Now