|
Mostrar Temas
|
Páginas: [1] 2
|
1
|
Programación / Scripting / [Python] SharkTube: ¡Descarga vídeos de YouTube!
|
en: 23 Abril 2011, 07:22 am
|
SharkTube es una utilidad o aplicación gratuita que te permite descargar vídeos de YouTube.Sus características y mejoras son: - Más servidores de YouTube.
- Disponibilidad de formatos FLV, MP4, entre otros. *
- Ejecutable por línea de comandos y alternativa con Interfaz web.
- Mejor rendimiento en la búsqueda de servidores.
- Extracción de título, descripción y enlace corto.
- Posibilidad de compartir el vídeo en servicios sociales.
Shark.py#!/usr/bin/env python # -*- coding: utf-8 -*- # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # Written by SebastiᮠCastaᯠ(.:WindHack:.) # DaW - Labs & Cibernodo # - www.daw-labs.com | | www.cibernodo.net - # Version: 1.1 ( Renaissance ) # Interactive Console # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ import urllib import re bLogo = ''' .--. .-. .-. .-----. .-. : .--': : : :.-.`-. .-' : : `. `. : `-. .--. .--. : `'.' : :.-..-.: `-. .--. _`, :: .. :' .; ; : ..': . `. : :: :; :' .; :' '_.' `.__.':_;:_;`.__,_;:_; :_;:_; :_;`.__.'`.__.'`.__.' (C) DaW - Labs & Cibernodo. Welcome! NOTE: Enter -e or --end to exit the application. ''' Char = ['%3A','%2F','%26','%2C','%3D','%252C','%253A','%7C','%3F'] By = [':','/','&',',','=',',',':','<begin>','?'] def URLDecode(sURL): for i in range(len(Char)): sURL = sURL.replace(Char[i],By[i]) return sURL def CleanData(sData,IsHTML=True): if IsHTML == True: rReg = re.compile(r'\&.*?;') else: rReg = re.compile(r',[0-9].?') return rReg.sub('',sData) def GetSourceCode(sURL): try: URL = urllib.urlopen(sURL) sSource = URL.read() URL.close() return sSource except: print '[+] Connection error.' exit() def GetIndexVideo(sSource,Tags): return sSource.find(Tags) def GetVideoInformation(sSource): sSource = sSource[2000:4500] sInfo = [] #Title... sReg = re.findall(r'<meta property="og:title" content="(.+)">',sSource) sInfo.append(sReg[0]) #Shortlink... sReg = re.findall(r'<link rel="shortlink" href="(.+)">',sSource) sInfo.append(sReg[0]) #Description... sReg = re.findall(r'<meta property="og:description" content="(.+)">',sSource) sInfo.append(CleanData(sReg[0])) return sInfo def GetDownloadURL(sSource,sTitle): sSource = sSource[10000:18000] Begin = GetIndexVideo(sSource,'width="640" id="movie_player" height="390" flashvars=')+57 sSource = sSource[Begin:] End = GetIndexVideo(sSource,'allowscriptaccess="always" allowfullscreen="true"')+49 sSource = sSource[:End].split('<begin>') lClean = [] sTitle = '&title='+sTitle.replace(' ','%20')+'%20[SharkTube]' for i in sSource: if i.startswith('http://v') and len(i) < 400: lClean.append(CleanData(i,IsHTML=False)+sTitle) return lClean def __main__(): print bLogo while 1: Id = raw_input('Please, enter the YouTube Id. >> ') if Id == '-e' or Id == '--end': print 'Thank you for using SharkTube. Goodbye' exit(1) else: if len(Id) == 11: try: Source = URLDecode(GetSourceCode('http://www.youtube.com/watch?v='+Id)) lInfo = GetVideoInformation(Source) URL = GetDownloadURL(Source,lInfo[0]) print ''' -*- Video Information -*- Title: %s Shortlink: %s Description: %s Link(s) available(s) to download: %s ''' % (lInfo[0],lInfo[1],lInfo[2],'\n\n'.join(URL)) except IndexError: print 'Wrong Id. Please, try again...' else: print 'The ID must be eleven characters. Try again...' if __name__ == "__main__": __main__()
CapturaPara usar la versión de Interface Web ( Captura superior ) se debe de descargar el proyecto con todo lo necesario del siguiente enlace: http://db.tt/Jtq2sAAMás información:- DaW - Labs | SharkTube: ¡Descarga vídeos de YouTube!- Cibernodo | SharkTube: ¡Descarga vídeos de YouTube! Eso es todo, espero les sea de ayuda y le puedan sacar provecho. Por último, agradecimiento especial a 5475UK1 por la ayuda en el diseño y creación del logo. Saludos.,
|
|
|
2
|
Programación / Ingeniería Inversa / Pequeño «Krackme»…
|
en: 21 Febrero 2011, 03:01 am
|
Hola a todos. Bueno, hoy presento un «Crackme» que he desarrollado en Pascal. Es muy sencillo pero no es como los comunes ya que, para poder superar el reto es necesario realizar una secuencia en el teclado, por lo cual su validación es sólo por esta vía. Tal vez no dure ni diez o veinte minutos vivo, pero el objetivo es entretenerse un rato. Cuando lo resuelvan se darán cuenta que es muy conocido lo que han realizado., • Clic aquí para descargar. Nota: Quien lo resuelva, si puede dejar un tutorial de cómo lo hizo estaría muy agradecido.
|
|
|
4
|
Programación / Scripting / [Python] WS Downloader: ¡Descarga vídeos de YouTube!
|
en: 18 Noviembre 2010, 15:29 pm
|
#!/usr/bin/env python # -*- coding: utf-8 -*- # WS Downloader.py - v0.1 (Beta) # Autor(es): .:WindHack:. & swik # www.daw-labs.com | www.cibernodo.net # Registrado en SafeCreative # Licencia: Creative Commons Reconocimiento-NoComercial-CompartirIgual 3.0 # 17/11/2010 import sys, urllib, os # # @Charset # Char = ['%3A','%2F','%26','%2C','%3D','%252C','%253A','%7C','%3F'] By = [':','/','&',',','=',',',':','<begin>','?'] # # URLDecode(sURL) # Descifra la URL teniendo en cuenta el Charset. # def URLDecode(sURL): for i in range(len(Char)): sURL = sURL.replace(Char[i],By[i]) return sURL # # GetSourceCode(sURL) # Obtiene el código de fuente del vídeo (sitio). # def GetSourceCode(sURL): try: URL = urllib.urlopen(sURL) sSource = URL.read() URL.close() return sSource except: print 'Error de conexión.' exit() # # GetIndexVideo(sSource,Tags) # Obtiene la posición de un "Tag" o etiqueta. # def GetIndexVideo(sSource,Tags): return sSource.find(Tags) # # GetVideoTitle(sSource) # Obtiene el título del vídeo. # def GetVideoTitle(sSource): sSource = sSource[2000:5500] Begin = GetIndexVideo(sSource,'<meta name="title" content="')+28 sSource = sSource[Begin:] End = GetIndexVideo(sSource,'>')-1 sSource = sSource[:End] if ' ' in sSource: sSource = sSource.replace(' ','_') return sSource # # GetVideoURL(sSource) # Obtiene la URL de descarga del vídeo. # def GetVideoURL(sSource): sSource = sSource[9000:30000] Begin = GetIndexVideo(sSource,'<begin>')+7 sSource = sSource[Begin:] End = GetIndexVideo(sSource,'id=')+19 sSource = sSource[:End]+'&title=Video(WS_Downloader)' return sSource # # GetSavePath(Title) # Obtiene la ruta en la cual se guardará el vídeo, teniendo en cuenta # el sistema operativo. # def GetSavePath(Title): if os.name == 'posix': return os.getenv('HOME')+'/'+Title+'.flv' if os.name == 'nt': return os.getenv('HOMEDRIVE')+'\\'+Title+'.flv' # # DownloadStatus(Bloque, Tamano, Total) # Muestra el estado de la descarga. # def DownloadStatus(Bloque, Tamano, Total): Cantidad = Bloque * Tamano / 1024000.0 Total = Total / 1024000.0 print 'Cantidad descargada: %s MB de %s MB ...' % (round(Cantidad,1),round(Total,1)) if Cantidad >= Total: print 'Descarga finalizada.' # # DownloadVideo(sURL, sName, sStatus) # Descarga el vídeo de los servidores de YouTube. # def DownloadVideo(sURL, sName, sStatus): try: Download = urllib.urlretrieve(sURL, sName, sStatus) return Download[0] except: print 'Error el descargar.' exit() def __main__(): __Help__ = ''' __ ______ ____ _ _ \ \ / / ___| | _ \ _____ ___ __ | | ___ __ _ __| | ___ _ __ \ \ /\ / /\___ \ | | | |/ _ \ \ /\ / / '_ \| |/ _ \ / _` |/ _` |/ _ \ '__| \ V V / ___) | | |_| | (_) \ V V /| | | | | (_) | (_| | (_| | __/ | \_/\_/ |____/ |____/ \___/ \_/\_/ |_| |_|_|\___/ \__,_|\__,_|\___|_| © Cibernodo & DaW - Labs Uso: ./WS_Downloader.py <Opción> <Id> Opciones: -D : Descargar video directamente. -G : Obtener URL de descarga. -help : Ver Ayuda. ''' try: Opt = sys.argv[1] if Opt == '-help': print __Help__ if len(sys.argv) > 2: Id = URLDecode(GetSourceCode('http://www.youtube.com/watch?v='+sys.argv[2])) Title = GetSavePath(GetVideoTitle(Id)) URL = GetVideoURL(Id) if Opt == '-G': print '======== Video URL ========\n',URL elif Opt == '-D': DownloadVideo(URL,Title,DownloadStatus) except: print __Help__ if __name__ == "__main__": __main__()
Más Información:DaW - Labs | WS Downloader: ¡Descarga vídeos de YouTube!Cibernodo | WS Downloader: ¡Descarga vídeos de YouTube!
|
|
|
5
|
Programación / Scripting / [Python] Gira una cadena de texto 180º con FlipString
|
en: 20 Septiembre 2010, 22:59 pm
|
FlipString es un script desarrollado en Python que permite girar la cadena que se pase como parámetro 180º. Por el momento sólo se ha probado en GNU/Linux, así que no puedo establecer a ciencia cierta cómo se comporta en otros entornos. Su funcionamiento es sencillo, tan sólo se debe pasar como parámetro el texto que deseamos invertir. Por ejemplo: windhack@windhack-desktop:~$ python 'flipstring.py' Hola
Nos devuelve como resultado: ɐloɥPara convertir una cadena de texto más larga y que contenga espacios se deben usar las comillas dobles ( ""). Aquí adjunto el código fuente. #!/usr/bin/python # -*- coding: utf-8 -*- # FlipString.py - DaW - Labs & Cibernodo # Autor: .:WindHack:. # 20/09/2010 - www.daw-labs.com & www.cibernodo.net # Puede usar, modificar y redistribuir éste código # siempre y cuando respete los derechos de autor. from sys import argv # Diccionario de equivalencia en caracteres. FlipCharset = { 'a' :u'\u0250', 'b' :'q', 'c' :u'\u0254', 'd' :'p', 'e' :u'\u01DD', 'f' :u'\u025F', 'g' :u'\u0183', 'h' :u'\u0265', 'i' :u'\u0131', 'j' :u'\u027E', 'k' :u'\u029E', 'l' :'l', 'm' :u'\u026F', 'n' :'u', 'o' :'o', 'p' :'d', 'q' :'b', 'r' :u'\u0279', 's' :'s', 't' :u'\u0287', 'u' :'n', 'v' :u'\u028C', 'w' :u'\u028D', 'x' :'x', 'y' :u'\u028E', 'z' :'z', ' ' :' ', '1' : '\u21C2', '2' : '\u1105', '3' : '\u1110', '4' : '\u3123', '5' : '\u078E', '6' : '9', '7' : '\u3125', '8' : '8', '9' : '6', '0' : '0', '.' : '\u02D9', ',' : "\'", ';' : '\u061B', '!' : '¡', '¡' : '!', '?' : '¿', '¿' : '?', '[' : ']', ']' : '[', '(' : ')', ')' : '(', '{' : '}', '}' : '{', '<' : '>', '>' : '<', '_' : '\u203E' } # Función para girar el texto. def FlipString(String): Result = '' String = String.lower() for i in String: Result += FlipCharset[i] return Result[::-1] def __main__(): __Help__ = ''' _____ _ _ ____ _ _ | ___| (_)_ __/ ___|| |_ _ __(_)_ __ __ _ | |_ | | | '_ \___ \| __| '__| | '_ \ / _` | | _| | | | |_) |__) | |_| | | | | | | (_| | |_| |_|_| .__/____/ \__|_| |_|_| |_|\__, | |_| |___/ © 2010. DaW - Labs & Cibernodo Modo de uso: FlipString.py "Texto" ''' try: HasText = argv[1] print ''' %s ''' % FlipString(HasText) except: print __Help__ if __name__ == '__main__': __main__()
|
|
|
7
|
Programación / Scripting / VideoDown! - Descarga videos de sitios multimedia.
|
en: 23 Julio 2010, 00:03 am
|
Un script que hice para descargar videos de Metacafe, DailyMotion, y muchos sitios más. #!/usr/bin/python # -*- coding: utf-8 -*- # VideoDown.py - DaW - Labs # Autor: .:WindHack:. # 22/07/2010 - www.daw-labs.com # Puede usar, modificar y redistribuir este codigo # siempre y cuando respete los derechos de autor. import sys, urllib from sgmllib import SGMLParser class Parser(SGMLParser): def reset(self): SGMLParser.reset(self) self.urls = [] def start_a(self, attrs): href = [v for k, v in attrs if k=='href'] if href: self.urls.extend(href) def DownloadStatus(Bloque,Tamano,Total): Cantidad = Bloque * Tamano / 1024 Total = Total / 1024 print 'Cantidad descargada: %s KB de %s KB ...' % (Cantidad,Total) if Cantidad > Total: print 'Descarga finalizada.' def DownloadVideo(URL, Name, Status): try: Download = urllib.urlretrieve(URL, Name, Status) return Download[0] except: return 'Ha sucedido un error en la descarga.' def GetDownloadURL(URL,Download): if len(URL) != 0: URLv = urllib.urlopen('http://www.flashvideodownloader.org/download2.php?u=%s' % URL) DownloadURL = Parser() DownloadURL.feed(URLv.read()) DownloadURL.close() URLv.close() URL = DownloadURL.urls[8] if Download == True: DownloadVideo(URL,'C:\Video_By_VideoDown.flv',DownloadStatus) else: return 'La URL de descarga es:\n%s' % URL else: return 'URL invalida...' def __main__(): __Ayuda__ = ''' _ _ _ _ ___ _ | | |<_> _| | ___ ___ | . \ ___ _ _ _ ._ _ | | | ' || |/ . |/ ._>/ . \| | |/ . \| | | || ' ||_/ |__/ |_|\___|\___.\___/|___/\___/|__/_/ |_|_|<_> © 2010. DaW - Labs - www.daw-labs.com Uso: VideoDown.py <OPCION> <URL> Opciones: -D : Descarga un video. -O : Obtiene solo la URL de descarga. -H : Muestra la ayuda. ----------------------------------------------------------- Para ver la lista de sitios soportados abra el archivo: Supported Sites.txt ''' try: Opc = sys.argv[1] if Opc == '-H': print __Ayuda__ elif Opc == '-D': GetDownloadURL(sys.argv[2],True) elif Opc == '-O': print GetDownloadURL(sys.argv[2],False) else: print 'Se esperaba un parametro...' except: print __Ayuda__ if __name__ == "__main__": __main__()
Más Información: http://daw-labs.com/videodown-descarga-videos-de-metacafe-dailymotion-y-muchos-sitios-mas/P.D.: No puedo poner tildes, el GeShi me las modifica.
|
|
|
9
|
Comunicaciones / Mensajería / FoxyMSN - ¡Multi-sesión en tú Messenger!
|
en: 7 Junio 2010, 05:18 am
|
Últimamente se han desarrollado varios parches para el Windows Live Messenger® (WLM), así que decidí hacer mi versión. El FoxyMSN, es un parche que permite abrir múltiples instancias del WLM, y así poder conectarte desde un mismo PC a cuentas distintas. Próximamente publicaré la manera en la cual realizar uno de estos parches y el código fuente del FoxyMSN. DaW - Labs
|
|
|
10
|
Programación / Scripting / Cifrado César en Python
|
en: 6 Junio 2010, 16:37 pm
|
Cifrado césar en Python. ################################### # Autor: .:WindHack:. # # Sitio web: http://daw-labs.com # # Agradecimientos: Sifaw # ################################### def Cifrar_Cesar(String,Key): tmp = '' for i in String: tmp += chr(ord(i)+Key) return tmp def Descifrar_Cesar(String,Key): return Cifrar_Cesar(String,-Key) print " ================================= " print "| Des/Cifrar Cesar |" print "| .:WindHack:. |" print "| http://daw-labs.com |" print " ================================= " Palabra = raw_input("Introduce la frase: ") Clave = input("Introduce la clave: ") print "Palabra cifrada: " + Cifrar_Cesar(Palabra,Clave) print "Palabra descifrada: " + Descifrar_Cesar(Palabra,Clave)
|
|
|
|
|
|
|