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


Tema destacado: Security Series.XSS. [Cross Site Scripting]


  Mostrar Mensajes
Páginas: 1 ... 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 [886] 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 ... 1254
8851  Programación / Programación General / Re: crear un script necesito algún editor de texto en: 3 Julio 2013, 18:49 pm
Hola

(Veo que aún sigues con lo del BruteForce xD)

Pues lo primero de todo que debes hacer es olvidarte de hacerlo con Batch, porque es lento y tu queja principal es por la lentitud de los ciclos de Batch.

La verdad es que te diría que te olvidases del scripting y que lo hagas en un lenguaje compilado, pero si quieres hacer un script hazlo en Python, Perl, o Ruby, la diferencia entre Batch y estos lenguajes es abismal (por supuesto también hablando de velocidad...).

Si estás dispuesto a aprender de verdad ...pues aún te queda mucho camino hasta saber hacer un loop o loops anidados para generar diccionarios, puedes empezar por elegir un lenguaje con el que empezar, descargarte el interprete de ese lenguaje en su página oficial, y leerte la documentación oficial donde está todo lo que puedes hacer con ese lenguaje, o leer libros o tutoriales online, practicar ejercicios, y seguir practicando.

Saludos!

EDITO: Me voy a desvirtuar un poco del tema, pero como te veo un poco perdido e indeciso te sugiero que te descargues la IDE VisualStudio para programar en VB.NET, crea un nuevo proyecto Winform en VB y prueba este código

Código
  1. #Region " Permute all combinations of characters "
  2.  
  3.    ' [ Permute Characters Function ]
  4.    '
  5.    ' Examples :
  6.    ' Dim Permutations = Permute_Characters("abc", 2)
  7.    ' For Each Permutation As IEnumerable(Of Char) In Permutations : RichTextBox1.Text &= vbNewLine & Permutation.ToArray : Next
  8.    ' MsgBox(Permutations.Aggregate(Function(str, p) str.ToArray & Environment.NewLine & p.ToArray))
  9.  
  10.    Private Shared Function Permute_Characters(Of T)(list As IEnumerable(Of T), length As Integer) As IEnumerable(Of IEnumerable(Of T))
  11.  
  12.        If length = 1 Then
  13.            Return list.[Select](Function(x) New T() {x})
  14.        Else
  15.            Return Permute_Characters(list, length - 1).SelectMany(Function(x) list, Function(t1, t2) t1.Concat(New T() {t2}))
  16.        End If
  17.  
  18.    End Function
  19.  
  20. #End Region

Sirve para permutar todas las combinaciones posibles dada una serie de caracteres, bueno, ahí tienes unos ejemplos de como usarlo, en los comentarios del snippet.

En google puedes encontrar ejemplos de permutaciones para ruby, python, etc...

PD: Ahora, puedes cojer cualquier lenguaje de scripting, puedes intentar reproducir lo mismo usando decenas Fors, y ya verás la diferencia... xD
8852  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 3 Julio 2013, 17:56 pm
Actualizada la colección de snippets con un total de 400 Snippets...
...Casi nada!!

-> http://elektrostudios.tk/Snippets.zip

En la primera página de este hilo tienen un índice de todos los snippets que contiene el pack.

Saludos!
8853  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 3 Julio 2013, 17:38 pm
Format Time

Formatea un número de milisegundos.

Código
  1. #Region " Format Time "
  2.  
  3.    ' [ Format Time Function ]
  4.    '
  5.    ' // By Elektro H@cker
  6.    '
  7.    ' Examples :
  8.    ' MsgBox(Format_Time(61500, TimeFormat.M_S_MS)) ' Result: "01:01:500"
  9.    ' MsgBox(Format_Time(65000, TimeFormat.M_S))    ' Result: "01:05"
  10.  
  11.    ' TimeFormat [ENUM]
  12.    Public Enum TimeFormat
  13.        D_H_M_S_MS
  14.        D_H_M_S
  15.        D_H_M
  16.        D_H
  17.        D
  18.  
  19.        H_M_S_MS
  20.        H_M_S
  21.        H_M
  22.        H
  23.  
  24.        M_S_MS
  25.        M_S
  26.        M
  27.  
  28.        S_MS
  29.        S
  30.    End Enum
  31.  
  32.    ' Format Time [FUNC]
  33.    Private Function Format_Time(ByVal MilliSeconds As Int64, ByVal TimeFormat As TimeFormat) As String
  34.  
  35.        Dim Time As New TimeSpan(TimeSpan.TicksPerMillisecond * MilliSeconds)
  36.  
  37.        Select Case TimeFormat
  38.  
  39.            Case TimeFormat.D_H_M_S_MS
  40.                Return Time.ToString("dd\:hh\:mm\:ss\:fff")
  41.            Case TimeFormat.D_H_M_S
  42.                Return Time.ToString("dd\:hh\:mm\:ss")
  43.            Case TimeFormat.D_H_M
  44.                Return Time.ToString("dd\:hh\:mm")
  45.            Case TimeFormat.D_H
  46.                Return Time.ToString("dd\:hh")
  47.            Case TimeFormat.D
  48.                Return Time.ToString("dd")
  49.            Case TimeFormat.H_M_S_MS
  50.                Return Time.ToString("hh\:mm\:ss\:fff")
  51.            Case TimeFormat.H_M_S
  52.                Return Time.ToString("hh\:mm\:ss")
  53.            Case TimeFormat.H_M
  54.                Return Time.ToString("hh\:mm")
  55.            Case TimeFormat.H
  56.                Return Time.ToString("hh")
  57.            Case TimeFormat.M_S_MS
  58.                Return Time.ToString("mm\:ss\:fff")
  59.            Case TimeFormat.M_S
  60.                Return Time.ToString("mm\:ss")
  61.            Case TimeFormat.M
  62.                Return Time.ToString("mm")
  63.            Case TimeFormat.S_MS
  64.                Return Time.ToString("ss\:fff")
  65.            Case TimeFormat.S
  66.                Return Time.ToString("ss")
  67.            Case Else
  68.                Return Nothing
  69.        End Select
  70.  
  71.    End Function
  72.  
  73. #End Region





Cuando creo un listview suelo añadir un índice numérico en la primera columna, para mantener un orden, bueno pues este snippet sirve para reindexar esa columna por ejemplo cuando eliminamos un item del listview.



Código
  1. #Region " ReIndex ListView "
  2.  
  3.    ' [ ReIndex ListView ]
  4.    '
  5.    ' // By Elektro H@cker
  6.    '
  7.    ' Examples :
  8.    ' ReIndex_ListView(ListView1)
  9.  
  10.    ' ReIndex ListView [SUB]
  11.    Private Sub ReIndex_ListView(ByVal ListView As ListView, Optional ByVal Column As Int32 = 0)
  12.        Dim Index As Int32 = 0
  13.        For Each Item As ListViewItem In ListView.Items
  14.            Index += 1
  15.            Item.SubItems(Column).Text = Index
  16.        Next
  17.    End Sub
  18.  
  19. #End Region
8854  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 3 Julio 2013, 15:54 pm
Que el archivo no se descargaba, no lo hablamos ayer? xD

claro, quiero decir que ¿Como lo arreglaste? que correcciones habia que hacerle? xD
8855  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 3 Julio 2013, 14:31 pm
Ahora si va. ;D

No quiero desvirtuar mucho el tema, pero por curiosidad cual era el fallo?
8856  Programación / Scripting / Re: Dejar algún tipo de registro al abrir un Batch en: 2 Julio 2013, 21:33 pm
La forma en la que estás usando el comando es la correcta para ejecutar la ventana del hta minimizada, quizás el problema debe estar en el contenido de ese script hta.

PD: Aunque el /wait te lo puedes ahorrar, no es necesario.

Yo no he querido decir nada, pero a mi todo esto de hacer una aplicación en VB.NET para luego usar hta y bats me parece una insensatez, pero lo que me parece complétamente innecesario es tener que recurrir a un programa como WinRar, porque no creo que ningún programador en su sano juicio use o se le pase por la cabeza usar WinRar para distribuir su aplicación de manera oficial... existe algo que se llama "Install builder", que es mucho mejor que hacer un doble sfx junto a un script bat, y otro script hta, y no se cuantas cosas más ...según tu tutorial.

Luego no te extrañes si tu instalador SFX es detectado por 30 antivirus... porque es lo que te va a pasar.

Es mi opinión, guste o no.

Saludos!
8857  Programación / Scripting / Re: Dejar algún tipo de registro al abrir un Batch en: 2 Julio 2013, 19:28 pm
Me gustaría dejar algún tipo de registro sin tener que abrir un navegador eso es posible?

¿Que entiendes por "algún tipo de registro"?

¿Que quieres hacer?.
8858  Programación / .NET (C#, VB.NET, ASP) / Re: Asi va quedando mi rpg game engine en: 2 Julio 2013, 17:03 pm
Siempre quise hacer un juego 2D con el RPG Maker (Pero nunca lo llegué a probar por falta de gráficos ...y de ganas xD),
Tiene buenísma pinta, y la aplicaición es digna de admiración.

+10

Saludos!
8859  Sistemas Operativos / Windows / Re: ¿Alguien que tenga algún Windows que no sea el 7 podría hacerme un favor? en: 2 Julio 2013, 15:19 pm
Ingeniería Social?...

Dudo que alguien con 800 mensajes sea así de lammer, para acabar baneado por una tontería, de todas formas yo lo he probado en un win8 virtual por si las moscas  >:D

@OmarHack
En windows 8 x64 se instala, el lynx funciona, los comandos del beta mastershell no lo se, porque no los he encontrado.

PD: si pones "cmd" en el mastershell se ejecuta la cmd y finaliza el mastershell, quizás quieras evitarlo.

saludos
8860  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 2 Julio 2013, 07:27 am
He extendido y mejorado la función para buscar texto en la colección de Items de un listview:

PD: la versión antigua la pueden encontrar aquí: http://foro.elhacker.net/net/libreria_de_snippets_posteen_aqui_sus_snippets-t378770.0.html;msg1865639#msg1865639

#Region " [ListView] Find ListView Text "

    ' [ListView] Find ListView Text Function
    '
    ' // By Elektro H@cker
    '
    ' Examples :
    ' MsgBox(Find_ListView_Text(ListView1, "Test"))
    ' MsgBox(Find_ListView_Text(ListView1, "Test", 2, True, True))
    ' If Find_ListView_Text(ListView1, "Test") Then...

    Private Function Find_ListView_Text(ByVal ListView As ListView, _
                                        ByVal SearchString As String, _
                                        Optional ByVal ColumnIndex As Int32 = Nothing, _
                                        Optional ByVal MatchFullText As Boolean = True, _
                                        Optional ByVal IgnoreCase As Boolean = True) As Boolean

        Dim ListViewColumnIndex As Int32 = ListView.Columns.Count - 1

        Select Case ColumnIndex

            Case Is < 0, Is > ListViewColumnIndex ' ColumnIndex is out of range

                Throw New Exception("ColumnIndex is out of range. " & vbNewLine & _
                                    "ColumnIndex Argument: " & ColumnIndex & vbNewLine & _
                                    "ColumnIndex ListView: " & ListViewColumnIndex)

            Case Nothing ' ColumnIndex is nothing

                If MatchFullText AndAlso IgnoreCase Then ' Match full text, All columns, IgnoreCase
                    For Each Item As ListViewItem In ListView.Items
                        For X As Int32 = 0 To ListViewColumnIndex
                            If Item.SubItems(X).Text.ToLower = SearchString.ToLower Then Return True
                        Next
                    Next
                ElseIf MatchFullText AndAlso Not IgnoreCase Then ' Match full text, All columns, CaseSensitive
                    For Each Item As ListViewItem In ListView.Items
                        For X As Int32 = 0 To ListViewColumnIndex
                            If Item.SubItems(X).Text = SearchString Then Return True
                        Next
                    Next
                ElseIf Not MatchFullText AndAlso IgnoreCase Then ' Match part of text, All columns, IgnoreCase
                    If ListView1.FindItemWithText(SearchString) IsNot Nothing Then _
                         Return True _
                    Else Return False
                ElseIf Not MatchFullText AndAlso Not IgnoreCase Then ' Match part of text, All columns, CaseSensitive
                    For Each Item As ListViewItem In ListView.Items
                        For X As Int32 = 0 To ListViewColumnIndex
                            If Item.SubItems(X).Text.Contains(SearchString) Then Return True
                        Next
                    Next
                End If

            Case Else ' ColumnIndex is other else

                If MatchFullText AndAlso IgnoreCase Then ' Match full text, ColumnIndex, IgnoreCase
                    For Each Item As ListViewItem In ListView.Items
                        If Item.SubItems(ColumnIndex).Text.ToLower = SearchString.ToLower Then Return True
                    Next
                ElseIf MatchFullText AndAlso Not IgnoreCase Then  ' Match full text, ColumnIndex, CaseSensitive
                    For Each Item As ListViewItem In ListView.Items
                        If Item.SubItems(ColumnIndex).Text = SearchString Then Return True
                    Next
                ElseIf Not MatchFullText AndAlso IgnoreCase Then ' Match part of text, ColumnIndex, IgnoreCase
                    For Each Item As ListViewItem In ListView.Items
                        If Item.SubItems(ColumnIndex).Text.ToLower.Contains(SearchString.ToLower) Then Return True
                    Next
                ElseIf Not MatchFullText AndAlso Not IgnoreCase Then ' Match part of text, ColumnIndex, CaseSensitive
                    For Each Item As ListViewItem In ListView.Items
                        If Item.SubItems(ColumnIndex).Text.Contains(SearchString) Then Return True
                    Next
                End If

        End Select

        Return False

    End Function

#End Region



EDITO:

Vuelto a mejorar:

(El anterior no medía la cantidad de subitems de cada item, por ejemplo en un listview con 3 columnas, un item con dos subitems y otro item con 3 subitems entonces daba error porque el primer item no tenia un tercer subitem)

Código
  1. #Region " [ListView] Find ListView Text "
  2.  
  3.    ' [ListView] Find ListView Text Function
  4.    '
  5.    ' // By Elektro H@cker
  6.    '
  7.    ' Examples :
  8.    ' MsgBox(Find_ListView_Text(ListView1, "Test"))
  9.    ' MsgBox(Find_ListView_Text(ListView1, "Test", 2, True, True))
  10.    ' If Find_ListView_Text(ListView1, "Test") Then...
  11.  
  12.    Private Function Find_ListView_Text(ByVal ListView As ListView, _
  13.                                        ByVal SearchString As String, _
  14.                                        Optional ByVal ColumnIndex As Int32 = Nothing, _
  15.                                        Optional ByVal MatchFullText As Boolean = True, _
  16.                                        Optional ByVal IgnoreCase As Boolean = True) As Boolean
  17.  
  18.        Select Case ColumnIndex
  19.  
  20.            Case Is < 0, Is > ListView.Columns.Count - 1 ' ColumnIndex is out of range
  21.  
  22.                Throw New Exception("ColumnIndex is out of range. " & vbNewLine & _
  23.                                    "ColumnIndex Argument: " & ColumnIndex & vbNewLine & _
  24.                                    "ColumnIndex ListView: " & ListView.Columns.Count - 1)
  25.  
  26.            Case Nothing ' ColumnIndex is nothing
  27.  
  28.                If MatchFullText Then ' Match full text in all columns
  29.  
  30.                    For Each Item As ListViewItem In ListView.Items
  31.                        For X As Int32 = 0 To Item.SubItems.Count - 1
  32.                            If String.Compare(Item.SubItems(X).Text, SearchString, IgnoreCase) = 0 Then
  33.                                Return True
  34.                            End If
  35.                        Next
  36.                    Next
  37.  
  38.                ElseIf Not MatchFullText Then ' Match part of text in all columns
  39.  
  40.                    Select Case IgnoreCase
  41.                        Case True ' IgnoreCase
  42.                            If ListView1.FindItemWithText(SearchString) IsNot Nothing Then
  43.                                Return True
  44.                            End If
  45.                        Case False ' CaseSensitive
  46.                            For Each Item As ListViewItem In ListView.Items
  47.                                For X As Int32 = 0 To Item.SubItems.Count - 1
  48.                                    If Item.SubItems(X).Text.Contains(SearchString) Then Return True
  49.                                Next
  50.                            Next
  51.                    End Select
  52.  
  53.                End If
  54.  
  55.            Case Else ' ColumnIndex is other else
  56.  
  57.                If MatchFullText Then ' Match full text in ColumnIndex
  58.  
  59.                    For Each Item As ListViewItem In ListView.Items
  60.                        If String.Compare(Item.SubItems(ColumnIndex).Text, SearchString, IgnoreCase) = 0 Then
  61.                            Return True
  62.                        End If
  63.                    Next
  64.  
  65.                ElseIf Not MatchFullText Then ' Match part of text in ColumnIndex
  66.  
  67.                    For Each Item As ListViewItem In ListView.Items
  68.                        Select Case IgnoreCase
  69.                            Case True ' IgnoreCase
  70.                                If Item.SubItems(ColumnIndex).Text.ToLower.Contains(SearchString.ToLower) Then
  71.                                    Return True
  72.                                End If
  73.                            Case False ' CaseSensitive
  74.                                If Item.SubItems(ColumnIndex).Text.Contains(SearchString) Then
  75.                                    Return True
  76.                                End If
  77.                        End Select
  78.                    Next
  79.  
  80.                End If
  81.  
  82.        End Select
  83.  
  84.        Return False ' Any matches
  85.  
  86.    End Function
  87.  
  88. #End Region
Páginas: 1 ... 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 [886] 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines