how do i use socks in OSX on Codewarrior's C++ im looking for an example on how to do it to get my started :-/
i assume you mean the code warrior IDE
http://www.metrowerks.com/MW/Develop/CodeWarrior
I've not done much OSX programming, but i'd assume that it's not that much IDE specific.
Quote from: Mephisto on January 13, 2005, 01:57 PM
What?
Didn't read it the first time? Here:
Quote from: NetNX on January 13, 2005, 09:33 AM
how do i use socks in OSX on Codewarrior's C++ im looking for an example on how to do it to get my started :-/
Wait, now I missed it. I didn't catch it the first or second time. What'd he say?
Quote from: Mephisto on January 14, 2005, 12:06 AM
Just sounded like a really stupid question at first. Never heard of CodeWarrior before so I assumed he was an idiot (oh well); and I never made the connection of OSX to Macintosh.
Well now who is the idiot? Jumped to conclusions on topics you didn't even know about, without searching before commenting.
<3 warz... I don't really care what people think of me aslong as i get my question answered :-/ if they wanna sit there and call me an idiot thats their waste of time...
just trying to learn something new :)
Quote from: NetNX on January 14, 2005, 09:15 AM
<3 warz... I don't really care what people think of me aslong as i get my question answered :-/ if they wanna sit there and call me an idiot thats their waste of time...
just trying to learn something new :)
I never called you an idiot; and regardless of the comment I posted foolishly, I still think your question is aloof because I don't think you can program well enough to go onto socket programming; but prove me wrong by all means.
Private Sub sckAccept_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim i As Integer
Dim b As String
Dim c As String
Dim sData As String
Dim pByte As String
Dim cData As String
Dim a() As String
sckAccept(Index).GetData sData
Do Until sData = ""
If InStr(sData, vbCrLf) = 0 Then
cData = sData
sData = ""
Else
a() = Split(sData, vbCrLf, 2)
sData = a(1)
cData = a(0)
End If
'DebugText "Processing:" & cData
pByte = Left(cData, 1)
cData = Right(cData, Len(cData) - 1)
Select Case pByte
Case Chr(0)
If Len(cData) > 12 Then
DebugText "Man i think nigglets try'n hack u! Lets IP them :-X Winsock.Connect 'useast.battle.net',6112 repeat 12x times yaya :)"
modServer.sUSER(Index) = ""
Else
DebugText "Username Recieved!"
modServer.sUSER(Index) = cData
End If
sckAccept(Index).SendData Chr(2) & vbCrLf
Case Chr(1)
If Len(cData) > 12 Then
DebugText "DAMN THESE NIGGERS IPBAN FOR U!"
sckAccept(Index).SendData Chr(4) & vbCrLf
DoEvents
Call sckAccept_Close(Index)
ElseIf cData = "" Then
sckAccept(Index).SendData Chr(4) & vbCrLf
DoEvents
Call sckAccept_Close(Index)
ElseIf sUSER(Index) = "" Then
sckAccept(Index).SendData Chr(4) & vbCrLf
DoEvents
Call sckAccept_Close(Index)
Else
On Error GoTo fh1
DebugText App.Path & "\accounts\" & sUSER(Index) & ".txt"
Open App.Path & "\accounts\" & sUSER(Index) & ".txt" For Input As #1
Input #1, b
Input #1, c
Close #1
If cData <> b Then
sckAccept(Index).SendData Chr(4) & vbCrLf
DoEvents
Call sckAccept_Close(Index)
Else
If c = "3" Then
sACC(Index) = "3"
End If
DebugText "Password Recieved!"
sckAccept(Index).SendData Chr(3) & vbCrLf
Open App.Path & "\accounts\" & sUSER(Index) & "\Log.txt" For Append As #1
Print #1, "-"
Print #1, "-"
Print #1, "-LoggedOn @ " & Now
Close #1
End If
End If
GoTo fh2
fh1:
DebugText "Erronious File:" & err.Description & err.Number
err.Clear
Resume Next
fh2:
Case Chr(2)
If Len(cData) > 20 Then GoTo FH3
lPC(Index) = lPC(Index) + 1
If sACC(Index) = 3 Then GoTo FH3
If lSta(Index) = LIST_PROXY Then
Open App.Path & "\accounts\" & sUSER(Index) & "\Log.txt" For Append As #1
Print #1, cData
Close #1
Else
Open App.Path & "\accounts\" & sUSER(Index) & "\Log.txt" For Append As #1
Print #1, "-"
Print #1, "-Listing Proxys...."
Print #1, cData
Close #1
lSta(Index) = LIST_PROXY
End If
FH3:
Case Chr(3)
If Len(cData) > 40 Then GoTo FH4
lCK(Index) = lCK(Index) + 1
If sACC(Index) = 3 Then GoTo FH4
If lSta(Index) = LIST_CDKEY Then
Open App.Path & "\accounts\" & sUSER(Index) & "\Log.txt" For Append As #1
Print #1, cData
Close #1
Else
Open App.Path & "\accounts\" & sUSER(Index) & "\Log.txt" For Append As #1
Print #1, "-"
Print #1, "-Listing Cdkeys...."
Print #1, cData
Close #1
lSta(Index) = LIST_CDKEY
End If
FH4:
Case Chr(4)
' On Error GoTo FH5
'taken out
GoTo FH6
FH5:
DoEvents
Call sckAccept_Close(Index)
FH6:
Else
DoEvents
Call sckAccept_Close(Index)
End If
End Select
Loop
End Sub
eh... my code gota love them bd servers... im just trying to figure out the whole C++ thing in general.... and socks is where id like to start...
You know nothing about C++ and you want to learn about sockets first? Needless to say that's a stupid idea. If you're just starting, here's a good place: http://www.gametutorials.com.
ill try it... but if u know where i could find a socks example for codewarrior that would help also ~_^ thanks for not being a complete penis like the rest of this forum's members...
NetNX: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/Articles/networking.html
BUT: that code you posted in VB is terrible (sry). Too many gotos; go read online about how you should really structure your code, and buy a book. You should really learn basic programming concepts and techniques before delving into a larger project.
Mephisto: you're a friggin retard, and to cover it up you decided to use the word "aloof"
I could say the same thing about you.
Quote from: Mephisto on January 17, 2005, 11:55 AM
I could say the same thing about you.
True come back of a retard.
Quote from: Mephisto on January 17, 2005, 11:55 AM
I could say the same thing about you.
i know you are but what am i
$t0rm is a proven programmer, his expertise (if not always his personality) well-respected by many in this community (and a friend of mine besides).
Let's keep the flames clear of the topic, gentlemen.
*shrug*
Quote from: Banana fanna fo fanna on January 17, 2005, 09:05 AM
NetNX: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/Articles/networking.html
BUT: that code you posted in VB is terrible (sry). Too many gotos; go read online about how you should really structure your code, and buy a book. You should really learn basic programming concepts and techniques before delving into a larger project.
Mephisto: you're a friggin retard, and to cover it up you decided to use the word "aloof"
Wasn't trying to show off.. i was mearly trying to prove a point that i can infact conjurgate(sp?) my own programs and write them i know that goto's are inefficant i wrote that code late at night and without thinking too much i could fix it but im not using it anymore. This program is just unrelated to the whole bot programing thing because when you post u know "bots" source code people are all like you stole from so and so blah bla blah just cuz u can copy something done already dosent make you a programer... get what im saying here?
Quote from: NetNX on January 15, 2005, 09:50 AM
Private Sub sckAccept_DataArrival(Index As Integer, ByVal bytesTotal As Long)
........
End Sub
eh... my code gota love them bd servers... im just trying to figure out the whole C++ thing in general.... and socks is where id like to start...
IMHO, your DataArrival event procedure should be no more than about 3 lines of code, plus error handling. Think about what DataArrival event is all about, data arriving. When it arrives, your immediate job is to receive it, and then call something to take action on it. So in the arrival procedure, just do that. Receive it into whatever buffer setup you have, then call/notify another procedure to take action on the new data.
Structuring as suggested will keep your procedures clean, readable, maintanable, and make you a better programmer. But like I say, just a suggestion, and my own opinion and preference.
Yea.. I understand that, But its good advice :)