<% ' AspUpload Code samples: download.asp ' Copyright (c) 2001 Persits Software, Inc ' http://www.persits.com ' This file must not contain any HTML tags Dim re set re = New RegExp archivo = Request("archivo") ' Checks against relative path syntax (. or .. injection) Dim fpath fpath = replace(archivo,"/","\") If fpath="." Then fpath=".\" re.IgnoreCase = false re.Pattern = "^\.\.$|^\.\.\\|\\\.\.\\|\\\.\.$" re.Pattern = re.Pattern & "|^\.\\|\\\.\\|\\\.$" If re.Test(fpath) = True Then 'no hacer nada Else nombrearchivo = replace(archivo," ","_") Set Upload = Server.CreateObject("Persits.Upload") descargar = server.MapPath("\") + "\2014\infog\tramos\descargas\" + archivo Upload.SendBinary descargar, True, "application/octet-stream", True, nombrearchivo End If %>