Follow us on Twitter!
The important thing is not to stop questioning. - Albert Einstein
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 28
Guests Online: 26
Members Online: 2

Registered Members: 82824
Newest Member: devilslegion
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-08-06 19:13
It took a while to swallow my pride and ask this, since i consider myself entirely fluent in vb, but anyway, how long should it take for a winsock to connect? I'm sure the code is right, and i'm testing it on my own computers, but its not connecting. Any ideas?
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 03-08-06 16:09
if the code is entirly correct, and both the client and the server are running. then instantly really

are you using SIN connection or Direct?

heres an example of direct connection

client:
Code

Private Sub cmdconnect_Click()
On Error Resume Next
Winsock1.Connect "127.0.0.1", "6080"
End Sub





server:
Code

Private Sub Form_Load()
    Timer1.Interval = "1000"
    Timer1.Enabled = True
    Winsock1.Close
    Winsock1.LocalPort = "6080"
    Winsock1.Listen
End Sub

Private Sub Timer1_Timer()
If Winsock1.State <> 7 Then
    Winsock1.Close
    Winsock1.Listen
Else
    Exit Sub
End If
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    Winsock1.Close
    Winsock1.Accept requestID
End Sub

Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
    Winsock1.Close
    Winsock1.Listen
End Sub





works for me, you should learn how to split data then u shuld b able to make a wikid program
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 03-08-06 22:25
The only thing i don't have out of that is the timer repeatedly trying to connect. Other then that, its all there. Yet it still doesn't work. =\
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 04-08-06 11:26
hmm can you post your code please, ill figure out whats wrong with it
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 04-08-06 11:27
post your code please, ill figure out whats wrong with it Wink
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 07-08-06 02:46
Here is all the connection stuff

Server:

Code

Form
Winsock1.LocalPort = 80
Winsock1.Listen
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
On Error Resume Next
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID




Client:
Code

Private Sub Label2_Click()
Winsock1.Close
Dim host As String
Dim port As String

host = Text1.Text
port = "80"


If host = "" Or host = "This is where you put the Target IP" Then
MsgBox "Please enter a host IP", vbDefaultButton1, "Enter Host"
End If
Winsock1.Connect host, port
End Sub




I think thats all the connection related stuff. So, ideas?

Edited by on 07-08-06 02:47
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 07-08-06 22:13
hmm that seems right to me


Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 13-08-06 21:33
Yeah, it seemed right to me too. I know both computers have winsock, since I'm testing it on my own comps. Is it possible its something with my firewall?
Author

RE: VB


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 13-08-06 21:46
sorry for double post.

Edited by on 13-08-06 21:47