Urgent: Need HELP on Mail-attach (my company profile)

c++ / delphi package - dll injection and api hooking
Post Reply
kannan23in
Posts: 8
Joined: Tue Feb 22, 2005 7:38 am
Location: INDIA

Urgent: Need HELP on Mail-attach (my company profile)

Post by kannan23in »

Dear All,

I am new to this madcodehook. I need to write a program that i want to send my companies profile with every outgoing mails from my machine regardless of whatever the mail-clients (outlook, outlookexpress, eudora, etc).

I have experienced in VC++/Spy - hook program. In that I have written a program to handle the keystrokes for a multilingual program.

But in madcodehook for outgoing mails .. which messages i have to look for and how to do? If anyone knows that will be greatful to me.

Thanks in advance.

IMPORTANT: I my self commiting this is purely for the purpose what i have mentioned only, not for anything else (ie.the warning msg by madCodeHook not to use for other illegal purposes).

- Kannan[/b]
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I guess you have to hook into the winsock send APIs. There was another question about modifiying mails sent from any mail clients on the forum here. Just do a search through the older questions.
kannan23in
Posts: 8
Joined: Tue Feb 22, 2005 7:38 am
Location: INDIA

Post by kannan23in »

Thanks Madshi,

I am really happy about your instant reply. Actually i am just seeing those forums. But couldn't get any correct idea. This work i want to do in MSVC 6.0

And i knew abt madcodehook by seeing InstantBuzz - they are using your madcodehook, The samething i want to do but (ie. for my company profile only)

For that any sample sources are available? (MSVC 6.0)?

Pls help me.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

No sample code available for what you're trying to do. But there are several WinSock hooking demo codes available here on the forum in the other threads.
kannan23in
Posts: 8
Joined: Tue Feb 22, 2005 7:38 am
Location: INDIA

Post by kannan23in »

in one of the forum i seen a long discussion abt ' adding some text with any of the outgoing mails from outlook/outlookexpress/eudora etc. ' the same thing i want to do. But in that discussion i seen that is not for VC++. For that what i have to do. Its like while add extra string with outgoing mails (MAPI usage will be there i quess).

Thanks
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Well, madCodeHook ships with some MSVC demos and in that thread you found you'll find a discussion about what you want to do. The discussion might be centered around Delphi. But basically it's not a big difference, just a different syntax. You'll need to put 1 and 1 together yourself. I don't have the time to do all the work for you... :D
kannan23in
Posts: 8
Joined: Tue Feb 22, 2005 7:38 am
Location: INDIA

Post by kannan23in »

Thanks for your reply/advice madshi :D. After trying those things if any i will come-again.
kannan23in
Posts: 8
Joined: Tue Feb 22, 2005 7:38 am
Location: INDIA

Post by kannan23in »

madshi,

i have tried all are working fine. i am handling the 'send' of ws2_32.dll.

while changing the content of 'buf' its working fine. (i found the same prb in other delphi discussion , but inthat also i couldn't get found any solution to change the length of the buf)

But, while changing the length of the 'buf' (or) replacing 'buf' with other variable like following

char k[10];

SendHookNext(s,k,10,flags)


the outlook not sending the mail and its giving error msg that "can't connecting to server"

Is there any way to change the buf & length before SendHookNext.

by using the following in my code

SendIpcMessage("madIPC", (char *)buf, len,NULL,0,INFINITE,FALSE);

can i use that AnswerBuf/AnswerLen for this purpose?

Thanks in advance.

-Kannan
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I'm no WinSock expert, sorry.

If you have problems with this specific mail manipulating thing, then you should post in the other (Delphi) thread. I don't want to have the same discussion in two different threads. Besides, maybe someone there found the solution in the meanwhile.
kannan23in
Posts: 8
Joined: Tue Feb 22, 2005 7:38 am
Location: INDIA

Post by kannan23in »

Thank you verymuch for your instant reply madshi. Ok I will try in that delphi-forum.
Post Reply