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 Mensajes
Páginas: 1 ... 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 [863] 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 ... 1236
8621  Seguridad Informática / Seguridad / Protección contra ataques (DDOS) en: 7 Julio 2013, 19:54 pm
No se nada acerca de esto, pero me están ayudando a crear una web y...bueno, necesito protección.

La verdad es que no necesito "caching" ni porquerías, yo solo quiero que si un intruso accede muchas veces seguidas con la misma ip en un intervalo muy corto de tiempo, pues hacerle un baneo temporal a esa IP. (Si alguien puede dar información sobre como hacer esto lo agradecería)

Pero claro...si ese intruso usa bots (proxies) pues entonces el baneo temporal va a dar igual y en ese caso lo mejor sería bloquear la página temporálmente como hace Cloudfare, ¿no?.

¿Quizás CloudFare se puede configurar de alguna manera para que si solo se detecta un usuario que intenta hacer DDOS repetídamente, entonces banear a esa ip, pero si en cambio se detectan muchas ips (bots) en un intervalo corto de tiempo, entonces bloquear la web?, si algún servicio ofrece ese razonamiento de lógica...sería genial.

Mi favorito es CloudFare (tampoco conozco otros) http://www.cloudflare.com/
Comentarios: http://www.forbes.com/sites/eliseackerman/2012/02/29/how-cloudflares-free-ddos-protection-service-is-disrupting-the-multibillion-dollar-computer-security-and-content-delivery-markets/2/

8622  Programación / Programación General / Re: crear un script necesito algún editor de texto en: 7 Julio 2013, 10:53 am
En que leguaje escribo aora el código lo puedo hacer rubi por ejemplo cual sería mejor y mas rápido

Sin ánimo de ofender, pero desde que publicaste este post no has dejado de repetir esa pregunta que no tiene ningún sentido, y esto te ocurre porque aún no entiendes el concepto.

El lenguaje que vas a usar en la IDE CodeBlacks es C/C++, Ruby es otro lenguaje muy distinto, C++ es C++, y Ruby es Ruby, y para programar en otro lenguaje hay que usar otras IDEs, además, Ruby es un lenguaje de Scripting.

Por el momento has elegido programar en C++, pero nadie te va a dar hecho un generador de diccionarios, tienes que aprender a hacerlo, dices que te interesa aprender, pues en los links de arriba te puse buena información sobre como hacer permutaciones en C++, que eso es lo que tienes que buscar.

Saludos!

 
8623  Programación / .NET (C#, VB.NET, ASP) / Re: una pregunta muy basica en: 7 Julio 2013, 10:16 am
si desarrollo una aplicación de escritorio basado en .net 3.5 y el usuario tiene un framework superior, la aplicación corre lo mismo?

Eso depende bastante.

Framework 4.X difiere del 3.X, no es lo mismo, el Core es muy distinto.

Pero por suerte el Framework 4.X tiene un soporte de compatibilidad para correr casi todas las aplicaciones basadas en Framework 3.X (y 2.0) sin necesidad de que el FW 3.X esté instalado, Como he dicho tiene soporte para correrlas casi todas, PERO!... no todas, así que si dicha aplicación usa algo que sólamente dependa del FW 3.5 entonces si que necesitarás que el FW 3.5 esté instalado en dicho PC.

Lo mejor que puedes hacer es instalarte una máquina virtual con Windows 8, y comprobarlo por ti mismo, Win8 lleva FW 4.5 instalado por defecto (Y no está instalado el FW 3.5, pero incluye soporte para instalarlo por separado), así que es el mejor SO donde puedes testear tu problema.

Si es una aplicación sencilla no debería haber ningún problema, sólo tienes que hacerte esta pregunta: ¿Porque Windows 8 sólamente lleva instalado FW 4.5?, pues porque generálmente funcionarán las aplicaciones desarolladas en las versiones inferiores de FW, así que no es necesario más.

EDITO: De todas formas Microsoft siempre intenta promover el uso del FW 4.X a los desarrolladores, y yo me imagino que la razón de esto debe ser porque en un futuro no muy lejano en próximas versiones del FW Microsoft dejará de lado la compatibilidad con el FW 2.X y 3.X (Como hace Microsoft con el Windows XP), así que deberías plantearte si reálmente usar FW 3.5 o actualizar tu aplicación al uso del FW 4.0 como mínimo.

Saludos!
8624  Programación / .NET (C#, VB.NET, ASP) / Re: [Duda] ¿Qué cifrado es? en: 7 Julio 2013, 09:33 am
@Shout

Antes de nada, creo que habría sido mejor si posteases esto en Ingenieria inversa.

Al analizar el ensamblado para comprobar que ofuscador han utilizado se ve que han usado el ofuscador "Crypto obfuscator": http://www.ssware.com/cryptoobfuscator/download.htm

Para desofuscarlo es suficiente con usar "de4dot", o el "SimpleAssembly Explorer", que ya lleva integrado un plugin del "de4dot" y es muy intuitivo de usar porque se asemeja al ".NET Reflector": http://code.google.com/p/simple-assembly-explorer/

Hay dos archivos de recursos, uno es una imágen, la imágen de kenshin, el otro no se que es, pero creo que el archivo que intentas "descifrar" es un recurso que se inyecta al proceso del COD, así que no es ningún archivo de texto ni nada interesante, miagino que solo son bytes que se inyectan al proceso, aunque la verdad es que no sé mucho sobre parches e inyecciones así que tampoco me hagas mucho caso, quizás me equivoque.

Hasta aquí es hasta donde he llegado, no soy un experto en el tema.



NOTA: Los nombres están así porque según he leido es imposible recuperar los nombres originales al desofuscar, tanto los nombres de los métodos y funciones de las Classes como los nombres de los archivos de las Classes, así que esto es lo que hay y no se puede mejorar, pero al menos es entendible y legible.

Ahora te mostraré una Class desofuscada:

PD: Aquí verás el string "SW52ZXJzZSBUcm9sbGVyKg==", este es Base64 y al revertirlo la codificación devuelve el string "Inverse Troller*"
En VB:
Código
  1. Imports System
  2. Imports System.Collections.Generic
  3. Imports System.IO
  4. Imports System.Reflection
  5. Imports System.Reflection.Emit
  6. Imports System.Text
  7.  
  8. Namespace A
  9.    Friend NotInheritable Class 
  10.        ' Methods
  11.        Private Shared Function (ByVal base1 As MethodBase) As Type()
  12.            Dim typeArray As Type()
  13.            Dim num3 As Integer
  14.            Dim infoArray As ParameterInfo() = base1.GetParameters
  15.            Dim length As Integer = infoArray.Length
  16.            If base1.IsStatic Then
  17.                goto Label_002E
  18.            End If
  19.        Label_0017:
  20.            Select Case 6
  21.                Case 0
  22.                    goto Label_0017
  23.                Case Else
  24.                    If (1 = 0) Then
  25.                    End If
  26.                    length += 1
  27.                    Exit Select
  28.            End Select
  29.        Label_002E:
  30.            typeArray = New Type(length  - 1) {}
  31.            Dim index As Integer = 0
  32.            If base1.IsStatic Then
  33.                goto Label_0089
  34.            End If
  35.        Label_0041:
  36.            Select Case 5
  37.                Case 0
  38.                    goto Label_0041
  39.                Case Else
  40.                    Dim declaringType As Type = base1.DeclaringType
  41.                    If Not declaringType.IsValueType Then
  42.                        Dim type9 As Type = base1.DeclaringType
  43.                        typeArray(0) = type9
  44.                        goto Label_0085
  45.                    End If
  46.                    Exit Select
  47.            End Select
  48.        Label_005C:
  49.            Select Case 7
  50.                Case 0
  51.                    goto Label_005C
  52.                Case Else
  53.                    Dim type8 As Type = base1.DeclaringType.MakeByRefType
  54.                    typeArray(0) = type8
  55.                    Exit Select
  56.            End Select
  57.        Label_0085:
  58.            index += 1
  59.        Label_0089:
  60.            num3 = 0
  61.            Do While (num3 < infoArray.Length)
  62.                typeArray(index) = infoArray(num3).ParameterType
  63.                num3 += 1
  64.                index += 1
  65.            Loop
  66.        Label_00AD:
  67.            Select Case 2
  68.                Case 0
  69.                    goto Label_00AD
  70.            End Select
  71.            Return typeArray
  72.        End Function
  73.  
  74.        Private Shared Sub (ByRef numRef1 As Integer, ByVal info1 As DynamicILInfo)
  75.            Dim count As Integer = BitConverter.ToInt32(., numRef1)
  76.            numRef1 = (numRef1 + 4)
  77.            If (count <> 0) Then
  78.                Dim dst As Byte() = New Byte(count  - 1) {}
  79.                Buffer.BlockCopy(., numRef1, dst, 0, count)
  80.                Dim startIndex As Integer = 4
  81.                Dim num3 As Integer = ((count - 4) / &H18)
  82.                Dim i As Integer
  83.                For i = 0 To num3 - 1
  84.                    Dim num10 As Integer = BitConverter.ToInt32(dst, startIndex)
  85.                    Dim options As ExceptionHandlingClauseOptions = DirectCast(num10, ExceptionHandlingClauseOptions)
  86.                    startIndex = (startIndex + 20)
  87.                    Select Case options
  88.                        Case ExceptionHandlingClauseOptions.Clause
  89.                            Dim typeToken As Integer = BitConverter.ToInt32(dst, startIndex)
  90.                            Dim type As RuntimeTypeHandle = ..ResolveTypeHandle(typeToken)
  91.                            Dim num5 As Integer = info1.GetTokenFor(type)
  92.                            .(num5, startIndex, dst)
  93.                            Exit Select
  94.                        Case ExceptionHandlingClauseOptions.Fault
  95.                            Throw New NotSupportedException("dynamic method does not support fault clause")
  96.                    End Select
  97.                    startIndex = (startIndex + 4)
  98.                Next i
  99.            Label_00CD:
  100.                Select Case 7
  101.                    Case 0
  102.                        goto Label_00CD
  103.                End Select
  104.                info1.SetExceptions(dst)
  105.                Return
  106.            End If
  107.        Label_0018:
  108.            Select Case 5
  109.                Case 0
  110.                    goto Label_0018
  111.            End Select
  112.            If (1 = 0) Then
  113.            End If
  114.        End Sub
  115.  
  116.        Private Shared Sub (ByVal body1 As MethodBody, ByVal info1 As DynamicILInfo)
  117.            Dim helper As SignatureHelper = SignatureHelper.GetLocalVarSigHelper
  118.            Dim enumerator As IEnumerator(Of LocalVariableInfo) = body1.LocalVariables.GetEnumerator
  119.            Try
  120.                Do While enumerator.MoveNext
  121.                    Dim info As LocalVariableInfo = enumerator.Current
  122.                    Dim localType As Type = info.LocalType
  123.                    Dim isPinned As Boolean = info.IsPinned
  124.                    helper.AddArgument(localType, isPinned)
  125.                Loop
  126.            Label_0043:
  127.                Select Case 5
  128.                    Case 0
  129.                        goto Label_0043
  130.                End Select
  131.                If (1 = 0) Then
  132.                End If
  133.            Finally
  134.                If (enumerator Is Nothing) Then
  135.                    goto Label_006B
  136.                End If
  137.            Label_005B:
  138.                Select Case 6
  139.                    Case 0
  140.                        goto Label_005B
  141.                    Case Else
  142.                        enumerator.Dispose
  143.                        Exit Select
  144.                End Select
  145.            Label_006B:
  146.            End Try
  147.            Dim signature As Byte() = helper.GetSignature
  148.            info1.SetLocalSignature(signature)
  149.        End Sub
  150.  
  151.        Public Shared Sub (ByVal num2 As Integer, ByVal num1 As Integer, ByVal buffer1 As Byte())
  152.            buffer1(num1++) = CByte(num2)
  153.            buffer1(num1++) = CByte((num2 >> 8))
  154.            buffer1(num1++) = CByte((num2 >> &H10))
  155.            buffer1(num1++) = CByte((num2 >> &H18))
  156.        End Sub
  157.  
  158.        Private Shared Sub (ByRef numRef1 As Integer, ByVal base1 As MethodBase, ByVal info1 As DynamicILInfo)
  159.            Dim maxStackSize As Integer = BitConverter.ToInt32(., numRef1)
  160.            numRef1 = (numRef1 + 4)
  161.            Dim count As Integer = BitConverter.ToInt32(., numRef1)
  162.            numRef1 = (numRef1 + 4)
  163.            Dim dst As Byte() = New Byte(count  - 1) {}
  164.            Buffer.BlockCopy(., numRef1, dst, 0, count)
  165.            New (base1, dst, info1).
  166.            info1.SetCode(dst, maxStackSize)
  167.            numRef1 = (numRef1 + count)
  168.        End Sub
  169.  
  170.        Friend Shared Sub (ByVal num1 As Integer, ByVal num3 As Integer, ByVal num4 As Integer)
  171.            Dim type As Type
  172.            Dim base2 As MethodBase
  173.            Try
  174.                Dim handle As RuntimeTypeHandle = ..ResolveTypeHandle(num1)
  175.                type = Type.GetTypeFromHandle(handle)
  176.                Dim handle7 As RuntimeMethodHandle = ..ResolveMethodHandle(num3)
  177.                Dim declaringType As RuntimeTypeHandle = ..ResolveTypeHandle(num4)
  178.                Dim methodFromHandle As MethodBase = MethodBase.GetMethodFromHandle(handle7, declaringType)
  179.                Dim obj2 As Object = methodFromHandle
  180.                base2 = DirectCast(obj2, MethodBase)
  181.            Catch exception3 As Exception
  182.                Throw
  183.            End Try
  184.            Dim fields As FieldInfo() = type.GetFields((BindingFlags.GetField Or (BindingFlags.NonPublic Or BindingFlags.Static)))
  185.            Dim info As FieldInfo
  186.            For Each info In fields
  187.                Try
  188.                    Dim type8 As Type
  189.                    Dim num As Integer
  190.                    Dim expressionStack_D5_0 As String
  191.                    Dim expressionStack_B3_0 As String
  192.                    Dim expressionStack_D6_0 As Object
  193.                    Dim expressionStack_D6_1 As String
  194.                    Dim expressionStack_C6_0 As String
  195.                    Dim method As DynamicMethod = Nothing
  196.                    Dim body As MethodBody = base2.GetMethodBody
  197.                    Dim parameterTypes As Type() = .(base2)
  198.                    Dim type6 As Type = base2.DeclaringType
  199.                    Dim fullName As String = type6.FullName
  200.                    Dim name As String = base2.Name
  201.                    Dim text6 As String = (fullName & "." & name & "_Encrypted$")
  202.                    If TypeOf base2 Is ConstructorInfo Then
  203.                        expressionStack_D5_0 = text6
  204.                        goto Label_00D5
  205.                    Else
  206.                        expressionStack_B3_0 = text6
  207.                    End If
  208.                Label_00B3:
  209.                    Select Case 6
  210.                        Case 0
  211.                            goto Label_00B3
  212.                        Case Else
  213.                            Dim expressionStack_C0_0 As String
  214.                            Dim expressionStack_BD_0 As String = expressionStack_B3_0
  215.                            If (1 <> 0) Then
  216.                                expressionStack_C6_0 = expressionStack_BD_0
  217.                                Exit Select
  218.                            Else
  219.                                expressionStack_C0_0 = expressionStack_BD_0
  220.                            End If
  221.                            expressionStack_C6_0 = expressionStack_C0_0
  222.                            Exit Select
  223.                    End Select
  224.                    Dim returnType As Type = DirectCast(base2, MethodInfo).ReturnType
  225.                    If (returnType OrElse True) Then
  226.                        expressionStack_D6_1 = expressionStack_C6_0
  227.                        expressionStack_D6_0 = returnType
  228.                        goto Label_00D6
  229.                    Else
  230.                        expressionStack_D5_0 = CStr(returnType)
  231.                    End If
  232.                    expressionStack_D5_0 = expressionStack_C6_0
  233.                Label_00D5:
  234.                    expressionStack_D6_1 = expressionStack_D5_0
  235.                    expressionStack_D6_0 = Nothing
  236.                Label_00D6:
  237.                    type8 = base2.DeclaringType
  238.                    method = New DynamicMethod(expressionStack_D6_1, DirectCast(expressionStack_D6_0, Type), parameterTypes, type8, True)
  239.                    Dim flag2 As Boolean = ..TryGetValue(num1, num)
  240.                    Dim info2 As DynamicILInfo = method.GetDynamicILInfo
  241.                    .(body, info2)
  242.                    .(num, base2, info2)
  243.                    .(num, info2)
  244.                    Dim delegate2 As Delegate = method.CreateDelegate(type)
  245.                    info.SetValue(Nothing, delegate2)
  246.                Catch exception4 As Exception
  247.                End Try
  248.            Next
  249.        Label_014A:
  250.            Select Case 6
  251.                Case 0
  252.                    goto Label_014A
  253.            End Select
  254.        End Sub
  255.  
  256.        Shared Sub New()
  257.            Dim type2 As Type
  258.            If (Not . Is Nothing) Then
  259.                goto Label_00D8
  260.            End If
  261.        Label_000A:
  262.            Select Case 5
  263.                Case 0
  264.                    goto Label_000A
  265.                Case Else
  266.                    If (1 = 0) Then
  267.                    End If
  268.                    Dim s As String = "SW52ZXJzZSBUcm9sbGVyKg=="
  269.                    Dim bytes As Byte() = Convert.FromBase64String(s)
  270.                    s = Encoding.UTF8.GetString(bytes, 0, bytes.Length)
  271.                    Dim stream As Stream = Assembly.GetExecutingAssembly.GetManifestResourceStream(s)
  272.                    Dim buffer4 As Byte() = .(&H61, stream)
  273.                    . = buffer4
  274.                    . = New Dictionary(Of Integer, Integer)
  275.                    Dim reader As New BinaryReader(New MemoryStream(., False))
  276.                    Try
  277.                        Dim num As Integer = reader.ReadInt32
  278.                        Dim i As Integer
  279.                        For i = 0 To num - 1
  280.                            Dim num3 As Integer = reader.ReadInt32
  281.                            Dim num4 As Integer = reader.ReadInt32
  282.                            ..Item(num3) = num4
  283.                        Next i
  284.                    Label_00B8:
  285.                        Select Case 5
  286.                            Case 0
  287.                                goto Label_00B8
  288.                        End Select
  289.                    Finally
  290.                        If (reader Is Nothing) Then
  291.                            goto Label_00D7
  292.                        End If
  293.                    Label_00C7:
  294.                        Select Case 4
  295.                            Case 0
  296.                                goto Label_00C7
  297.                            Case Else
  298.                                reader.Dispose
  299.                                Exit Select
  300.                        End Select
  301.                    Label_00D7:
  302.                    End Try
  303.                    Exit Select
  304.            End Select
  305.        Label_00D8:
  306.            type2 = GetType(MulticastDelegate)
  307.            If (type2 Is Nothing) Then
  308.                Return
  309.            End If
  310.        Label_00E6:
  311.            Select Case 5
  312.                Case 0
  313.                    goto Label_00E6
  314.                Case Else
  315.                    Dim modules As Module() = Assembly.GetExecutingAssembly.GetModules
  316.                    Dim moduleHandle As ModuleHandle = modules(0).ModuleHandle
  317.                    . = moduleHandle
  318.                    Exit Select
  319.            End Select
  320.        End Sub
  321.  
  322.  
  323.        ' Fields
  324.        Friend Shared ReadOnly  As Byte()
  325.        Friend Shared ReadOnly  As Dictionary(Of Integer, Integer)
  326.        Private Shared ReadOnly  As ModuleHandle
  327.  
  328.        ' Nested Types
  329.        Public NotInheritable Class 
  330.            ' Methods
  331.            Private Function () As Byte
  332.                Return Me.(Me.++)
  333.            End Function
  334.  
  335.            Private Function () As Integer
  336.                Dim startIndex As Integer = Me.
  337.                Me. = (Me. + 4)
  338.                Return BitConverter.ToInt32(Me., startIndex)
  339.            End Function
  340.  
  341.            Private Function () As Object
  342.                Dim num48 As Integer
  343.                Dim info2 As MemberInfo
  344.                Dim base3 As MethodBase
  345.                Dim num As Integer = Me.
  346.                Dim nop As OpCode = OpCodes.Nop
  347.                Dim metadataToken As Integer = 0
  348.                Dim index As Byte = Me.
  349.                If (index = &HFE) Then
  350.                    index = Me.
  351.                    nop = .(index)
  352.                    goto Label_0060
  353.                End If
  354.            Label_0020:
  355.                Select Case 6
  356.                    Case 0
  357.                        goto Label_0020
  358.                    Case Else
  359.                        If (1 = 0) Then
  360.                        End If
  361.                        nop = .(index)
  362.                        Exit Select
  363.                End Select
  364.            Label_0060:
  365.                Select Case nop.OperandType
  366.                    Case OperandType.InlineBrTarget
  367.                        Me.(4)
  368.                        Return Nothing
  369.                    Case OperandType.InlineField
  370.                        metadataToken = Me.
  371.                        Dim info As FieldInfo = Me..ResolveField(metadataToken, Me., Me.)
  372.                        Dim fieldHandle As RuntimeFieldHandle = info.FieldHandle
  373.                        Dim num39 As Integer = Me..GetTokenFor(fieldHandle)
  374.                        Dim size As Integer = nop.Size
  375.                        Me.(num39, (num + size))
  376.                        Return Nothing
  377.                    Case OperandType.InlineI
  378.                        Me.(4)
  379.                        Return Nothing
  380.                    Case OperandType.InlineI8
  381.                        Me.(8)
  382.                        Return Nothing
  383.                    Case OperandType.InlineMethod
  384.                        metadataToken = Me.
  385.                        Dim base2 As MethodBase = Me..ResolveMethod(metadataToken, Me., Me.)
  386.                        Dim method As RuntimeMethodHandle = base2.MethodHandle
  387.                        Dim type9 As Type = base2.DeclaringType
  388.                        Dim handle10 As RuntimeTypeHandle = type9.TypeHandle
  389.                        Dim num36 As Integer = Me..GetTokenFor(method, handle10)
  390.                        Dim num37 As Integer = nop.Size
  391.                        Me.(num36, (num + num37))
  392.                        Return Nothing
  393.                    Case OperandType.InlineNone
  394.                        Return Nothing
  395.                    Case OperandType.InlineR
  396.                        Me.(8)
  397.                        Return Nothing
  398.                    Case OperandType.InlineSig
  399.                        metadataToken = Me.
  400.                        Dim signature As Byte() = Me..ResolveSignature(metadataToken)
  401.                        Dim num33 As Integer = Me..GetTokenFor(signature)
  402.                        Dim num34 As Integer = nop.Size
  403.                        Me.(num33, (num + num34))
  404.                        Return Nothing
  405.                    Case OperandType.InlineString
  406.                        metadataToken = Me.
  407.                        Dim literal As String = Me..ResolveString(metadataToken)
  408.                        Dim num30 As Integer = Me..GetTokenFor(literal)
  409.                        Dim num31 As Integer = nop.Size
  410.                        Me.(num30, (num + num31))
  411.                        Return Nothing
  412.                    Case OperandType.InlineSwitch
  413.                        Dim num4 As Integer = Me.
  414.                        Me.((num4 * 4))
  415.                        Return Nothing
  416.                    Case OperandType.InlineTok
  417.                        metadataToken = Me.
  418.                        info2 = Me..ResolveMember(metadataToken, Me., Me.)
  419.                        If (info2.MemberType = MemberTypes.TypeInfo) Then
  420.                            Exit Select
  421.                        End If
  422.                    Label_02B0:
  423.                        Select Case 6
  424.                            Case 0
  425.                                goto Label_02B0
  426.                            Case Else
  427.                                If (info2.MemberType <> MemberTypes.NestedType) Then
  428.                                    If (info2.MemberType = MemberTypes.Method) Then
  429.                                        goto Label_0325
  430.                                    End If
  431.                                Label_0305:
  432.                                    Select Case 7
  433.                                        Case 0
  434.                                            goto Label_0305
  435.                                        Case Else
  436.                                            If (info2.MemberType <> MemberTypes.Constructor) Then
  437.                                                If (info2.MemberType <> MemberTypes.Field) Then
  438.                                                    goto Label_038D
  439.                                                End If
  440.                                            Label_0363:
  441.                                                Select Case 4
  442.                                                    Case 0
  443.                                                        goto Label_0363
  444.                                                End Select
  445.                                                Dim info3 As FieldInfo = TryCast(info2,FieldInfo)
  446.                                                Dim field As RuntimeFieldHandle = info3.FieldHandle
  447.                                                metadataToken = Me..GetTokenFor(field)
  448.                                                goto Label_038D
  449.                                            End If
  450.                                            Exit Select
  451.                                    End Select
  452.                                Label_031B:
  453.                                    Select Case 3
  454.                                        Case 0
  455.                                            goto Label_031B
  456.                                    End Select
  457.                                    goto Label_0325
  458.                                End If
  459.                                Exit Select
  460.                        End Select
  461.                    Label_02CA:
  462.                        Select Case 7
  463.                            Case 0
  464.                                goto Label_02CA
  465.                        End Select
  466.                        Exit Select
  467.                    Case OperandType.InlineType
  468.                        metadataToken = Me.
  469.                        Dim type As Type = Me..ResolveType(metadataToken, Me., Me.)
  470.                        Dim handle12 As RuntimeTypeHandle = type.TypeHandle
  471.                        Dim num42 As Integer = Me..GetTokenFor(handle12)
  472.                        Dim num43 As Integer = nop.Size
  473.                        Me.(num42, (num + num43))
  474.                        Return Nothing
  475.                    Case OperandType.InlineVar
  476.                        Me.(2)
  477.                        Return Nothing
  478.                    Case OperandType.ShortInlineBrTarget
  479.                        Me.(1)
  480.                        Return Nothing
  481.                    Case OperandType.ShortInlineI
  482.                        Me.(1)
  483.                        Return Nothing
  484.                    Case OperandType.ShortInlineR
  485.                        Me.(4)
  486.                        Return Nothing
  487.                    Case OperandType.ShortInlineVar
  488.                        Me.(1)
  489.                        Return Nothing
  490.                    Case Else
  491.                        Dim operandType As OperandType = nop.OperandType
  492.                        Dim message As String = ("unexpected OperandType " & operandType)
  493.                        Throw New BadImageFormatException(message)
  494.                End Select
  495.                Dim type2 As Type = TryCast(info2,Type)
  496.                Dim typeHandle As RuntimeTypeHandle = type2.TypeHandle
  497.                metadataToken = Me..GetTokenFor(typeHandle)
  498.                goto Label_038D
  499.            Label_0325:
  500.                base3 = TryCast(info2,MethodBase)
  501.                Dim methodHandle As RuntimeMethodHandle = base3.MethodHandle
  502.                Dim declaringType As Type = base3.DeclaringType
  503.                Dim contextType As RuntimeTypeHandle = declaringType.TypeHandle
  504.                metadataToken = Me..GetTokenFor(methodHandle, contextType)
  505.            Label_038D:
  506.                num48 = nop.Size
  507.                Me.(metadataToken, (num + num48))
  508.                Return Nothing
  509.            End Function
  510.  
  511.            Friend Sub ()
  512.                Do While (Me. < Me..Length)
  513.                    Dim obj2 As Object = Me.
  514.                Loop
  515.            Label_001B:
  516.                Select Case 6
  517.                    Case 0
  518.                        goto Label_001B
  519.                End Select
  520.                If (1 = 0) Then
  521.                End If
  522.            End Sub
  523.  
  524.            Private Sub (ByVal num1 As Integer)
  525.                Me. = (Me. + num1)
  526.            End Sub
  527.  
  528.            Private Sub (ByVal num2 As Integer, ByVal num1 As Integer)
  529.                Me.(num1++) = CByte(num2)
  530.                Me.(num1++) = CByte((num2 >> 8))
  531.                Me.(num1++) = CByte((num2 >> &H10))
  532.                Me.(num1++) = CByte((num2 >> &H18))
  533.            End Sub
  534.  
  535.            Shared Sub New()
  536.                Dim fields As FieldInfo() = GetType(OpCodes).GetFields((BindingFlags.Public Or BindingFlags.Static))
  537.                Dim info As FieldInfo
  538.                For Each info In fields
  539.                    Dim obj2 As Object = info.GetValue(Nothing)
  540.                    Dim code As OpCode = DirectCast(obj2, OpCode)
  541.                    Dim num3 As Short = code.Value
  542.                    Dim index As UInt16 = CUShort(num3)
  543.                    If (index >= &H100) Then
  544.                        goto Label_0089
  545.                    End If
  546.                Label_0063:
  547.                    Select Case 3
  548.                        Case 0
  549.                            goto Label_0063
  550.                        Case Else
  551.                            If (1 = 0) Then
  552.                            End If
  553.                            .(index) = code
  554.                            Continue
  555.                    End Select
  556.                Label_0089:
  557.                    If ((index And &HFF00) <> &HFE00) Then
  558.                        Continue For
  559.                    End If
  560.                Label_0097:
  561.                    Select Case 7
  562.                        Case 0
  563.                            goto Label_0097
  564.                        Case Else
  565.                            .((index And &HFF)) = code
  566.                            Exit Select
  567.                    End Select
  568.                Next
  569.            Label_00C8:
  570.                Select Case 3
  571.                    Case 0
  572.                        goto Label_00C8
  573.                End Select
  574.            End Sub
  575.  
  576.            Public Sub New(ByVal base1 As MethodBase, ByVal buffer1 As Byte(), ByVal info1 As DynamicILInfo)
  577.                ' This item is obfuscated and can not be translated.
  578.                Dim typeArray2 As Type()
  579.                Dim genericArguments As Type()
  580.                Me. = info1
  581.                Me. = buffer1
  582.                Me. = 0
  583.                Dim module As Module = base1.Module
  584.                Me. = [module]
  585.                If TypeOf base1 Is ConstructorInfo Then
  586.                    goto Label_0050
  587.                End If
  588.            Label_0032:
  589.                Select Case 4
  590.                    Case 0
  591.                        goto Label_0032
  592.                    Case Else
  593.                        If (1 <> 0) Then
  594.                            goto Label_0045
  595.                        End If
  596.                        genericArguments = base1.GetGenericArguments
  597.                        If (genericArguments OrElse True) Then
  598.                        End If
  599.                        Exit Select
  600.                End Select
  601.            Label_0050:
  602.                genericArguments. = Nothing
  603.                If (base1.DeclaringType Is Nothing) Then
  604.                    goto Label_007C
  605.                End If
  606.            Label_0060:
  607.                Select Case 7
  608.                    Case 0
  609.                        goto Label_0060
  610.                    Case Else
  611.                        typeArray2 = base1.DeclaringType.GetGenericArguments
  612.                        If (typeArray2 OrElse True) Then
  613.                        End If
  614.                        Exit Select
  615.                End Select
  616.            Label_007C:
  617.                typeArray2. = Nothing
  618.            End Sub
  619.  
  620.  
  621.            ' Fields
  622.            Private  As Byte()
  623.            Private  As Integer
  624.            Private  As DynamicILInfo
  625.            Private  As Module
  626.            Private Shared  As OpCode() = New OpCode(&H100  - 1) {}
  627.            Private  As Type()
  628.            Private Shared  As OpCode() = New OpCode(&H100  - 1) {}
  629.            Private  As Type()
  630.        End Class
  631.    End Class
  632. End Namespace
  633.  
  634.  

Si quieres ver el resto, bueno, ya te he dicho como hacerlo.

Saludos
8625  Programación / Programación General / Re: crear un script necesito algún editor de texto en: 7 Julio 2013, 08:19 am
@ElSevi

Si te llevas mal con el inglés te vas a llevar mal con la programación.

No se nada de C/C++ pero aparte de lo comentado por el compañero OmarHack, debes empezar a buscar información y snippets sobre el tipo de proyecto que quieres llevar a cabo:

-> Write a C program to print all permutations of a given string

-> http://bit.ly/1a2Mxvx


PD: He movido el tema porque esto ha cambiado de rumbo del scripting y se ha hablado de vb, de C y de su p* madre xD.

8626  Programación / Scripting / MOVIDO: crear un script necesito algún editor de texto en: 7 Julio 2013, 08:14 am
El tema ha sido movido a Programación General.

http://foro.elhacker.net/index.php?topic=394046.0
8627  Foros Generales / Foro Libre / Re: ¿Foros para descargar Anime doblado al Castellano? en: 6 Julio 2013, 16:48 pm
la de anime sigue por su camino, eso si, privada

Pues los muy graciosos me han eliminado mi cuenta, segúramente por estar 2 años sin meterme xD

¿Hay invitaciones o algo parecido para poder registrarse? (¿Te currarías una invitación?), ¿el bloqueo de registros sabes si es temporal?.

Por cierto, no soy ojisan, ese es el admin de animehd y de unionfansub.

Ups lo siento, creo que no es la primera vez que me pasa, siempre me confundo al decir tu nombre ...pero solo con el nombre, ya se que sois dos personas muy distintas.

Saludos
8628  Programación / Programación General / Re: [Ehn-Dev 2013] - Hilo de discusión / comentarios / dudas. en: 6 Julio 2013, 12:44 pm
venga vaaaa... voy a ser humilde y no voy a votar mi propia app  >:D >:D >:D
8629  Foros Generales / Foro Libre / Re: ¿Foros para descargar Anime doblado al Castellano? en: 6 Julio 2013, 11:29 am
Por cierto tu que tipo de anime eres de ver? Eres aficionado o solo lo ves cuando te interesa? Y que series has visto? xD

Pues principálmente cualquier cosa que no acabe en "MON", como pokemon, digimon, doreamon, y su p**a madre mon.

Solo veo Anime cuando me entero de que ha salido doblado algún Anime y veo el primer capítulo a ver si me gusta o no... pero no estoy nada enterado de cuando salen nuevos dvd's o series Anime, por eso en los foros de Anime es fácil porque los rippers suben novedades en las primeras páginas del foro...

Este es el Anime que me gusta,
las series y ovas que tengo:

Código:
3x3 Ojos
Animatrix
Berserk
Burst Angel
Catgirl Nuku Nuku
Chobits
Coyote Ragtime Show
D.N.A. 2
Darkstalkers
Death Note
Devil Hunter Yohko
Devil May Cry
Dominion Tank Police
Dragon Ball GT
Dragon Ball Z
Dragon Pink
Dragon Quest
Dragon Rider
El puño de la estrella del norte
Elfen Lied
Ergo Proxy
Excel Saga
Fatal Fury
Fate-Stay night
FLCL
Fullmetal Alchemist
Futurama
Gantz
Golden Boy
Grenadier
GunGrave
Hack Sign
Halo Legends
Hellsing
HighSchool of the dead
Hyper Police
Iczer-3
Iria
Jester
Karas
La ley de Ueki
Las Crónicas de Lodoss
Las Crónicas de Lodoss - Crónicas del Caballero Heroico
Los Caballeros Del Zodiaco
Los caballeros del Zodiaco - Lost canvas
Los Simpson
Louie, el guerrero de las runas
MAR Heaven
Master Of Mosquiton
Moeyo Ken
Neo Ranga
Orphen
Orphen Revenge
Outlaw Star
Ragnarok
Reideen
Rin - Hijas del Mnemosyne
Slayers
Solty Rei
Street Fighter II
Tenjou Tenge
Tokyo Majin
Urotsukidoji
Videogirl Ai
Virus, El cazador
Witchblade
Words Worth
Zetman

Y las películas:
Código:
Akira
Alita, Angel de combate
Appleseed - The beginning
Beowulf
Berserk - La Edad de Oro I
Berserk - La Edad de Oro II
Blood - El Ultimo Vampiro
Dante's Inferno
Dead Leaves
Dead Space - Perdición
Devilman
Dragon Ball - (01) - La leyenda de Shenron
Dragon Ball - (02) - La princesa durmiente del castillo del demonio
Dragon Ball - (03) - La gran aventura mística
Dragon Ball - (04) - El camino hacia el más fuerte
Dragon Ball GT - 100 años despues
Dragon Ball Z - (01) - Garlick Junior inmortal
Dragon Ball Z - (02) - El más fuerte del mundo
Dragon Ball Z - (03) - La Superbatalla
Dragon Ball Z - (04) - El Super Guerrero Son Goku
Dragon Ball Z - (05) - Los Mejores Rivales
Dragon Ball Z - (06) - Guerreros De Fuerza Ilimitada
Dragon Ball Z - (07) - Los Tres Grandes Super Saiyanos
Dragon Ball Z - (08) - Estalla El Duelo
Dragon Ball Z - (09) - Los Guerreros De Plata
Dragon Ball Z - (10) - Fusión
Dragon Ball Z - (11) - El ataque del dragón
Dragon Ball Z - (12) - El Regreso De Broly
Dragon Ball Z - (13) - El Combate Definitivo
Dragon Ball Z - (14) - El último combate
Dragon Ball Z - (15) - Un futuro diferente
El Último profesor
Fatal Fury
Final Fantasy - La Fuerza Interior
Final Fantasy VII - Advent Children
Final Fantasy VII - Last Order
Fullmetal Alchemist - El Conquistador De Shambala
Futurama (01) - El Gran Golpe De Bender
Futurama (02) - La Bestia Con Un Billón De Espaldas
Futurama (03) - El juego de Bender
Futurama (04) - Hacia la verde inmensidad
La Crisis Carnivora
La princesa Mononoke
Landlock
Legend Of Lemnear
Los Caballeros Del Zodiaco (01) - La leyenda de la manzana de oro
Los Caballeros Del Zodiaco (02) - La batalla de los dioses
Los Caballeros Del Zodiaco (03) - Los santos escarlatas
Los Caballeros Del Zodiaco (04) - El guerrero de Armageddon
Maris, La Chica Maravillosa
Memories - (02) - Bomba Fétida
Ninja Scroll
Resident Evil - 01 - Degeneration
Resident Evil - 02 - La maldición
Shadow Skill
Shin Chan - (01) - En busca de las bolas perdidas
Shin Chan - (02) - La invasión
Shin Chan - (03) - Operación rescate
Shin Chan - (04) - En la Isla del Tesoro
Shin Chan - (05) - El pequeño samurái
Shin Chan - (06) - Aventuras en Henderland
Shin Chan - (07) - Perdidos en la jungla
Shin Chan - (08) - Los Adultos Contraatacan
Shin Chan - (09) - La Ambición de Karakaka
Shin Chan - (10) - El chuletón imposible
Shin Chan - (11) - Le llamaban Shin Chan
Shin Chan - (12) - Spa Wars, La guerra de los balnearios
Shin Chan - (13) - Tres minutos para salvar al mundo
Starship Troopers - Invasion
Street Fighter Alpha
Street Fighter Alpha Generations
Street Fighter II
Tekken
Vampire Hunter D
Vampire Hunter D, Bloodlust
Vexille
8630  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 6 Julio 2013, 09:22 am
Una Class que hice para manejar las API's del Caret.



Código
  1. #Region " Caret "
  2.  
  3. ' [ Caret Class ]
  4. '
  5. ' // By Elektro H@cker
  6. '
  7. ' Examples:
  8. ' Dim bmp As New Bitmap("C:\Image.jpg")
  9. ' Caret.Create(TextBox1, 7)
  10. ' Caret.Create(TextBox1, bmp, 20)
  11. ' Caret.BlinkTime(500)
  12. ' Caret.Hide(TextBox1)
  13. ' Caret.Show(TextBox1)
  14. ' Caret.Destroy()
  15.  
  16. Public Class Caret
  17.  
  18. #Region " API's "
  19.  
  20.    Private Declare Function CreateCaret Lib "user32" (ByVal hwnd As IntPtr, ByVal hBitmap As IntPtr, ByVal nWidth As Int64, ByVal nHeight As Int64) As Int64
  21.    Private Declare Function HideCaret Lib "user32" (ByVal hwnd As IntPtr) As Int64
  22.    Private Declare Function ShowCaret Lib "user32" (ByVal hwnd As IntPtr) As Int64
  23.    Private Declare Function SetCaretBlinkTime Lib "user32" (ByVal wMSeconds As Int64) As Int64
  24.    Private Declare Function SetCaretPos Lib "user32" (ByVal x As Int64, ByVal y As Int64) As Int64
  25.    Private Declare Function DestroyCaret Lib "user32" () As Int64
  26.  
  27. #End Region
  28.  
  29. #Region " Funcs & Procs "
  30.  
  31.    ''' <summary>
  32.    ''' Create a new caret.
  33.    ''' </summary>
  34.    ''' <param name="ctrl">The name of the control.</param>
  35.    ''' <param name="Width">The Width of the caret cursor.</param>
  36.    ''' <param name="Height">The name of the caret cursor.</param>
  37.    Public Shared Sub Create(ByVal ctrl As Control, _
  38.                             ByVal Width As Int32, _
  39.                             Optional ByVal Height As Int32 = 0)
  40.  
  41.        If Height = 0 Then
  42.            CreateCaret(ctrl.Handle, IntPtr.Zero, Width, (ctrl.Font.Size * 2))
  43.        Else
  44.            CreateCaret(ctrl.Handle, IntPtr.Zero, Width, Height)
  45.        End If
  46.  
  47.        Show(ctrl)
  48.  
  49.    End Sub
  50.  
  51.    ''' <summary>
  52.    ''' Create a new caret with Bitmap image.
  53.    ''' </summary>
  54.    ''' <param name="ctrl">The name of the control.</param>
  55.    ''' <param name="bmp">The Bitmap image to use.</param>
  56.    ''' <param name="Width">The Width of the caret cursor.</param>
  57.    ''' <param name="Height">The name of the caret cursor.</param>
  58.    Public Shared Sub Create(ByVal ctrl As Control, _
  59.                             ByVal bmp As Bitmap, _
  60.                             ByVal Width As Int32, _
  61.                             Optional ByVal Height As Int32 = 0)
  62.  
  63.  
  64.        If Height = 0 Then
  65.            bmp = Resize_Bitmap(bmp, Width, (ctrl.Font.Size * 2))
  66.            CreateCaret(ctrl.Handle, bmp.GetHbitmap, Width, (ctrl.Font.Size * 2))
  67.        Else
  68.            bmp = Resize_Bitmap(bmp, Width, Height)
  69.            CreateCaret(ctrl.Handle, bmp.GetHbitmap, Width, Height)
  70.        End If
  71.  
  72.        Show(ctrl)
  73.  
  74.    End Sub
  75.  
  76.    ''' <summary>
  77.    ''' Hide the caret.
  78.    ''' </summary>
  79.    ''' <param name="ctrl">The name of the control.</param>
  80.    Public Shared Sub Hide(ByVal ctrl As Control)
  81.        HideCaret(ctrl.Handle)
  82.    End Sub
  83.  
  84.    ''' <summary>
  85.    ''' Show the caret.
  86.    ''' </summary>
  87.    ''' <param name="ctrl">The name of the control.</param>
  88.    Public Shared Sub Show(ByVal ctrl As Control)
  89.        ShowCaret(ctrl.Handle)
  90.    End Sub
  91.  
  92.    ''' <summary>
  93.    ''' Set the blinking time of the caret.
  94.    ''' </summary>
  95.    ''' <param name="ms">Blink interval in Milliseconds.</param>
  96.    Public Shared Sub BlinkTime(ByVal ms As Int64)
  97.        SetCaretBlinkTime(ms)
  98.    End Sub
  99.  
  100.    ''' <summary>
  101.    ''' Set the position of the caret.
  102.    ''' </summary>
  103.    ''' <param name="x">X coordinate.</param>
  104.    ''' <param name="y">Y coordinate.</param>
  105.    Public Shared Sub Position(ByVal X As Int32, ByVal Y As Int32)
  106.        SetCaretPos(X, Y)
  107.    End Sub
  108.  
  109.    ''' <summary>
  110.    ''' Destroy the caret.
  111.    ''' </summary>
  112.    Public Shared Sub Destroy()
  113.        DestroyCaret()
  114.    End Sub
  115.  
  116.    ' Resizes a Bitmap Image
  117.    Private Shared Function Resize_Bitmap(ByVal bmp As Bitmap, ByVal Width As Int32, ByVal Height As Int32) As Bitmap
  118.        Dim Bitmap_Source As New Bitmap(bmp)
  119.        Dim Bitmap_Dest As New Bitmap(CInt(Width), CInt(Height))
  120.        Dim Graphic As Graphics = Graphics.FromImage(Bitmap_Dest)
  121.        Graphic.DrawImage(Bitmap_Source, 0, 0, Bitmap_Dest.Width + 1, Bitmap_Dest.Height + 1)
  122.        Return Bitmap_Dest
  123.    End Function
  124.  
  125. #End Region
  126.  
  127. End Class
  128.  
  129. #End Region
Páginas: 1 ... 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 [863] 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 ... 1236
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines