I gonna write a little server proggy in VB that will let us try out the basic features of the client.
Once it is working we can do the real server in C, Java or whatever
Printable View
I gonna write a little server proggy in VB that will let us try out the basic features of the client.
Once it is working we can do the real server in C, Java or whatever
Okay. I assume it would be a single Winsock control thing?
Exactly
And what's the protocol?
I dunno.Code:Client: user filburt1
Server: pass
Client: pass magicalsecretpassword
Server: ok
a Simple winsock will be able to take all these person using the IM ? Wow Impressive.
No, this is just a test server.
I tryed that password and I can tell you than it's not you vbforums pass (magicalsecretpassword). :D
DefInt A-Z
Option Base 0
Option Explicit
Private Type ColorType
R As Byte
G As Byte
B As Byte
End Type
Dim bLocalEcho As Boolean, bBlinkCursor As Boolean, iCurX As Integer, iCurY As Integer, iCWid As Integer, iCHei As Integer, lTColor As Long, iPWid As Integer, iPHei As Integer, lBColor As Long, sInQueue As String
Dim dpicOWid As Double, dpicOHei As Double, dfrmOWid As Double, dfrmOHei As Double, bOnline As Boolean, dfrmCWid As Double, dfrmCHei As Double
Dim iFileNo As Integer
Private Sub wsckSecure_DataArrival(ByVal bytesTotal As Long)
Dim strIncoming As String
wsckSecure.GetData strIncoming
sInQueue = sInQueue + strIncoming
CheckPackets
End Sub
Sub CheckPackets()
Dim T As Long, dStartRead As Double, dTmr As Double
Dim iType As Integer, lLength As Long, sData As String
Static bReadPacket As Boolean
DoItAgain:
If bReadPacket = False Then
For T = 1 To Len(sInQueue)
If Mid(sInQueue, T, 1) = Chr(0) Then
bReadPacket = True
dStartRead = Timer
If T > 1 Then
sInQueue = Mid(sInQueue, T)
End If
Exit For
End If
Next
End If
dTmr = Timer
If dTmr < dStartRead Then dTmr = dTmr + 86400
If bReadPacket And dTmr - dStartRead > 4 Then
If Len(sInQueue) > 1 Then
sInQueue = Mid(sInQueue, 2)
End If
End If
If bReadPacket And Len(sInQueue) >= 4 Then
jiType = Asc(Mid(sInQueue, 2, 1))
lLength = Asc(Mid(sInQueue, 3, 1)) + Asc(Mid(sInQueue, 4, 1)) * 256
End If
If bReadPacket And Len(sInQueue) >= 4 + lLength Then
sData = Mid(sInQueue, 5, lLength)
If Len(sInQueue) >= lLength + 4 Then
sInQueue = Mid(sInQueue, 5 + lLength)
End If
bReadPacket = False
InterpretePacket iType, sData
End If
DoEvents
If sInQueue <> "" Then GoTo DoItAgain
End Sub
Sub SendPacket(iType As Integer, sData As String)
Dim Typ As Integer, L1 As Integer, L2 As Integer
If Len(sData) > 10240 Then sData = Left(sData, 10240)
Typ = iType Mod 256
L1 = Len(sData) Mod 256
L2 = Fix(Len(sData) / 256)
wsckSecure.SendData Chr$(0) + Chr$(Typ) + Chr$(L1) + Chr$(L2) + sData
End Sub
(Parts from SecureCP)
Maybe some encryption for passwords and so on...
Just to argue those ones who try to find out the password with a MAN-IN-THE-MIDDLE-Attack
As you can see my programming style has improved a bit...
Good idea. :DQuote:
Originally posted by Andreas@ALSoft
Maybe some encryption for passwords and so on...
Just to argue those ones who try to find out the password with a MAN-IN-THE-MIDDLE-Attack
BTW, please use the [vbcode][/vbcode] tags. :)
I can do encryption stuff. I think I'm qualified for that. :D
|
|
|
\/
Read the RFCs about secured POP3 access and that's fairly effective at securing passwords (not TOTALLY secure because you'd need insane-bit SSL for that).
Also, for the server to have any kind of scalability you need C (you could use C++, but C lets you extract the last clock cycle of performance out of it).
And for anyone that says anything about ASM...well written C can often be just as good as equivalent assembler code :)
Java! :) The server will eventually be written in Java and run under 'nix. We're just making a cheap VB test one.Quote:
Originally posted by parksie
Also, for the server to have any kind of scalability you need C (you could use C++, but C
I can do the encryption :D
VB Code:
For i = 1 To Len(Text1.Text) lettre = Mid(Text1.Text, i, 1) code = Asc(lettre) If code <> 32 Then code = code + 1 End If lettre = Chr(code) Text2.Text = Text2.Text + lettre Next i
This is what I made so far :)
Here's your code simplified:
:p It's not exactly a strong algorithm you've got going there. :DVB Code:
EncryptedText = OriginalText
As I said, I think I can handle it. ;):D
ok EiSecure is one of the best in vbforum realm with encryption so we will give him one more thing to do :rolleyes: tell me what EiSecure will not touch in the project :D
Asst. leader agrees. :)Quote:
Originally posted by eiSecure
As I said, I think I can handle it. ;):D
Holy Ass. Leader :D
Do you want me to continue to make the menu in Flash because I take a break and didnt continue to work on it. I can continue if the new leader and holy ass ldr want to :)
:D
Quote:
Holy Ass. Leader :D
Stop talking about my sexy ass! :mad: :D
damn I wanted to said : Holy Assistant Leader sorry but I have to think than I talk to person who speak english lol Sorry Turtle I did not wanted to talk about your a$$ :rolleyes:
Why Java? I'd only use it if I was allowed to allocate/deallocate objects myself and disable the garbage-collector.Quote:
Originally posted by filburt1
Java! :) The server will eventually be written in Java and run under 'nix. We're just making a cheap VB test one.
If I could do that, then I'd probably use it :)
I like the multithreading in Java compared to the mystic C++. :D
Encryption --- EiSecure --->AGREE
Flash Navbar --->AGREE (Continue working on it)
Sorry, it isn't completed yet
(I spent my time building a connector board for an OSD module)
(Printed circuit board... lots of work...)
I find it easier in C++ (call CreateThread with a function pointer for your thread procedure, and the thread lasts until the function returns - couldn't be simpler ;)) but that's just me.Quote:
Originally posted by filburt1
I like the multithreading in Java compared to the mystic C++. :D
I agree...multithreading in Java is pretty nice...but that doesn't sway the fact that it's slower, and if you're building a server, even TINY inefficiencies can come and kick you in the nuts later on.
Anyway, this is off-topic so I'll stop now...as long as you acknowledge C's superiority in these matters ;)
*continues arguing* :D Only the GUI part of Java is slow, the rest is quite speedy. At work we're writing a server to interface with a satellite ground system in Java.
We're not allowed to use Java at work - it's all to do with controlling and maintaining nuclear reactors so only a real language can be used ;) :p
::Timer out::
Turtle I do not understand that :
How old are you ? I always though than you were a student who skip all his class to come to vbforums.com ? :p :confused:Quote:
At work we're writing a server to interface with a satellite ground system in Java.
I'm 17 and I worked (and sort of still do) for a NASA contractor.
OMFG, who is that man? help me!! GOD! damn are you a genius or what ? You cant work at the Nasa at 17 ? Do not lie to me ! :)
I don't work at NASA, I indirectly work for them. And no, I'm not lying. :)
How can you indirect work for the Nasa ? And I beleive you Arien.
How's the menu coming along, Daok? Got a prototype?
that coming
*cough*Quote:
Originally posted by DaoK
that coming
Okay. Haven't replied in a while...how's everything going with the team? Any new developments?
*twiddles thumbs*