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


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 [872] 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 ... 1253
8711  Programación / .NET (C#, VB.NET, ASP) / Re: Error al capturar texto de pagina web VB.NET 2008 en: 14 Julio 2013, 18:03 pm
¿Tú qué opinas?
No soy quien para opinar sobre protocolos, el nivel web no es lo mio xD.

Lo que si tengo claro es que los headers hay que eliminarlos y agregar los de Shoutcast, al menos eso es lo que he visto hacer por ahí, pero con eso no parece ser suficiente para requerir la información del "Status" del server.

Saludos!
8712  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 14 Julio 2013, 17:05 pm
He ideado esya función para convertir un archivo REG a un script BAT.

La verdad es que no me ha costado mucho, ya había desarrollado antes la manera de convertir usando Ruby y sólo he tenido que trasladar el código que hice y agregarle las mejoras de VBNET xD.


Código
  1.    #Region " Reg2Bat "
  2.  
  3.       ' [ Reg2Bat Function ]
  4.       '
  5.       ' // By Elektro H@cker
  6.       '
  7.       ' Examples :
  8.       ' MsgBox(Reg2Bat("C:\Registry.reg"))
  9.  
  10.    Private Function Reg2Bat(ByVal Reg_File As String) As String
  11.  
  12.        ' Source Input
  13.        ' Join he lines, delete the Regedit linebreaks characters: "\  ", and then split the lines.
  14.        Dim RegFile() As String = Split( _
  15.                                  String.Join("@@@Reg2Bat@@@", IO.File.ReadAllLines(Reg_File)) _
  16.                                  .Replace("\@@@Reg2Bat@@@  ", "") _
  17.                                  .Replace("@@@Reg2Bat@@@", Environment.NewLine), _
  18.                                  Environment.NewLine)
  19.  
  20.        Dim RegLine As String = String.Empty ' Where the Regedit Line will be stored.
  21.        Dim RegKey As String = String.Empty ' Where the Regedit Key will be stored.
  22.        Dim RegVal As String = String.Empty ' Where the Regedit Value will be stored.
  23.        Dim RegData As String = String.Empty ' Where the Regedit Data will be stored.
  24.  
  25.        Dim Batch_Commands As String = String.Empty ' Where the decoded Regedit strings will be stored.
  26.  
  27.        ' Check if first line of Reg File has a valid Regedit signature
  28.        For X As Int64 = 0 To RegFile.LongLength - 1
  29.  
  30.            RegLine = RegFile(X).Trim
  31.  
  32.            While RegLine = String.Empty
  33.                X += 1
  34.                RegLine = RegFile(X).Trim
  35.            End While
  36.  
  37.            If Not RegLine.ToLower = "windows registry editor version 5.00" Then
  38.                Throw New Exception("This is not a valid Regedit v5.00 script.")
  39.                Return Nothing
  40.            Else
  41.                Batch_Commands &= ":: Converted with REG2BAT By Elektro H@cker" & Environment.NewLine & Environment.NewLine
  42.                Batch_Commands &= String.Format("REM {0}", RegLine) & Environment.NewLine & Environment.NewLine
  43.                Exit For
  44.            End If
  45.  
  46.        Next
  47.  
  48.        ' Start reading the Regedit File
  49.        For X As Int64 = 0 To RegFile.LongLength - 1
  50.  
  51.            RegLine = RegFile(X).Trim
  52.  
  53.            Select Case True
  54.  
  55.                Case RegLine.StartsWith(";") ' Comment line
  56.  
  57.                    Batch_Commands &= Environment.NewLine
  58.                    Batch_Commands &= String.Format("REM {0}", RegLine.Substring(1, RegLine.Length - 1).Trim)
  59.                    Batch_Commands &= Environment.NewLine
  60.  
  61.                Case RegLine.StartsWith("[-") ' Key to delete
  62.  
  63.                    RegKey = RegLine.Substring(2, RegLine.Length - 3).Trim
  64.                    Batch_Commands &= String.Format("REG DELETE ""{0}"" /F", RegKey)
  65.                    Batch_Commands &= Environment.NewLine
  66.  
  67.                Case RegLine.StartsWith("[") ' Key to add
  68.  
  69.                    RegKey = RegLine.Substring(1, RegLine.Length - 2).Trim
  70.                    Batch_Commands &= String.Format("REG ADD ""{0}"" /F", RegKey)
  71.                    Batch_Commands &= Environment.NewLine
  72.  
  73.                Case RegLine.StartsWith("@=") ' Default Value to add
  74.  
  75.                    RegData = Split(RegLine, "@=", , CompareMethod.Text).Last
  76.                    Batch_Commands &= String.Format("REG ADD ""{0}"" /V  """" /D {1} /F", RegKey, RegData)
  77.                    Batch_Commands &= Environment.NewLine
  78.  
  79.                Case RegLine.StartsWith("""") _
  80.                AndAlso RegLine.Split("=").Last = "-"  ' Value to delete
  81.  
  82.                    RegVal = RegLine.Substring(1, RegLine.Length - 4)
  83.                    Batch_Commands &= String.Format("REG DELETE ""{0}"" /V ""{1}"" /F", RegKey, RegVal)
  84.                    Batch_Commands &= Environment.NewLine
  85.  
  86.                Case RegLine.StartsWith("""") ' Value to add
  87.  
  88.                    RegLine = RegLine.Replace("\\", "\") ' Replace Double "\\" to single "\".
  89.  
  90.                    ' Check data type:
  91.                    Select Case RegLine.Split("=")(1).Split(":")(0).ToLower
  92.  
  93.                        Case "hex" ' Binary
  94.  
  95.                            RegVal = Split(RegLine, "=hex:", , CompareMethod.Text)(0)
  96.                            RegData = Split(RegLine, (RegVal & "=hex:"), , CompareMethod.Text).Last.Replace(",", "")
  97.                            Batch_Commands &= String.Format("REG ADD ""{0}"" /V {1} /T ""REG_BINARY"" /D ""{2}"" /F", RegKey, RegVal, RegData)
  98.                            Batch_Commands &= Environment.NewLine
  99.  
  100.                        Case "dword" ' DWORD
  101.  
  102.                            RegVal = Split(RegLine, "=dword:", , CompareMethod.Text)(0)
  103.                            RegData = "0x" & Split(RegLine, (RegVal & "=dword:"), , CompareMethod.Text).Last
  104.                            Batch_Commands &= String.Format("REG ADD ""{0}"" /V {1} /T ""REG_DWORD"" /D ""{2}"" /F", RegKey, RegVal, RegData)
  105.                            Batch_Commands &= Environment.NewLine
  106.  
  107.                        Case "hex(b)" ' QWORD
  108.  
  109.                            Dim TempData As String = "0x"
  110.                            RegVal = Split(RegLine, "=hex(b):", , CompareMethod.Text)(0)
  111.                            RegData = StrReverse(Split(RegLine, (RegVal & "=hex(b):"), , CompareMethod.Text).Last)
  112.                            For Each [byte] In RegData.Split(",") : TempData &= StrReverse([byte]) : Next
  113.                            Batch_Commands &= String.Format("REG ADD ""{0}"" /V {1} /T ""REG_QWORD"" /D ""{2}"" /F", RegKey, RegVal, TempData)
  114.                            Batch_Commands &= Environment.NewLine
  115.  
  116.                        Case "hex(2)"  ' EXPAND SZ
  117.  
  118.                            Dim TempData As String = String.Empty
  119.                            RegVal = Split(RegLine, "=Hex(2):", , CompareMethod.Text)(0)
  120.                            RegData = Split(RegLine, (RegVal & "=hex(2):"), , CompareMethod.Text).Last.Replace(",00", "").Replace("00,", "")
  121.                            For Each [byte] In RegData.Split(",") : TempData &= Chr(Val("&H" & [byte])) : Next
  122.                            TempData = TempData.Replace("%", "%%").Replace("""", "\""")
  123.                            Batch_Commands &= String.Format("REG ADD ""{0}"" /V {1} /T ""REG_EXPAND_SZ"" /D ""{2}"" /F", RegKey, RegVal, TempData)
  124.                            Batch_Commands &= Environment.NewLine
  125.  
  126.                        Case "hex(7)" ' MULTI SZ
  127.  
  128.                            Dim TempData As String = String.Empty
  129.                            RegVal = Split(RegLine, "=Hex(7):", , CompareMethod.Text)(0)
  130.                            RegData = Split(RegLine, (RegVal & "=hex(7):"), , CompareMethod.Text).Last.Replace(",00,00,00", ",\0").Replace(",00", "").Replace("00,", "")
  131.  
  132.                            For Each [byte] In RegData.Split(",")
  133.  
  134.                                If [byte] = "\0" Then
  135.                                    TempData &= "\0" ' Line separator for multiline.
  136.                                Else
  137.                                    TempData &= Chr(Val("&H" & [byte]))
  138.                                End If
  139.  
  140.                            Next
  141.  
  142.                            TempData = TempData.Replace("%", "%%").Replace("""", "\""")
  143.                            Batch_Commands &= String.Format("REG ADD ""{0}"" /V {1} /T ""REG_MULTI_SZ"" /D ""{2}"" /F", RegKey, RegVal, TempData)
  144.                            Batch_Commands &= Environment.NewLine
  145.  
  146.                        Case Else ' REG SZ
  147.  
  148.                            RegVal = Split(RegLine, """=""", , CompareMethod.Text)(0)
  149.                            RegData = Split(RegLine, (RegVal & """="""), , CompareMethod.Text).Last
  150.                            Batch_Commands &= String.Format("REG ADD ""{0}"" /V {1}"" /T ""REG_SZ"" /D ""{2} /F", RegKey, RegVal, RegData)
  151.                            Batch_Commands &= Environment.NewLine
  152.  
  153.                    End Select
  154.  
  155.            End Select
  156.  
  157.        Next
  158.  
  159.        Return Batch_Commands
  160.  
  161.    End Function
  162.  
  163.    #End Region
  164.  
8713  Programación / .NET (C#, VB.NET, ASP) / [SOURCE] Plixid Leecher en: 14 Julio 2013, 16:53 pm
Descripción:

Una aplicación que descarga todas las urls de los últimos albums de la página plixid.com,
las urls se almacenan en un archivo de texto para copiarlas en Jdownloader (por ejemplo), también se pueden copiar desde el menú contextual de la aplicación.

La aplicación guarda las urls copiadas en un archivo log para no volver a descargarlas en el próximo uso de la aplicación.

...Y la búsqueda de albúms se puede filtrar por géneros de música.


Imágenes (última versión):








Demostración (Versión antigua):




Descarga:

-> http://ElektroStudios.tk//Plixid%20Leecher.zip

Version 2.2:
-> http://www.mediafire.com/download/nun04znym2u4hys/Plixid+Leecher.rar
8714  Programación / .NET (C#, VB.NET, ASP) / [SOURCE] REG2BAT (Convierte archivos de Registro a scripts Batch) en: 14 Julio 2013, 16:53 pm



Descripción:

Una aplicación para convertir archivos REG a archivos BAT,
para ser más exactos convierte un script de registro a la sintaxis que usa el comando REG.exe.

La aplicación se puede usar también por consola:

Código:
 [+] Syntax:

 REG2BAT [Registry File] [Output File]

Esto es un archivo de registro convertido:

Código
  1. :: Converted with REG2BAT By Elektro H@cker
  2.  
  3. REM Windows Registry Editor Version 5.00
  4.  
  5. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Binary" /T "REG_BINARY" /D "1234567890" /F
  6. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Dword Dec" /T "REG_DWORD" /D "0x00bc614e" /F
  7. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Dword hex" /T "REG_DWORD" /D "0x12345678" /F
  8. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Expand SZ" /T "REG_EXPAND_SZ" /D "%%Temp%%\Hello" /F
  9. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Multi SZ" /T "REG_MULTI_SZ" /D "Hello\0world!\0" /F
  10. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Qword Dec" /T "REG_QWORD" /D "0x00000000000010e1" /F
  11. REG ADD "HKEY_CURRENT_USER\Test" /V "Test Qword Hex" /T "REG_QWORD" /D "0x1234567891234567" /F
  12. REG ADD "HKEY_CURRENT_USER\Test" /V "Test String" /T "REG_SZ" /D "By Elektro H@cker" /F


Imágenes:








Demostración:




Descarga:

-> http://www.mediafire.com/download/1h3zbymfhnb3spt/REG2BAT.rar
8715  Programación / .NET (C#, VB.NET, ASP) / [SOURCE] CronoX (Un cronómetro) en: 14 Julio 2013, 16:52 pm
Descripción:

Un simple cronómetro, siempre me hizo ilusión hacer uno xD.


Imágenes:




Demostración:




Descarga:

-> http://ElektroStudios.tk//CronoX.zip
8716  Programación / .NET (C#, VB.NET, ASP) / Re: [SOURCE] MP3Crank Leecher en: 14 Julio 2013, 16:51 pm
Nueva versión 1.2

Cambios:

 - La aplicación se ha vuelto a desarrollar para que funcione con los nuevos cambios de la página web.
 - La lista de estilos de música también se ha tenido que actualizar.
 - Ya no hay ningún tipo de operaciones con archivos (descarga de sources web), ahora todo se hace virtuálmente y como resultado la velocidad de lectura se ha visto aumentada en un...me atrevería a decir 500%.
 - Mejoras de código en general.


DESCARGA:

-> http://ElektroStudios.tk//MP3Crank_Leecher.zip
8717  Programación / .NET (C#, VB.NET, ASP) / Re: [SOURCE] AeroSwitch en: 14 Julio 2013, 16:51 pm
Nueva versión

Cambios:
- Ahora se puede intercambiar entre un theme y otro desde el programa cuando Aero está activado.


DESCARGA:

-> http://elektrostudios.tk/AeroSwitch.zip
8718  Programación / .NET (C#, VB.NET, ASP) / Re: Visual C# 2010 No me toma los cambios en: 14 Julio 2013, 16:28 pm
La opción también también la puedes encontrar haciendo click derecho sobre el nombre de tu proyecto, en la IDE en el árbol de la derecha.

8719  Informática / Software / Re: [Programa] ScreenTool en: 14 Julio 2013, 16:14 pm

Claro, ahi no subiste el executable, sólo mostrabas imágenes para que te dijeramos como iba quedando tu programa y pedías opiniones y blabla, ¿Hay sotware?, no, pues eso no va en la categoría de Software, al menos no bajo mi punto de vista xD.

Saludos!!
8720  Programación / .NET (C#, VB.NET, ASP) / Re: Visual C# 2010 No me toma los cambios en: 14 Julio 2013, 16:10 pm
Limpia el proyecto y haz un rebuild:



Saludos
Páginas: 1 ... 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 [872] 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 ... 1253
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines