mIRC Home    About    Download    Register    News    Help

Print Thread
I
IkariKun
IkariKun
I
After some work I got it to send commands to mirc via DDE and the needed Perl modul Win32::DDE

Code:
#!/usr/bin/perl -w

use Win32::DDE::Client;

$mirc = new Win32::DDE::Client ('mIRC', 'COMMAND');

$mirc->Poke('filler', '/echo lala');


as you can see this simple and small script will sind the command "/echo lala" to mirc. mirc will execute it as you had typed it in directly.
I hope that I can help the much people with questions to integrate Perl into mirc.

Greetings Iki ^^

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
out of curiousity, if a server has perl, and the module, and the admin is a irc-goer, couldn't that take over thier mirc? >:D

M
matt
matt
M
On a windows server, yeah, assuming mIRC's DDE server is on. You would also have to know what the service name is if it was changed.

I
IkariKun
IkariKun
I
Quote:
out of curiousity, if a server has perl, and the module, and the admin is a irc-goer, couldn't that take over thier mirc? >:D


No because DDE can only be executet on the client side because it's an windows service for communication between Programs.
Server couldn't send DDE commands to your computer.

Last edited by IkariKun; 16/07/03 10:26 AM.
M
matt
matt
M
Unless this server is somone elses Windows Computer, and that person uses mIRC on it. (I doubt that would be the case, but its possible...)

I
IkariKun
IkariKun
I
Uhm that shouldn't work.
You could read this text for more information
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_ddeexec.asp

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
So wait, now if a website can control you client side, whats stopping the dde from controling any other application the client may have, and have support for? Sounds like a security issue to me..

C
codemastr
codemastr
C
A website can't control you client side. What are you talking about?

And anyway, thats irrelevant, DDE is NOT a network based protocol. Someone on a different machine can NOT control your machine via DDE, it is NOT a security issue.

M
matt
matt
M
Whoops, yeah after doing some testing i noticed DDE will not work when telneting to the computer. Which is probably a good idea anyways. Thanks for pointing that out.

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
Is or isnot perl a web-based language...

M
matt
matt
M
Perl is not a web based language. Its original purpose was for system administration. When the web became popular and people wanted dynamic content, Perl became a popular language for the web.

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
ahh, i c. All i was thinking was .pl on websites.. Now i gotchyaa wink thanks for clearifying

C
codemastr
codemastr
C
Well perl doesn't actually control your machine. You can't write a perl script on a website that, for example, saves a file to your harddrive. Perl executes server side.

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
That's why i was under the impression when i saw perl and dde, and knew it was serverside, kinda assumed that mean you visit a website, the server executes it, then ur controling the mirc on the server. >:D

C
codemastr
codemastr
C
Ah ok, now I get what you meant.


Link Copied to Clipboard