Hola gente, perdon que vuelva a mencionar un tema viejo, pero hay una cosa que quedo inconclusa y no puedo encontrar la soluciion...
en este post hicieron un su propio noip...
http://foro.elhacker.net/analisis_y_diseno_de_malware/emulando_noipduc_conexiones_directas_con_noip-t112960.0.html
y en la versión del VB lo hicieron con un modulo que contiene:
'Opcion=0 --> Consulta la ip pública
'Opcion=1 --> Consulta la lista de dominios de la cuenta no-ip
'Opcion=2 --> Actualiza el dominio a la ip
'-1 se ha producido un error de usuario
'-2 no se ha podido conectar con el host
' 1 se ha realizado la consulta correctamente
Public Function NoIpMD(ByRef wSck As Winsock, ByVal Opcion As Byte, Optional Usuario As String, Optional Password As String, Optional Dominio As String, Optional UpIp As String) As Integer
Dim Consulta As String
Dim rHost As String
Select Case Opcion
Case 0
rHost = "ip1.dynupdate.no-ip.com"
Consulta = "GET"
Case 1
If IsMissing(Usuario) Or IsMissing(Password) Then
NoIpMD = -1
Exit Function
End If
rHost = "dynupdate.no-ip.com"
Consulta = "GET /list-hosts.php?email=" & Usuario & "&pass=" & Password
Case 2
If IsMissing(Usuario) Or IsMissing(Password) Or IsMissing(Dominio) Or IsMissing(UpIp) Then
NoIpMD = -1
Exit Function
End If
rHost = "dynupdate.no-ip.com"
Consulta = "GET /ducupdate.php?username=" & Usuario & "&pass=" & Password & "&h[]=" _
& Dominio & "&ip=" & UpIp
Case Else
NoIpMD = -1
Exit Function
Consulta = Consulta & " HTTP/1.0" & vbCrLf & "Accept: */*" & vbCrLf & "User-Agent: DUC v2.2.1" _
& vbCrLf & "Host: " & rHost & vbCrLf & "Pragma: no-cache" & vbCrLf & vbCrLf
End Select
If wSck.State <> sckClosed Then wSck.Close
wSck.Connect rHost, 8245
While wSck.State <> sckConnected And wSck.State <> sckError
DoEvents
Wend
If wSck.State = sckError Then
NoIpMD = -2
Exit Function
End If
wSck.SendData Consulta
NoIpMD = 1
End Function
Public Function ExtraerSalida(ByVal buffer As String) As String
Dim pos As Long
pos = InStr(buffer, vbCrLf & vbCrLf)
If pos = 0 Then
ExtraerSalida = ""
Else
ExtraerSalida = Mid$(buffer, pos + 2, Len(buffer) - pos + 1)
End If
End Function
y en el form seria esto:
Private Sub Command1_Click()
NoIpMD Winsock1, 0
End Sub
Private Sub Command2_Click()
NoIpMD Winsock1, 1, "ACA EL USUARIO", "ACA LA CONTRASEÑA"
End Sub
Private Sub Command3_Click()
NoIpMD Winsock1, 2, "ACA EL USUARIO", "ACA LA CONTRASEÑA", "ACA EL DNS", "66.66.66.66"
End Sub
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim buffer As String
Winsock1.GetData buffer
Text1.Text = Text1.Text & buffer
End Sub
lleva el componente de Winsock , 3 CommandButton y 1 TextBox...
pero en el text box no me marca nada, por que podria ser?
si me podrian ayudar seria genial... porfa...
Viste la fecha del tema?
Es de hace mas de 9 años :(
Saludos.
sii, la vi... pero hay gente fiel que aun sigue en el foro... aun veo sus post.
Cita de: elmatador2 en 5 Abril 2015, 00:30 AM
sii, la vi... pero hay gente fiel que aun sigue en el foro... aun veo sus post.
la cosa no es esa, es que no puedes agarrarlo sin más... tienes que analizar a ver si usan los mismos servidores, el mismo login y todo
siguen estando, tiene las direcciones web funcionando y te devuelve los datos correctos... si no ni me molestaria en reabrir un post con el mismo tema... ya tenemos algo que sabemos... :D
Cita de: elmatador2 en 5 Abril 2015, 01:17 AM
siguen estando, tiene las direcciones web funcionando y te devuelve los datos correctos... si no ni me molestaria en reabrir un post con el mismo tema... ya tenemos algo que sabemos... :D
ya está abierto el post, es este... ahora cuales son los problemas/errores/dudas? (si pudieras modificar el tema y cambiar las etiquetas por GeSHi para que fuera más legible sería genial...
muevo el tema a VB
En el TextBox no me aparece nada, me deja compilarlo sin problemas, asi que no me falta ningun componente, pero cuando pulso los CommandButtom no hace ninguna accion, incluso ni siquiera parece funcionar ya que el DNS no se me reasigna a mi IP... Habre colocado mal los agregados? que podria ser? hay algo que esta mal y no me doy cuenta...
http://www.canalvisualbasic.net/foro/internet-y-web/login-en-no-ip-atraves-de-vb-7569/
en esta web encontre un code funcionando, no es el mismo pero funciona... dejo el code... igualmente si encuentro la solucion la posteo :) muchas gracias.
debajo en el codigo se encuentra el autor del code, o el que hizo sus modificaiones.
Private Sub Command1_Click()
user = Text1 'tu mail
pass = Text2 'tu pass
host = Text3 'tu hostname
ip = "" 'dejalo vacio para autodetectar
Text4.Text = UpdateNoIP(user, pass, host, ip)
End Sub
'modificado por Tengu ..::Fireb0y::..
Function UpdateNoIP(UserName, Password, Hostname, actIP)
Dim xmlhttp As Object
Dim URL As String
Set xmlhttp = CreateObject("microsoft.xmlhttp")
URL = "http://dynupdate.no-ip.com/dns?username=" & UserName
URL = URL & "&password=" & Password & "&hostname=" & Hostname
If actIP <> "" Then URL = URL & "&ip=" & actIP
'Clipboard.Clear
'Clipboard.SetText URL
xmlhttp.open "get", URL, False
xmlhttp.SetRequestHeader "Pragma", "no-cache"
xmlhttp.SetRequestHeader "Cache-control", "no-cache"
On Error Resume Next
xmlhttp.Send
If Err.Number <> 0 Then
UpdateNoIP = "Error!"
Exit Function
End If
If xmlhttp.Status = 200 Then
UpdateNoIP = CStr(xmlhttp.responseText)
Else
If xmlhttp.Status = 401 Then
UpdateNoIP = "Authorization Error"
Else
UpdateNoIP = "Error"
End If
End If
If InStr(UpdateNoIP, ":") Then
Status = AfterLast(UpdateNoIP, ":")
Status = BeforeLast(Status, Chr(10))
Select Case Status
Case 0: UpdateNoIP = "Success - IP address is current, no update performed"
Case 1: UpdateNoIP = "Success - DNS hostname update successful"
Case 2: UpdateNoIP = "Error - Hostname supplied does not exist"
Case 3: UpdateNoIP = "Error - Invalid username"
Case 4: UpdateNoIP = "Error - Invalid password"
Case 5: UpdateNoIP = "Error - Too many updates sent. Updates are blocked until 1 hour passes since last status of 5 returned."
Case 6: UpdateNoIP = "Error - Account disabled due to violation of No-IP terms of service. Our terms of service can be viewed at http://www.no-ip.com/legal/tos"
Case 7: UpdateNoIP = "Error - Invalid IP. Invalid IP submitted is improperly formated, is a private LAN RFC 1918 address, or an abuse blacklisted address."
Case 8: UpdateNoIP = "Error - Disabled / Locked hostname"
Case 9: UpdateNoIP = "Host updated is configured as a web redirect and no update was performed."
Case 10: UpdateNoIP = "Error - Group supplied does not exist"
Case 11: UpdateNoIP = "Success - DNS group update is successful"
Case 12: UpdateNoIP = "Success - DNS group is current, no update performed."
Case 13: UpdateNoIP = "Error - Update client support not available for supplied hostname or group"
Case 14: UpdateNoIP = "Error - Hostname supplied does not have offline settings configured. Returned if sending offline=YES on a host that does not have any offline actions configured."
Case 99: UpdateNoIP = "Error - Client disabled. Client should exit and not perform any more updates without user intervention."
Case 100: UpdateNoIP = "Error - User input error usually returned if missing required request parameters"
End Select
End If
End Function
'modificado por Tengu ..::Fireb0y::..
Function AfterLast(sFrom, sAfterLast)
If InStr(1, sFrom, sAfterLast) Then
AfterLast = Right(sFrom, Len(sFrom) - InStrRev(sFrom, sAfterLast) - (Len(sAfterLast) - 1))
Else
AfterLast = ""
End If
End Function
Function BeforeLast(sIn, sLast)
t = AfterLast(sIn, sLast)
l = Len(sIn) - Len(t) - Len(sLast)
BeforeLast = Left(sIn, l)
End Function
El code no te funciona ya que la var consulta no acaba de tener el formato correcto. Sácala fuera del Select.
gracias! solucionado.... aunque todavía no saca correctamente la ip... pero asigna el dns... igual ya comence con mi proyecto :) muy amables. cuando tenga lo mio lo posteo.