|
-
Nov 7th, 2001, 09:28 AM
#1
Thread Starter
Addicted Member
invalid string....
im doing a winsock telnet program. But ive noticed when people log on with a certain client, as soon as they log on, it sends (what appears to be) a string of encrypted characters. Is there a way to have my program ignore those characters? thanks for any help!
-Dan
-
Nov 7th, 2001, 10:03 AM
#2
If you telnet to an SSH site, it sends secure shell information back to the client. What is sent is always the same, and depends only on the server node. I'm surprised an ssh site will let regular telnet connections happen.
This is more of a sysadmin problem, unless these servers are out of your domain.
Trap & store those strings in a file. If they are ssh or some other identifier, they will be constant for each server.
After you think you have gotten all versions of these strings, you can embed a compare routine in your code
Code:
Dim badstrings() as String
'read them from a file
Function chkString(str as string) as Boolean
dim ok as Boolean
dim i
ok = true
for i = 0 to Ubound(badstrings)
if str = badstrings(i) then
ok = false
exit for
end if
next
chkString = ok
End Function
so, when you receive, you can:
Code:
if chkStr(thisStr) = False then
'skip displaying the stuff on the screen
else
DoScreenDisplay(thisStr)
end if
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|