elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


  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.
Citar
NOTA: Esta utilidad se encuentra registrada en SafeCreative bajo la licencia Creative Commons Reconocimiento-NoComercial-CompartirIgual 3.0.

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
Código
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  4. #   Written by SebastiᮠCastaᯠ(.:WindHack:.)
  5. #             DaW - Labs & Cibernodo
  6. #   - www.daw-labs.com | | www.cibernodo.net  -
  7. #           Version: 1.1 ( Renaissance )
  8. #              Interactive Console
  9. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  10.  
  11. import urllib
  12. import re
  13.  
  14. bLogo = '''
  15. .--. .-.               .-.   .-----.    .-.
  16. : .--': :               : :.-.`-. .-'    : :
  17. `. `. : `-.  .--.  .--. : `'.'  : :.-..-.: `-.  .--.
  18. _`, :: .. :' .; ; : ..': . `.  : :: :; :' .; :' '_.'
  19. `.__.':_;:_;`.__,_;:_;  :_;:_;  :_;`.__.'`.__.'`.__.'
  20. (C) DaW - Labs & Cibernodo.
  21.  
  22. Welcome!
  23. NOTE: Enter -e or --end to exit the application.
  24.        '''
  25.  
  26. Char = ['%3A','%2F','%26','%2C','%3D','%252C','%253A','%7C','%3F']
  27. By =   [':','/','&',',','=',',',':','<begin>','?']
  28.  
  29.  
  30. def URLDecode(sURL):
  31.    for i in range(len(Char)):
  32.        sURL = sURL.replace(Char[i],By[i])
  33.    return sURL
  34.  
  35. def CleanData(sData,IsHTML=True):
  36.    if IsHTML == True:
  37.        rReg = re.compile(r'\&.*?;')
  38.    else:
  39.        rReg = re.compile(r',[0-9].?')
  40.    return rReg.sub('',sData)
  41.  
  42. def GetSourceCode(sURL):
  43.    try:
  44.        URL = urllib.urlopen(sURL)
  45.        sSource = URL.read()
  46.        URL.close()
  47.        return sSource
  48.    except:
  49.        print '[+] Connection error.'
  50.        exit()
  51.  
  52. def GetIndexVideo(sSource,Tags):
  53.    return sSource.find(Tags)
  54.  
  55. def GetVideoInformation(sSource):
  56.    sSource = sSource[2000:4500]
  57.    sInfo = []
  58.    #Title...
  59.    sReg = re.findall(r'<meta property="og:title" content="(.+)">',sSource)
  60.    sInfo.append(sReg[0])
  61.    #Shortlink...
  62.    sReg = re.findall(r'<link rel="shortlink" href="(.+)">',sSource)
  63.    sInfo.append(sReg[0])
  64.    #Description...
  65.    sReg = re.findall(r'<meta property="og:description" content="(.+)">',sSource)
  66.    sInfo.append(CleanData(sReg[0]))
  67.    return sInfo
  68.  
  69. def GetDownloadURL(sSource,sTitle):
  70.    sSource = sSource[10000:18000]
  71.    Begin = GetIndexVideo(sSource,'width="640" id="movie_player" height="390"    flashvars=')+57
  72.    sSource = sSource[Begin:]
  73.    End = GetIndexVideo(sSource,'allowscriptaccess="always" allowfullscreen="true"')+49
  74.    sSource = sSource[:End].split('<begin>')
  75.    lClean = []
  76.    sTitle = '&title='+sTitle.replace(' ','%20')+'%20[SharkTube]'
  77.    for i in sSource:
  78.        if i.startswith('http://v') and len(i) < 400:
  79.            lClean.append(CleanData(i,IsHTML=False)+sTitle)
  80.    return lClean
  81.  
  82. def __main__():
  83.    print bLogo
  84.    while 1:
  85.        Id = raw_input('Please, enter the YouTube Id. >> ')
  86.        if Id == '-e' or Id == '--end':
  87.            print 'Thank you for using SharkTube. Goodbye'
  88.            exit(1)
  89.        else:
  90.            if len(Id) == 11:
  91.                try:
  92.                    Source = URLDecode(GetSourceCode('http://www.youtube.com/watch?v='+Id))
  93.                    lInfo = GetVideoInformation(Source)
  94.                    URL = GetDownloadURL(Source,lInfo[0])
  95.                    print '''
  96.  
  97.            -*- Video Information -*-
  98.  
  99. Title: %s
  100. Shortlink: %s
  101. Description:
  102. %s
  103.  
  104. Link(s) available(s) to download:
  105. %s
  106.  
  107.          ''' % (lInfo[0],lInfo[1],lInfo[2],'\n\n'.join(URL))
  108.                except IndexError:
  109.                    print 'Wrong Id. Please, try again...'
  110.            else:
  111.                print 'The ID must be eleven characters. Try again...'
  112.  
  113. if __name__ == "__main__":
  114.   __main__()

Captura


Para 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/Jtq2sAA

Má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.
3  Foros Generales / Foro Libre / Efectos de las drogas en las arañas en: 19 Diciembre 2010, 06:06 am
¿Conocían los efectos y consecuencias de algunas drogas en las arañas?
Si la respuesta es "No", simplemente mira el vídeo...





P.D.: Algo de humor no viene mal... ¡Jajajaja!
4  Programación / Scripting / [Python] WS Downloader: ¡Descarga vídeos de YouTube! en: 18 Noviembre 2010, 15:29 pm
Código
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # WS Downloader.py - v0.1 (Beta)
  4. # Autor(es): .:WindHack:. & swik
  5. # www.daw-labs.com | www.cibernodo.net
  6. # Registrado en SafeCreative
  7. # Licencia: Creative Commons Reconocimiento-NoComercial-CompartirIgual 3.0
  8. # 17/11/2010
  9.  
  10. import sys, urllib, os
  11.  
  12. #
  13. # @Charset
  14. #
  15. Char = ['%3A','%2F','%26','%2C','%3D','%252C','%253A','%7C','%3F']
  16. By =   [':','/','&',',','=',',',':','<begin>','?']
  17.  
  18. #
  19. # URLDecode(sURL)
  20. # Descifra la URL teniendo en cuenta el Charset.
  21. #
  22. def URLDecode(sURL):
  23.    for i in range(len(Char)):
  24.     sURL = sURL.replace(Char[i],By[i])
  25.    return sURL
  26.  
  27. #
  28. # GetSourceCode(sURL)
  29. # Obtiene el código de fuente del vídeo (sitio).
  30. #
  31. def GetSourceCode(sURL):
  32.    try:
  33.     URL = urllib.urlopen(sURL)
  34.     sSource = URL.read()
  35.     URL.close()
  36.     return sSource
  37.    except:
  38.        print 'Error de conexión.'
  39.        exit()
  40.  
  41. #
  42. # GetIndexVideo(sSource,Tags)
  43. # Obtiene la posición de un "Tag" o etiqueta.
  44. #
  45. def GetIndexVideo(sSource,Tags):
  46.    return sSource.find(Tags)
  47.  
  48. #
  49. # GetVideoTitle(sSource)
  50. # Obtiene el título del vídeo.
  51. #
  52. def GetVideoTitle(sSource):
  53.    sSource = sSource[2000:5500]
  54.    Begin = GetIndexVideo(sSource,'<meta name="title" content="')+28
  55.    sSource = sSource[Begin:]
  56.    End = GetIndexVideo(sSource,'>')-1
  57.    sSource = sSource[:End]
  58.    if ' ' in sSource:
  59. sSource = sSource.replace(' ','_')
  60.    return sSource
  61.  
  62. #
  63. # GetVideoURL(sSource)
  64. # Obtiene la URL de descarga del vídeo.
  65. #
  66. def GetVideoURL(sSource):
  67.    sSource = sSource[9000:30000]
  68.    Begin = GetIndexVideo(sSource,'<begin>')+7
  69.    sSource = sSource[Begin:]
  70.    End = GetIndexVideo(sSource,'id=')+19
  71.    sSource = sSource[:End]+'&title=Video(WS_Downloader)'
  72.    return sSource
  73.  
  74.  
  75. #
  76. # GetSavePath(Title)
  77. # Obtiene la ruta en la cual se guardará el vídeo, teniendo en cuenta
  78. # el sistema operativo.
  79. #
  80. def GetSavePath(Title):
  81.    if os.name == 'posix':
  82. return os.getenv('HOME')+'/'+Title+'.flv'
  83.    if os.name == 'nt':
  84. return os.getenv('HOMEDRIVE')+'\\'+Title+'.flv'
  85.  
  86. #
  87. # DownloadStatus(Bloque, Tamano, Total)
  88. # Muestra el estado de la descarga.
  89. #
  90. def DownloadStatus(Bloque, Tamano, Total):
  91.    Cantidad = Bloque * Tamano / 1024000.0
  92.    Total = Total / 1024000.0
  93.    print 'Cantidad descargada: %s MB de %s MB ...' % (round(Cantidad,1),round(Total,1))
  94.    if Cantidad >= Total:
  95.        print 'Descarga finalizada.'
  96.  
  97. #
  98. # DownloadVideo(sURL, sName, sStatus)
  99. # Descarga el vídeo de los servidores de YouTube.
  100. #
  101. def DownloadVideo(sURL, sName, sStatus):
  102.    try:
  103.        Download = urllib.urlretrieve(sURL, sName, sStatus)
  104.        return Download[0]
  105.    except:
  106.        print 'Error el descargar.'
  107.        exit()
  108.  
  109. def __main__():
  110.    __Help__ = '''
  111. __        ______    ____                      _                 _
  112. \ \     / / ___|  |  _ \ _____      ___ __ | | ___   __ _  __| | ___ _ __
  113. \ \ /\ / /\___ \ | | | |/ _ \ \ /\ / / '_ \| |/ _ \ / _` |/ _` |/ _ \ '__|
  114.  \ V  V /  ___) | | |_| | (_) \ V  V /| | | | | (_) | (_| | (_| |  __/ |  
  115.   \_/\_/  |____/  |____/ \___/ \_/\_/ |_| |_|_|\___/ \__,_|\__,_|\___|_|  
  116.    © Cibernodo & DaW - Labs
  117.    Uso:
  118.    ./WS_Downloader.py <Opción> <Id>
  119.  
  120.    Opciones:
  121.        -D     : Descargar video directamente.
  122.        -G     : Obtener URL de descarga.
  123.        -help  : Ver Ayuda.
  124.               '''
  125.  
  126.    try:
  127.        Opt = sys.argv[1]
  128.        if Opt == '-help':
  129.            print __Help__
  130.  
  131.        if len(sys.argv) > 2:
  132.            Id = URLDecode(GetSourceCode('http://www.youtube.com/watch?v='+sys.argv[2]))
  133.            Title = GetSavePath(GetVideoTitle(Id))
  134.            URL = GetVideoURL(Id)
  135.  
  136.            if Opt == '-G':
  137.                print '======== Video URL ========\n',URL
  138.  
  139.            elif Opt == '-D':
  140.                DownloadVideo(URL,Title,DownloadStatus)
  141.  
  142.    except:
  143.        print __Help__
  144.  
  145. if __name__ == "__main__":
  146.   __main__()
  147.  
  148.  
  149.  
  150.  

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:

Código
  1. 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.

Código
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # FlipString.py - DaW - Labs & Cibernodo
  4. # Autor: .:WindHack:.
  5. # 20/09/2010 - www.daw-labs.com & www.cibernodo.net
  6. # Puede usar, modificar y redistribuir éste código
  7. # siempre y cuando respete los derechos de autor.
  8.  
  9. from sys import argv
  10.  
  11. # Diccionario de equivalencia en caracteres.
  12.  
  13. FlipCharset = { 'a' :u'\u0250',
  14.                'b' :'q',
  15.                'c' :u'\u0254',
  16.                'd' :'p',
  17.                'e' :u'\u01DD',
  18.                'f' :u'\u025F',
  19.                'g' :u'\u0183',
  20.                'h' :u'\u0265',
  21.                'i' :u'\u0131',
  22.                'j' :u'\u027E',
  23.                'k' :u'\u029E',
  24.                'l' :'l',
  25.                'm' :u'\u026F',
  26.                'n' :'u',
  27.                'o' :'o',
  28.                'p' :'d',
  29.                'q' :'b',
  30.                'r' :u'\u0279',
  31.                's' :'s',
  32.                't' :u'\u0287',
  33.                'u' :'n',
  34.                'v' :u'\u028C',
  35.                'w' :u'\u028D',
  36.                'x' :'x',
  37.                'y' :u'\u028E',
  38.                'z' :'z',
  39.                ' ' :' ',
  40.                '1' : '\u21C2',
  41.                '2' : '\u1105',
  42.                '3' : '\u1110',
  43.                '4' : '\u3123',
  44.                '5' : '\u078E',
  45.                '6' : '9',
  46.                '7' : '\u3125',
  47.                '8' : '8',
  48.                '9' : '6',
  49.                '0' : '0',
  50.                '.' : '\u02D9',
  51.                ',' : "\'",
  52.                ';' : '\u061B',
  53.                '!' : '¡',
  54.                '¡' : '!',
  55.                '?' : '¿',
  56.                '¿' : '?',
  57.                '[' : ']',
  58.                ']' : '[',
  59.                '(' : ')',
  60.                ')' : '(',
  61.                '{' : '}',
  62.                '}' : '{',
  63.                '<' : '>',
  64.                '>' : '<',
  65.                '_' : '\u203E' }
  66.  
  67. # Función para girar el texto.
  68.  
  69. def FlipString(String):
  70.    Result = ''
  71.    String = String.lower()
  72.    for i in String:
  73.        Result += FlipCharset[i]
  74.    return Result[::-1]
  75.  
  76. def __main__():
  77.    __Help__ =  '''
  78. _____ _ _      ____  _        _
  79. |  ___| (_)_ __/ ___|| |_ _ __(_)_ __   __ _
  80. | |_  | | | '_ \___ \| __| '__| | '_ \ / _` |
  81. |  _| | | | |_) |__) | |_| |  | | | | | (_| |
  82. |_|   |_|_| .__/____/ \__|_|  |_|_| |_|\__, |
  83.          |_|                          |___/
  84.  
  85. © 2010. DaW - Labs & Cibernodo
  86.  
  87. Modo de uso:
  88.    FlipString.py "Texto"
  89.    '''
  90.    try:
  91.        HasText = argv[1]
  92.        print '''
  93. %s
  94.              ''' % FlipString(HasText)
  95.    except:
  96.        print __Help__
  97.  
  98. if __name__ == '__main__':
  99.    __main__()
6  Programación / Ingeniería Inversa / [CrackMe] - D-CrackMe by .:WindHack:. en: 25 Julio 2010, 22:34 pm
Bueno, un CrackMe que hice para entretenerme un rato.

Ya sé que lo resolveran en muy poco tiempo pero hace tiempo que no hacía uno. :P

---



  • Contraseña por MP
  • Un tutorial de cómo lo resolvieron

Descarga:
http://www.box.net/shared/opzact9v3o
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. :P

Código
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # VideoDown.py - DaW - Labs
  4. # Autor: .:WindHack:.
  5. # 22/07/2010 - www.daw-labs.com
  6. # Puede usar, modificar y redistribuir este codigo
  7. # siempre y cuando respete los derechos de autor.
  8.  
  9. import sys, urllib
  10. from sgmllib import SGMLParser
  11.  
  12. class Parser(SGMLParser):
  13.    def reset(self):
  14.        SGMLParser.reset(self)
  15.        self.urls = []
  16.  
  17.    def start_a(self, attrs):
  18.        href = [v for k, v in attrs if k=='href']
  19.        if href:
  20.            self.urls.extend(href)
  21.  
  22. def DownloadStatus(Bloque,Tamano,Total):
  23.    Cantidad = Bloque * Tamano / 1024
  24.    Total = Total / 1024
  25.    print 'Cantidad descargada: %s KB de %s KB ...' % (Cantidad,Total)
  26.    if Cantidad > Total:
  27.        print 'Descarga finalizada.'
  28.  
  29. def DownloadVideo(URL, Name, Status):
  30.    try:
  31.        Download = urllib.urlretrieve(URL, Name, Status)
  32.        return Download[0]
  33.    except:
  34.        return 'Ha sucedido un error en la descarga.'
  35.  
  36.  
  37. def GetDownloadURL(URL,Download):
  38.    if len(URL) != 0:
  39.        URLv = urllib.urlopen('http://www.flashvideodownloader.org/download2.php?u=%s' % URL)
  40.        DownloadURL = Parser()
  41.        DownloadURL.feed(URLv.read())
  42.        DownloadURL.close()
  43.        URLv.close()
  44.        URL = DownloadURL.urls[8]
  45.        if Download == True:
  46.            DownloadVideo(URL,'C:\Video_By_VideoDown.flv',DownloadStatus)
  47.        else:
  48.            return 'La URL de descarga es:\n%s' % URL
  49.    else:
  50.        return 'URL invalida...'
  51.  
  52. def __main__():
  53.    __Ayuda__ = '''
  54. _ _  _    _            ___                   _
  55. | | |<_> _| | ___  ___ | . \ ___  _ _ _ ._ _ | |
  56. | ' || |/ . |/ ._>/ . \| | |/ . \| | | || ' ||_/
  57. |__/ |_|\___|\___.\___/|___/\___/|__/_/ |_|_|<_>
  58.    © 2010. DaW - Labs          -           www.daw-labs.com
  59.    Uso:
  60.    VideoDown.py <OPCION> <URL>
  61.    Opciones:
  62.    -D  : Descarga un video.
  63.    -O  : Obtiene solo la URL de descarga.
  64.    -H  : Muestra la ayuda.
  65.    -----------------------------------------------------------
  66.    Para ver la lista de sitios soportados abra el archivo:
  67.    Supported Sites.txt
  68.            '''
  69.    try:
  70.        Opc = sys.argv[1]
  71.        if Opc == '-H':
  72.            print __Ayuda__
  73.        elif Opc == '-D':
  74.            GetDownloadURL(sys.argv[2],True)
  75.        elif Opc == '-O':
  76.            print GetDownloadURL(sys.argv[2],False)
  77.        else:
  78.            print 'Se esperaba un parametro...'
  79.    except:
  80.        print __Ayuda__
  81.  
  82. if __name__ == "__main__":
  83.    __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.  :-(
8  Foros Generales / Foro Libre / ¡Que comercial! en: 11 Junio 2010, 01:18 am


Pues me provocó algo de curiosidad éste comercial.
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.

Código
  1. ###################################
  2. #  Autor: .:WindHack:.            #
  3. #  Sitio web: http://daw-labs.com #
  4. #  Agradecimientos: Sifaw         #
  5. ###################################
  6.  
  7. def Cifrar_Cesar(String,Key):
  8.    tmp = ''
  9.    for i in String:
  10.        tmp += chr(ord(i)+Key)
  11.    return tmp
  12.  
  13. def Descifrar_Cesar(String,Key):
  14.    return Cifrar_Cesar(String,-Key)
  15.  
  16. print " ================================= "
  17. print "|        Des/Cifrar Cesar         |"
  18. print "|          .:WindHack:.           |"
  19. print "|       http://daw-labs.com       |"
  20. print " ================================= "
  21. Palabra = raw_input("Introduce la frase: ")
  22. Clave = input("Introduce la clave: ")
  23. print "Palabra cifrada: " + Cifrar_Cesar(Palabra,Clave)
  24. print "Palabra descifrada: " + Descifrar_Cesar(Palabra,Clave)
Páginas: [1] 2
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines