|
hmmm I'm suprised!
I didn't know that mIRC works reliable with DCCs (on SNATed/MASQed gateways) without having an IRC module or forwarding rules on the gateway. Are you sure that you not rely on the other side to handle incoming connections (one of two envolved peers has to be able to handle incoming connections *)? Are you sure you have no Linux or BSD as gateway (the IRC module is per default installed on most Unix distributions)?
Honestly, I have no idea how you could forward incoming TCP/IP traffic without special treatment. I did run into the same problems when learning about P2P network programming. That's why I tried to understand & explain what happens on a gateway, and which solutions exist IMHO. I would be very gratefull about any additional solutions!
Well, there is one thing left I did forget to mention. Contrary to IRC most (all) games do use UDP as transportation instead of TCP and many gateways have a so called "lose UDP patch". I don't know any details about the underlying mechanism... but somehow the gateway routes incoming UDP datagramms into the LAN and to the appropriate game client. Anyone with more experience here?
As far as I know IRC protocol uses TCP only, RFC 1459 etc[^]. ATM there is no general way (or simple sockets call) to work around this 'incoming traffic' issue.
Hope it helps, Moak
* = If the other peer handles incoming connections, then the problem is omitted. It doesnt matter who creates the connection, once it is established it can be used. If your opponent can't too, your DCC will fail. Relying on the other is always bad, sometimes it works, sometimes it fails.... well you know what I mean, if you have some unreliable friends. *g*
|
|
|
|
|
What do you mean by "IRC module"?
And anyway - the listening port is always different, it's not a predefined port number that can be somehow "enabled" on the gateway machine...
|
|
|
|
|
|
Hello everyone,
I have an MFC MDI app that I am trying to override some of the printing and I am have lots of trouble. I want to not show the printer dialog box and also set the printer (I have access to the HDC). I'm sure this is a relatively easy thing to do, but can't figure it out. I tried searching through old posts, but wasn't able to find anything. Thanks!
|
|
|
|
|
|
Ahh, you beat me to it!
Yes, it should do exactly what he needs.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
I have some number of static global objects,
of which there is one that I want to be
constructed first. Within a translation unit,
it is simply the order in which the objects
appear that determines their order of
construction. But across translation units,
it seems arbitrary.
Is there a practical way to get the linker to
accept a desired order of initialization
in this case? (I use Visual Studio 6)
|
|
|
|
|
As far as I remember the C++ specs say that order of initialization of static objects
is arbitrary. Easiest solution is to create ONE static object that acts as a "factory"
for the others (which gives you control of the order).
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
|
I am trying to decode a TCP stream (from a game). The game works like this:
First you log on with your username and password
Then you choose a lobby (so its kind of more like a chat)
In this lobby you can chat and join games
Now all the text that is sent and received for the chat in that lobby is encrypted, so this is what i did: I went into that lobby while i captured all packets being sent over my network, then i said a line in the lobby and stopped packet capturing, now i have the exact packet containing the data, and the length matches, i said a sentence of exactly 53 bytes and that is the amount of data thats in the packet. But... how do i decrypt this? I don't think its any well-known protocol, and i dont know much about the encryption of tcp connections. Is this impossible (even though i dont believe in impossible things) or could it be worth a shot trying if i knew how encryption worked? Can anyone recommend anything i should read about encryption that might be usefull for my problem? Or can someone even tell me how to do it exactly (lol that would be the best of course :P)?
Anyways thanks for any help you may offer, and if i ever get it decoded i'll write an article about it on CP ;P
Kuniva
--------------------------------------------
|
|
|
|
|
Note: This isn't simple and I will not answer any questions about it...
Goto www.openssl.org[^], download and compile.
Write small app (or use of the test-tools in openssl) and try to connect.
If you are real lucky, client-side authentication is turned off and you should
be able to get the clear-text. If not... well you tried
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
http://ih.esuhsd.org/staff/aielloj/ascii_ebcdic_table.htm
Try looking up the hex values on this chart and see if they make sense.
|
|
|
|
|
errr... no offense but i said it was encrypted not some kindergarten a becomes z, b becomes y encryption scheme.. lol
i actually searched in the data where the same letters were in my sentence and the hexadecimal values weren't the same... so its some kind of variable encryption thingy... lol sorry i dont know anything about encryption
Kuniva
--------------------------------------------
|
|
|
|
|
cool, thanks
Kuniva
--------------------------------------------
|
|
|
|
|
Download etherel, a Protocol Analyzer from sourceforge.net (source and binary)
A. Riazi
|
|
|
|
|
Ethereal IS what i'm using to filter the network traffic... It just marks it as TCP
Thanks anyways
Kuniva
--------------------------------------------
|
|
|
|
|
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window. I want my own GUI or at least no DOS window. The code my friend gave me looks ok but I'w wonderiong if someone could post and example of a "Hello World" with a window\/GUI. Thanks
|
|
|
|
|
The code he gave me lookedsomething like this:
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSZ szCmdLine, int iCmdShow)
|
|
|
|
|
Create a dialog-based MFC application and add a button to it.
Right click on it and choose class wizard. Pick IDC_BUTTON1 (or whatever name you gave it) then add a function for WM_COMMAND.
Choose Edit Code and in your function, write
MessageBox("Hello world");
You could also try Visual Basic, really.
|
|
|
|
|
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic.
|
|
|
|
|
Thank goodness, I've needed a new sig for a while.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
There are many ways to doing it, as seen on this[^] link.
I recommend you first decide what path you want to take between these four Microsoft alternatives, then pick up some reference material on it and go from there.
- Win32 API - Lowest level, C-based API, ugly.
- MFC - Class library with great support from DevStudio. Thinly wraps many Win32 APIs. It's been around for years.
- WTL - Template based class library. Not well supported or widely used, but some people like it more than MFC.
- .NET - Shiny, new, easier. Natively supported by other languages such as C# and VB.NET. The wave of the future.
Regards,
Alvaro
Quitters never win. Winners never quit. But those who never win and never quit are idiots. -- despair.com
|
|
|
|
|
.NET - Shiny, new, easier. Natively supported by other languages such as C# and VB.NET. The wave of the future.
This stuff always cuts me up.
First there was C, then C++, then early Windows, then newer Windows, then MFC, then COM, then DCOM, then ATL, and now it's C# and .NET
I somtimes wonder, will I grow old before .NET is obsolete, or will it be obsolete before I can cut my next fart. <- potentially my new SIG
I somtimes wonder, will I grow old before .NET is obsolete, or will it be obsolete before I can cut my next fart.
|
|
|
|
|
Just put this in a .cpp file and compile :P
#include <windows.h>
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil)
{
HWND hwnd;
MSG messages;
WNDCLASSEX wincl;
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure;
wincl.style = CS_DBLCLKS;
wincl.cbSize = sizeof(WNDCLASSEX);
wincl.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor(NULL, IDC_ARROW);
wincl.lpszMenuName = NULL;
wincl.cbClsExtra = 0;
wincl.cbWndExtra = 0;
wincl.hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH);
if(!RegisterClassEx(&wincl)) return 0;
hwnd = CreateWindowEx(
0,
szClassName,
"Windows App",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
544,
375,
HWND_DESKTOP,
NULL,
hThisInstance,
NULL
);
ShowWindow(hwnd, nFunsterStil);
while(GetMessage(&messages, NULL, 0, 0))
{
TranslateMessage(&messages);
DispatchMessage(&messages);
}
return messages.wParam;
}
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hwnd, message, wParam, lParam);
}
return 0;
}
Ack i probably shouldnt promote this entire Copy-Paste behaviour huh?
Kinda VB-ish
Kuniva
--------------------------------------------
|
|
|
|
|
Wow. It worked. Thats pretty good. Where in the code would I put my message though? What would I write for it? (Im used to cout << "MESSAGE" << endl;) sort of thing...
|
|
|
|