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

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


  Mostrar Mensajes
Páginas: 1 ... 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 888 889 890 891 ... 1236
8751  Foros Generales / Noticias / Re: Microsoft pagará a los hackers por encontrar vulnerabilidades en su software en: 20 Junio 2013, 22:18 pm
Le voy a buscar bugs hasta al bloc de notas.

XDDD +1

Yo me percaté que el Notepad de Windows 7 tiene un pequeño bug (Bueno, en realidad es una limitación de la aplicación, pero para mi es un bug inentendible en toda regla), pero lo han reparado en Windows 8.
(Lo que pasa es que el ajuste de línea y la barra de estado no pueden estar activas al mismo tiempo en el notepad de Win7, algo que no es nada productivo, la verdad)

+1 a la noticia, Microsoft perderá dinero, y los que solo saben usar productos de Microsoft (IE) agradecerán que estas aplicaciones sean más estables y fiables en el futuro

Saludos!.
8752  Programación / Scripting / Re: Necesito un script para convertir un conjunto de TXT-ANSI a TXT UTF-8! en: 20 Junio 2013, 22:05 pm
gracias por responder electro. Al intentar ejecutarlo desde el cmd me sale esto:
hmmm...

La verdad es que no encuentro información al respecto sobre ese extraño error.

¿Usas un Windows modificado? (Lease Windows SuperLite, etc)

En lugar de usar "wscript.exe" en el código que te dije, prueba con "cscript.exe", ¿Te funciona?.

Me parece que algo falla en tu WScript, prueba a repararlo con estos tres comandos diréctamente en la CMD:

Código:
regsvr32 VBScript
assoc .vbs=VBSFile
Ftype VBSFile="%SystemRoot%\System32\WScript.exe" "%1" %*
8753  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 20 Junio 2013, 21:48 pm
Implementación en C#

Gracias Nov
8754  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 20 Junio 2013, 21:38 pm
y las captchas? :rolleyes:
El captcha te lo pide la web de freenode, no el protocolo IRC.
no es necesario, pruébalo xD...
8755  Informática / Software / Re: Programa para obtener enlaces de descarga de series en: 20 Junio 2013, 21:28 pm
La verdad es que me encanta todo este tipo de software pirata que "roban" y "saquean" las urls que nos interesan de una web sin tener que perder el tiempo navegando entre dichas webs, ahorra mucho tiempo, yo también he hecho algunos programas como este (mucho más simples, sin tantas pestañas) y en fin, me alucinan.

Deberías presentar la app al concurso de EHN, yo la votaría.

Por cierto, ¿Hay source de esto?, el link de descarga pesa 80kb, así que me imagino que lo subiste ya compilado.


EDITO: Pregunta estúpida, no me acordaba que la hiciste freeware pero con opciones privadas para donantes.

EDITO 2: la pestaña de donaciones creo que es muy molesta que esté en medio de las demás, yo la pondría a la derecha del todo xD.

EDITO 3: Aunque no he probado la aplicación (el primer enlace no va y de los otros no puedo descargar ahora mismo), la opción de renombrado automático no la entiendo, si las urls que obtiene el programa son de hostings tipo bitshare,uploaded,etc, que pueden tardar siglos en descargarse varios capítulos, ¿entonces la idea es mantener el programa abierto? hasta que se descarguen todos para rneombrarlos? no entiendo esa parte de verdad, pero bueno, aún no la he podido probar para ver como es exáctamente.

Bueno, tu app promete,
un saludo!
8756  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 20 Junio 2013, 20:26 pm
Un Bot para IRC.

No soy experto en IRC, lo hice basándome en wl webchat de freenode, pero imagino que funcionará en todos los canales de IRC.

...Extender y/o modificar el código como querais, esto solo e sun ejemplo, dejar volar vuestra imaginación:


Un ejemplo de uso:

Código
  1. Public Class Form1
  2.  
  3.    Dim IRC_Thread_Var As Threading.Thread = New Threading.Thread(AddressOf IRC_Thread)
  4.  
  5.    Private Sub Form1_shown(sender As Object, e As EventArgs) Handles MyBase.Shown
  6.        IRC_Thread_Var = New Threading.Thread(AddressOf IRC_Thread)
  7.        IRC_Thread_Var.Start()
  8.    End Sub
  9.  
  10.    Sub IRC_Thread()
  11.        IRC_Bot.Connect("irc.freenode.org", "#ircehn", "ElektroBot")
  12.    End Sub
  13.  
  14. End Class

...La class del Bot:
Código
  1. Public Class IRC_Bot
  2.  
  3.    ' Channel Moderators
  4.    Public Shared Gods As String() = "Elektro Elektro-H Elektro-H_ Drvy kili4n Ikillnukes Caster_ OmarHack OmarHack_ Carloswaldo _0xDani".Split(ChrW(32)).ToArray
  5.  
  6.    ' Commands
  7.    Private Shared Line As String = Nothing
  8.    Private Shared Name As String = Nothing
  9.    Private Shared IP As String = Nothing
  10.    Private Shared Command As String = Nothing
  11.    Private Shared Argument As String = Nothing
  12.  
  13.    ' Bot Status
  14.    Public Shared Activated As Boolean = True
  15.    Private Shared Elapsed_Time As New Stopwatch
  16.    Private Shared Total_Messages As Int64 = 0
  17.  
  18.    ' Connection
  19.    Private Shared Ident_Listener As Net.Sockets.TcpListener = Nothing
  20.    Private Shared Ident_Client As Net.Sockets.TcpClient = Nothing
  21.    Private Shared Ident_NetworkStream As Net.Sockets.NetworkStream = Nothing
  22.    Private Shared Ident_Reader As IO.StreamReader = Nothing
  23.    Private Shared Ident_Writer As IO.StreamWriter = Nothing
  24.    Private Shared Ident_ResponseString As String = Nothing
  25.    Private Shared TCP_client As Net.Sockets.TcpClient = Nothing ' Main connection to the IRC network.
  26.    Private Shared Network_Stream As Net.Sockets.NetworkStream = Nothing ' Break TCP connection down to a network stream.
  27.    Private Shared IRC_Reader As IO.StreamReader = Nothing ' Stream to read messages from the Server.
  28.    Private Shared IRC_Writer As IO.StreamWriter = Nothing ' Stream to write messages to the server.
  29.  
  30.    ' To attach Console (If needed)
  31.    ' Private Declare Function AllocConsole Lib "kernel32.dll" () As Boolean
  32.  
  33.    Public Shared Sub Connect(ByVal Server As String, _
  34.                       ByVal Channel As String, _
  35.                       ByVal NickName As String, _
  36.                       Optional ByVal Port As Int32 = 6667, _
  37.                       Optional ByVal RealName As String = "ElektroBot", _
  38.                       Optional ByVal UserName As String = "ElektroHacker")
  39.  
  40.        ' AllocConsole() '  Attach Console (If needed)
  41.  
  42.        ' Change CMD Window Size
  43.        Console.SetWindowSize(200, 60)
  44.  
  45.        Try
  46.  
  47.            ' Create Connection
  48.            Write("Creating Connection...", ConsoleColor.Yellow)
  49.            TCP_client = New Net.Sockets.TcpClient(Server, Port)
  50.            Network_Stream = TCP_client.GetStream
  51.            IRC_Reader = New IO.StreamReader(Network_Stream)
  52.            IRC_Writer = New IO.StreamWriter(Network_Stream)
  53.            If Not IRC_Writer.AutoFlush Then IRC_Writer.AutoFlush = True
  54.  
  55.            ' Set name
  56.            Write("Setting up name...", ConsoleColor.Yellow)
  57.            IRC_Writer.WriteLine(String.Format("USER {0} {1} * :{2}", UserName, 0, RealName))
  58.  
  59.            ' Set Nickname
  60.            Write("Setting Nickname...", ConsoleColor.Yellow)
  61.            IRC_Writer.WriteLine(String.Format("NICK {0}", NickName))
  62.  
  63.            ' Join Room
  64.            Write("Joining Room...", ConsoleColor.Yellow)
  65.            IRC_Writer.WriteLine(String.Format("JOIN {0}", Channel))
  66.  
  67.            ' Check Ident connection
  68.            Write("Checking Ident connection...", ConsoleColor.Yellow)
  69.            Ident_Listener = New Net.Sockets.TcpListener(Net.IPAddress.Any, 113)
  70.            Ident_Listener.Start()
  71.            Ident_Client = Ident_Listener.AcceptTcpClient
  72.            Ident_Listener.Stop()
  73.            Ident_NetworkStream = Ident_Client.GetStream
  74.            Ident_Reader = New IO.StreamReader(Ident_NetworkStream)
  75.            Ident_ResponseString = Ident_Reader.ReadLine
  76.            Write("Ident got: " & Ident_ResponseString, ConsoleColor.Cyan)
  77.            Ident_Writer = New IO.StreamWriter(Ident_NetworkStream)
  78.            If Not Ident_Writer.AutoFlush Then Ident_Writer.AutoFlush = True
  79.            Ident_Writer.WriteLine(String.Format("{0} : USERID : WINDOWS 7 : {1}", Ident_ResponseString, UserName))
  80.  
  81.            ' Read messages
  82.            Write("Reading messages...", ConsoleColor.Yellow)
  83.            Elapsed_Time.Start()
  84.  
  85.            While True
  86.  
  87.                ' Sum the total received messages
  88.                Total_Messages += 1
  89.  
  90.                ' Get the IRC line to read
  91.                Line = IRC_Reader.ReadLine
  92.  
  93.                ' Print the IRC line
  94.                Write(Line, ConsoleColor.Gray)
  95.  
  96.                ' Get User Name
  97.                Try : Name = Line.Split("!").First.Substring(1, Line.Split("!").First.Length - 1)
  98.                Catch : Name = Nothing
  99.                End Try
  100.  
  101.                ' Get User IP
  102.                Try : IP = Line.Split(" ").First.Split("/").Last.Replace("ip.", "")
  103.                Catch : IP = Nothing
  104.                End Try
  105.  
  106.                ' Get User Command
  107.                Try : Command = Line.Split(" ")(3).Substring(1, Line.Split(" ")(3).Length - 1).ToLower
  108.                Catch : Command = Nothing
  109.                End Try
  110.  
  111.                ' Get the command argument
  112.                Try : Argument = Line.Split(" ")(4)
  113.                Catch : Argument = Nothing
  114.                End Try
  115.  
  116.                    ' IRC Ping-Pong
  117.                    if line.tolower.startswith("ping") then
  118.                        Write("Answering Ping with Pong...", ConsoleColor.Yellow)
  119.                        Write("PONG " & Line, ConsoleColor.Cyan)
  120.                        IRC_Writer.WriteLine("PONG " & Line)
  121.                    end if
  122.  
  123.                ' Parse commands
  124.                Select Case Command
  125.  
  126.                        ' Help
  127.                    Case "!?", "!ayuda"
  128.  
  129.                        If Line.ToLower.Contains(Channel.ToLower) Then
  130.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}      ", Name, "[+] Comandos públicos:"))
  131.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!? | !ayuda      ", "Muestra esta ayuda."))
  132.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!reglas          ", "Muestra las reglas de la sala."))
  133.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!reglasehn       ", "Muestra las reglas de ElHacker.Net."))
  134.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!status          ", "Muestra el estado del Bot."))
  135.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!Whois (IP)      ", "Muestra información geográfica de una IP."))
  136.  
  137.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}      ", Name, "[+] Comandos privados:"))
  138.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!op              ", "Te otorga el estado de OP."))
  139.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!op(+|-) (NOMBRE)", "Otorga o elimina el estado de OP a un usuario."))
  140.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!bot (ON|OFF)    ", "Activa o Desactiva el Bot."))
  141.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} | {2}", Name, "!q | !quit       ", "Desconecta al Bot."))
  142.                        End If
  143.  
  144.                        ' Room Rules
  145.                    Case "!reglas"
  146.  
  147.                        If Line.ToLower.Contains(Channel.ToLower) Then
  148.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}", Name, "[+] Reglas de " & Channel))
  149.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}", Name, "1. Respetar a los usuarios y no ofender de ninguna manera."))
  150.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}", Name, "2. No preguntar como puedes hackear a personas ajenas."))
  151.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}", Name, "3. No compartir material pornográfico o difundir la pederástia o cosas parecidas."))
  152.                        End If
  153.  
  154.                        ' EHN Rules
  155.                    Case "!reglasehn"
  156.  
  157.                        If Line.ToLower.Contains(Channel.ToLower) Then
  158.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}", Name, "[+] Reglas de ElHacker.Net: http://foro.elhacker.net/reglas"))
  159.                        End If
  160.  
  161.                        ' Geo-Locate IP
  162.                    Case "!whois"
  163.  
  164.                        'If Line.ToLower.Contains(Channel.ToLower) Then _
  165.                        'AndAlso Activated Then
  166.  
  167.                        'Dim GeoInfo As GeoLocation.GeoInfo = GeoLocation.Locate(Argument)
  168.                        'IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "[+] Información geográfica de ", Argument))
  169.                        'IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "País..:", GeoInfo.Country))
  170.                        'IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Ciudad:", GeoInfo.City))
  171.                        'IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Código:", GeoInfo.Code))
  172.                        'IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Host..:", GeoInfo.Host))
  173.                        'IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Ip....:", GeoInfo.Ip))
  174.                        'GeoInfo = Nothing
  175.  
  176.                        ' End If
  177.  
  178.                        ' Give own OP+
  179.                    Case "!op"
  180.  
  181.                        If Gods.Contains(Name) _
  182.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  183.                        AndAlso Activated Then
  184.  
  185.                            IRC_Writer.WriteLine(String.Format("MODE {0} +o {1}", Channel, Name))
  186.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2}", Channel, Name, "se ha convertido en OP."))
  187.  
  188.                        ElseIf Not Gods.Contains(Name) _
  189.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  190.                        AndAlso Activated Then
  191.  
  192.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2}", Channel, Name, "no tienes privilegios para ser OP."))
  193.  
  194.                        End If
  195.  
  196.                        ' Give Op+ to a user
  197.                    Case "!op+"
  198.  
  199.                        If Gods.Contains(Name) _
  200.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  201.                        AndAlso Activated Then
  202.  
  203.                            IRC_Writer.WriteLine("MODE {0} +o {1}", Channel, Argument)
  204.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2} {3}", Channel, Name, "concedió OP a", Argument))
  205.  
  206.                        ElseIf Not Gods.Contains(Name) _
  207.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  208.                        AndAlso Activated Then
  209.  
  210.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2}", Channel, Name, "no tienes privilegios para conceder OP."))
  211.  
  212.                        End If
  213.  
  214.                        ' Give Op- to a user
  215.                    Case "!op-"
  216.  
  217.                        If Gods.Contains(Name) _
  218.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  219.                        AndAlso Activated Then
  220.  
  221.                            IRC_Writer.WriteLine("MODE {0} -o {1}", Channel, Argument)
  222.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2} {3}", Channel, Name, "denegó OP a", Argument))
  223.  
  224.                        ElseIf Not Gods.Contains(Name) _
  225.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  226.                        AndAlso Activated Then
  227.  
  228.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2}", Channel, Name, "no tienes privilegios para denegar OP."))
  229.  
  230.                        End If
  231.  
  232.                        ' Bot ON/OFF
  233.                    Case "!bot"
  234.  
  235.                        If Gods.Contains(Name) _
  236.                        AndAlso Line.ToLower.Contains(Channel.ToLower) Then
  237.  
  238.                            Select Case Argument.ToLower
  239.                                Case "on"
  240.                                    Activated = True
  241.                                    Write("Bot status changed to: Enabled", ConsoleColor.Cyan)
  242.                                Case "off"
  243.                                    Activated = False
  244.                                    Write("Bot status changed to: Disabled", ConsoleColor.Cyan)
  245.                            End Select
  246.  
  247.                        ElseIf Not Gods.Contains(Name) _
  248.                        AndAlso Line.ToLower.Contains(Channel.ToLower) Then
  249.  
  250.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} :{1} {2}", Channel, Name, "no tienes privilegios de OP."))
  251.  
  252.                        End If
  253.  
  254.                        ' Bot Status
  255.                    Case "!status"
  256.  
  257.                        If Line.ToLower.Contains(Channel.ToLower) Then
  258.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1}    ", Name, "[+] Status del Bot"))
  259.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Soy propiedad de......:", "Elektro-H"))
  260.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Versión de mi sistema.:", "0.2"))
  261.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Tiempo total online...:", Elapsed_Time.Elapsed.Hours & " H, " & Elapsed_Time.Elapsed.Minutes & " M, " & Elapsed_Time.Elapsed.Seconds & " S"))
  262.                            IRC_Writer.WriteLine(String.Format("PRIVMSG {0} : {1} {2}", Name, "Mensajes procesados...:", Total_Messages))
  263.                        End If
  264.  
  265.                        ' Quit
  266.                    Case "!q", "!quit"
  267.  
  268.                        If Gods.Contains(Name) _
  269.                        AndAlso Line.ToLower.Contains(Channel.ToLower) _
  270.                        AndAlso Activated Then
  271.  
  272.                            IRC_Writer.WriteLine("QUIT")
  273.                            Write("Exiting...", ConsoleColor.Yellow)
  274.                            Exit Sub
  275.  
  276.                        End If
  277.  
  278.                End Select
  279.  
  280.            End While
  281.  
  282.        Catch ex As Exception
  283.            Write("Error: " & ex.Message, ConsoleColor.Red)
  284.            IRC_Writer.WriteLine("QUIT")
  285.  
  286.        Finally
  287.            IRC_Reader.Dispose()
  288.            IRC_Writer.Dispose()
  289.            Network_Stream.Dispose()
  290.  
  291.        End Try
  292.  
  293.    End Sub
  294.  
  295.    Private Shared Sub Write(ByVal Text As String, _
  296.                                 Optional ByVal ForeColor As System.ConsoleColor = ConsoleColor.White, _
  297.                                 Optional ByVal BackColor As System.ConsoleColor = ConsoleColor.Black)
  298.  
  299.        Dim Current_ForegroundColor As ConsoleColor = Console.ForegroundColor
  300.        Dim Current_BackgroundColor As ConsoleColor = Console.BackgroundColor
  301.  
  302.        Console.ForegroundColor = ForeColor
  303.        Console.BackgroundColor = BackColor
  304.        Console.WriteLine(Text & vbNewLine)
  305.  
  306.        Console.ForegroundColor = Current_ForegroundColor
  307.        Console.BackgroundColor = Current_BackgroundColor
  308.  
  309.    End Sub
  310.  
  311. End Class
8757  Informática / Software / Re: Programa para obtener enlaces de descarga de series en: 20 Junio 2013, 19:30 pm
De dónde bajas tu las series? en que formato indica la calidad?

De muchos sitios, te digo mis 4 favoritos por orden de preferencia:

Foros:

- hdvagos.com
Aquí el 99% de videos están en formato mkv, 720/1080p.
Sin duda es mi sitio favorito para descargar videos, tanto películas como series, muy buenos uploaders, siempre están al día de las novedades, es un muy buen servicio.

- descargaya.es
La mayoría de uploaders de hdvagos.com también suelen compartir aquí, es gigantesca la gama de calidad y de nuevos aportes que hay, cuando no encuentro un mkv a 1080p en hdvagos, siempre lo encontraré aquí.

Webs tipo seriesyonkis:

- tumejortv.com
Esta web en lo que respecta a la navegación es bastante desorganizada y es un desmadre, pero dejando a un lado ese aspecto catastrófico, ofrecen un servicio "al día" y calidad.
Primero suelen subir los videos en formato avi (suelen ser rips de TV a calidad común, lo que se encuentra en seriesyonkis vaya), y luego con el paso de los días renuevan los enlaces por MKV's a 720p, pero hay pocos a 1080p.
Cuando quiero encontrar algún nuevo capítulo de manera rápida siempre recurro a esta web, porque como ya digo, están al día, pero en general la calidad que aportan no se puede comparar a la de los foros que he mencionado.
De la misma forma que podría recurrir a seriesyonkis o webs parecidas que ofrecen videos AVI en calidad pobre para salir del paso, como por ejemplo lo que he estado haciendo con la serie "Juego de Tronos", primero me descargaba el capítulo en AVI de esta web (porque me puede el ansia), y luego me lo descargaba en MKV de hdvagos, la diferencia de calidad es descomunal, y solo en 1 GB más.
PD: Me parece que hacer httprequests o en resumen buscar dentro de esta web sería un desmadre por su organización, pero no se.

- x-caleta.com
Me gusta mucho esta web, postean de forma sencilla las urls, ofrecen nuevos rips mkv a 720p/1080p tanto de series como películas, y como la página es latinoamericana siempre me encuentro alguna película a super-calidad que no está en las otras webs que he recomendado.
PD: La web ha estado offline durante unas semanas, solo le quedan 3 horas para volver a estar online, no se si seguirá siendo tán buena y sencilla de "rastrear" como lo era hasta hace unas semanas.

Saludos.
8758  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 20 Junio 2013, 16:20 pm
GeoLocalizar una IP:

Código
  1. #Region " GeoLocation "
  2.  
  3. ' [ GeoLocation ]
  4. '
  5. ' // By Elektro H@cker
  6. '
  7. ' Examples :
  8. '
  9. ' Dim GeoInfo As GeoLocation.GeoInfo = GeoLocation.Locate("84.126.113.11")
  10. ' Dim GeoInfo As GeoLocation.GeoInfo = GeoLocation.Locate("84.126.113.11.dyn.user.ono.com")
  11. ' MsgBox(GeoInfo.Country) ' result: Spain
  12. ' MsgBox(GeoInfo.City)    ' Result: Valencia
  13.  
  14. Public Class GeoLocation
  15.  
  16.    Public Class GeoInfo
  17.        Public Property Latitude() As String
  18.        Public Property Lognitude() As String
  19.        Public Property City() As String
  20.        Public Property State() As String
  21.        Public Property Country() As String
  22.        Public Property Host() As String
  23.        Public Property Ip() As String
  24.        Public Property Code() As String
  25.    End Class
  26.  
  27.    Public Shared Function Locate(ByVal IP As String) As GeoInfo
  28.  
  29.        Try
  30.  
  31.            Dim request = TryCast(Net.WebRequest.Create(New Uri("http://www.geoiptool.com/data.php/en/?IP=" & IP)), Net.HttpWebRequest)
  32.  
  33.            If request IsNot Nothing Then
  34.  
  35.                request.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727)"
  36.  
  37.                Dim _geoloc As New GeoInfo
  38.  
  39.                Using webResponse = TryCast(request.GetResponse(), Net.HttpWebResponse)
  40.                    If webResponse IsNot Nothing Then
  41.  
  42.                        Using reader = New IO.StreamReader(webResponse.GetResponseStream())
  43.  
  44.                            Dim doc = New Xml.XmlDocument()
  45.  
  46.                            doc.Load(reader)
  47.  
  48.                            Dim nodes = doc.GetElementsByTagName("marker")
  49.  
  50.                            Dim marker = TryCast(nodes(0), Xml.XmlElement)
  51.  
  52.                            _geoloc.City = marker.GetAttribute("city")
  53.                            _geoloc.Country = marker.GetAttribute("country")
  54.                            _geoloc.Code = marker.GetAttribute("code")
  55.                            _geoloc.Host = marker.GetAttribute("host")
  56.                            _geoloc.Ip = marker.GetAttribute("ip")
  57.                            _geoloc.Latitude = marker.GetAttribute("lat")
  58.                            _geoloc.Lognitude = marker.GetAttribute("lng")
  59.  
  60.                            Return _geoloc
  61.  
  62.                        End Using
  63.  
  64.                    End If
  65.                End Using
  66.            End If
  67.  
  68.            Return New GeoInfo()
  69.  
  70.        Catch ex As Exception
  71.            Throw New Exception(ex.Message)
  72.        End Try
  73.  
  74.    End Function
  75.  
  76. End Class
  77.  
  78. #End Region
8759  Programación / Scripting / Re: Necesito un script para convertir un conjunto de TXT-ANSI a TXT UTF-8! en: 20 Junio 2013, 16:17 pm
Después del proceso, según notepad++, continúan siendo ANSI.
¿Y que te dice el Notepad de toda la vida?

Verifiqué que el código era correcto, convierte archivos ANSI a UTF-8.

No existe compilador para VBS, lo estás ejecutando corréctamente.

Prueba a llamarlo diréctamente desde la CMD:
Código:
wscript.exe "Script.vbs" "archivo ansi.txt" "nuevo archivo UTF-8.txt"

...Y comprueba la codificación del nuevo archivo.

Saludos!
8760  Programación / Programación General / Re: ¿Como crear aplicación que ejecute comandos en consola Windows 7? en: 20 Junio 2013, 06:27 am
Bien pero...................................¿En que lenguaje?.

Sea cual sea lo primero que debes hacer es olvidarte de usar qualquier comando de Batch (el netsh pase, porque es una aplicación externa), vas a empezar a programar en "X" lenguaje, no a Batchear, eso dejémoslo para los que no saben programar todavía.

Citar
blablabladefault DATOAELEGIR1=ELEGIR DATOAELEGIR2=ELEGIR2 (Por lo tanto me gustaría poner dos casillas que permitan modificar lo que va en esa linea después de cada "=" (Hay dos =)
Esto no lo entiendo para nada, entiendo lo que dices pero me parece que sigues con la perspectiva Batch.

Bueno, te daré mi opinión sin más:

Lenguaje: Imagino que si tienes un script de Batch y preguntas por una "aplicación" es porque no quieres usar un lenguaje de Scripting y quieres hacer una aplicación gráfica, pues entonces VB.NET, es un lenguaje de sintaxis fácil de usar y de aprender, y con entorno gráfico.

Vamos con los "comandos":

comando 1: crear dos CheckBoxes o dos Textboxes para espeficiar/elegir los datos que quieras.

comando 2: Process.start(".\Aplicación.exe", "Argumentos")

Comando 3: Ni idea de lo que quieres decir con "STOP"

La verdad es que me parece que no has sabido explicar/detallar nada bien lo que quieres hacer, algunas partes son inentendibles y faltan muchos otros detalles, como el lenguaje y el tipo de aplicación (CLI o GUI), y lo que quieres hacer con netsh (ya que siempre se podrá hacer sin usar ""comandos"").

Saludos!
Páginas: 1 ... 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 888 889 890 891 ... 1236
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines