Valhalla Legends Forums Archive | Battle.net Bot Development | Direct Connection

AuthorMessageTime
WiLD
Ok this is alittle hard to explain but ill try my best. im trying to add soething to my bot (secret =P) but it needs to connects. Its meant 2 connect sorta like Stealth bot's tic tac toe.

i want it so some1 can host which calls DRhost but it needs to send its ip 2 the others for them 2 connect by calling DRconnect.

So id like some help with the code. iv tried so many times but it wont work.
MAP:
Host Invites > Whispers IP > Calls DRHost > Connecters Recive IP > Calls DRConnect

Thank you in advance
October 18, 2003, 5:46 PM
Grok
Oh, you mean a trojan.

What you described is fine. Have the trojan contact your listening process, which receives the connection address, then launches its own connection to the listening trojan.

Hope this helps. And hope you burn in hell.
October 18, 2003, 7:46 PM
UserLoser
[quote author=Grok link=board=17;threadid=3135;start=0#msg24518 date=1066506394]
Oh, you mean a trojan.

What you described is fine. Have the trojan contact your listening process, which receives the connection address, then launches its own connection to the listening trojan.

Hope this helps. And hope you burn in hell.
[/quote]

Haha ;D
October 18, 2003, 8:06 PM
Adron
Show your nonworking code.
October 18, 2003, 8:31 PM
St0rm.iD
You won't want to hear this, but the best way is to write a UDP-based protocol to solve the problem of NAT traversal.

I wrote a working implementation in Python...I could make it a COM server if you want to use it in VB.
October 19, 2003, 12:21 AM
WiLD
No its not a trojan if ya really want to know its a chat window. Kinda like Bnet Channels but only invited users can join and you can "DRAW" in it.

it all works untill i try to send the host's ip.
im about to redo the chat window just to make sure.

P1 Right click a user & invite > Sends invite to P2 > P2 Accepts > P1 starts hosting & chat window appears > P1 sends IP to P2 > P2 recieves IP > P2 connects to IP.
i hope that helps some understand abit more. it all works up till "P2 connects to IP".
October 19, 2003, 12:33 AM
hismajesty
I wrote a *harmless* trojan back in the day. It wouldn't connect to anybodys computer but mine though. Still, good times. :P
October 19, 2003, 1:06 AM
CrAz3D
I member that, didn't it work on my computer for a little?
October 19, 2003, 4:12 PM
hismajesty
[quote author=CrAz3D link=board=17;threadid=3135;start=0#msg24601 date=1066579963]
I member that, didn't it work on my computer for a little?
[/quote]

I don't think so..but who knows.
October 19, 2003, 8:30 PM
Myndfyr
[quote author=WiLD link=board=17;threadid=3135;start=0#msg24527 date=1066523625]
No its not a trojan if ya really want to know its a chat window. Kinda like Bnet Channels but only invited users can join and you can "DRAW" in it.

it all works untill i try to send the host's ip.
im about to redo the chat window just to make sure.

P1 Right click a user & invite > Sends invite to P2 > P2 Accepts > P1 starts hosting & chat window appears > P1 sends IP to P2 > P2 recieves IP > P2 connects to IP.
i hope that helps some understand abit more. it all works up till "P2 connects to IP".
[/quote]

Part of the problem with connecting over TCP/IP is that a network user's IP address is different when you're sitting behind a firewall. So, if I have a home network on subnet FF.FF.FF.00, and I want to invite someone to chat, here's how the exchange goes:

Me to You: (whispered via bnet) privatebotchat begin
You to Me: (whispered via bnet) privatebotchat ack send ip
Me to You: (whispered via bnet) privatebotchat ip 192.168.0.147

Your computer then tries to connect with sockets to 192.168.0.147. Unfortunately, that's on a different subnet and behind a firewall; I wonder how many computers in the world have an IP address that begins with 192.168.0. I know all three of mine at home do.

Part of the way to succeed with this is to use a tunneling protocol or a datagram protocol like (someone above) suggested with UDP. Unfortunately, UDP is not absolutely reliable; messages can be lost (whereas in TCP/IP, an ACK is sent on successful receipt, or else the packet is re-sent), so you'd need to implement some kind of SEND/ACK/NACK protocol in addition to your messages.

Hth,

--Rob
October 24, 2003, 12:29 AM
iago
192.168.0.* is default for LAN on windows, but I doubt anybody uses those for external ip.
October 24, 2003, 7:02 AM
Tuberload
[quote author=Myndfyre link=board=17;threadid=3135;start=0#msg25283 date=1066955373]
Your computer then tries to connect with sockets to 192.168.0.147. Unfortunately, that's on a different subnet and behind a firewall; I wonder how many computers in the world have an IP address that begins with 192.168.0. I know all three of mine at home do.[/quote]
Iago already answered this, but it is simple to see how many people on the internet could have an IP address that begins with this, 255...

[quote]Part of the way to succeed with this is to use a tunneling protocol or a datagram protocol like (someone above) suggested with UDP. Unfortunately, UDP is not absolutely reliable; messages can be lost (whereas in TCP/IP, an ACK is sent on successful receipt, or else the packet is re-sent), so you'd need to implement some kind of SEND/ACK/NACK protocol in addition to your messages.

Hth,

--Rob
[/quote]
You could implement your own packets that made sure the packet was received using UDP. When the server sends data over a UDP protocol just have it wait for a response with a seed, or something. If it does not receive that response the client did not receive the original packet. I guess that could keep bouncing back and forth though determining whether the confirmation packet was received or not.
October 24, 2003, 8:58 AM
Adron
[quote author=Myndfyre link=board=17;threadid=3135;start=0#msg25283 date=1066955373]
Part of the way to succeed with this is to use a tunneling protocol or a datagram protocol like (someone above) suggested with UDP. [/quote]

I don't think UDP will help you get through firewalls at all. Trying to connect to a private IP will fail with any protocol, unless you're on a VPN with the target or similar.
October 24, 2003, 10:33 AM
CupHead
The easiest way to avoid problems like that is to not be on a private IP yourself. That way, you can simply ask the other party over the established connection (b.net presumably) to connect to a listening port that you've set up on your computer. When both parties need their addresses translated, I'm not sure how to do it programatically.
October 24, 2003, 1:21 PM
Adron
[quote author=CupHead link=board=17;threadid=3135;start=0#msg25354 date=1067001660]
The easiest way to avoid problems like that is to not be on a private IP yourself. That way, you can simply ask the other party over the established connection (b.net presumably) to connect to a listening port that you've set up on your computer. When both parties need their addresses translated, I'm not sure how to do it programatically.
[/quote]

Go via a third party, look up your external IP through someone outside, or use UPnP?
October 24, 2003, 3:51 PM
TriCk
[quote]
Oh, you mean a trojan.

What you described is fine. Have the trojan contact your listening process, which receives the connection address, then launches its own connection to the listening trojan.

Hope this helps. And hope you burn in hell.
[/quote]

Well I doubt anyone will be interested in that bot anymore :P
October 26, 2003, 6:07 AM
St0rm.iD
[quote author=Adron link=board=17;threadid=3135;start=0#msg25365 date=1067010708]
[quote author=CupHead link=board=17;threadid=3135;start=0#msg25354 date=1067001660]
The easiest way to avoid problems like that is to not be on a private IP yourself. That way, you can simply ask the other party over the established connection (b.net presumably) to connect to a listening port that you've set up on your computer. When both parties need their addresses translated, I'm not sure how to do it programatically.
[/quote]

Go via a third party, look up your external IP through someone outside, or use UPnP?
[/quote]

Can you explain UPnP?
October 30, 2003, 3:16 AM
Freeware
UPnP is Universal Plug and Play, that all I know.

But for looking up for your external IP, just connect to useast.battle.net on port 6112 as a Telnet bot, and it will send you the text: Connection from 12.34.56.78 (whatever your IP is). That is your external IP I believe, one of my friends has DSL, and telnet worked fine for him to look it up.
October 31, 2003, 3:07 AM
Adron
[quote author=St0rm.iD link=board=17;threadid=3135;start=15#msg26432 date=1067483800]
[quote author=Adron link=board=17;threadid=3135;start=0#msg25365 date=1067010708]
Go via a third party, look up your external IP through someone outside, or use UPnP?
[/quote]

Can you explain UPnP?
[/quote]

UPnP is supposed to allow your computer and router to communicate information on NAT, opening ports, port forwarding etc. I don't have any personal experience with it, but if anyone knows more exactly what is or is not possible, please post!
October 31, 2003, 4:26 PM
Skywing
[quote author=Adron link=board=17;threadid=3135;start=15#msg26665 date=1067617570]
[quote author=St0rm.iD link=board=17;threadid=3135;start=15#msg26432 date=1067483800]
[quote author=Adron link=board=17;threadid=3135;start=0#msg25365 date=1067010708]
Go via a third party, look up your external IP through someone outside, or use UPnP?
[/quote]

Can you explain UPnP?
[/quote]

UPnP is supposed to allow your computer and router to communicate information on NAT, opening ports, port forwarding etc. I don't have any personal experience with it, but if anyone knows more exactly what is or is not possible, please post!
[/quote]
I think it's what I've been seeing a lot of on the network here (many WinXP machines) - UDP broadcasts with content that looks like HTTP (what a mess... who thought of this stuff?).
November 1, 2003, 6:30 PM
Adron
Yes, I think it's runs over a light-version of http. You never pass any big packets so there's no need for a tcp session, you just send a request and get a reply. And you can broadcast your requests.
November 2, 2003, 2:21 AM

Search