mIRC Homepage
Posted By: Horstefan $pid and $process identifiers - 26/10/08 05:23 PM
$pid() and $process() identifiers to check whether a program is running or not,
mostly to be used by bots, saying a service is up or down.

example:
$pid(400) returns $true or $false wether a process with id 400 exists
$process(notepad.exe) returns $true or $false wether a process with name notepad.exe exists.

Posted By: symphony Re: $pid and $process identifiers - 26/10/08 05:59 PM
How is this related to *Services* being up or down?
PS: It can be scripted in $COM
Posted By: sparta Re: $pid and $process identifiers - 26/10/08 06:11 PM
Originally Posted By: symphony
PS: It can be scripted in $COM

Yes it can be scripted, but that goes for the most of the features requested in here.
Posted By: genius_at_work Re: $pid and $process identifiers - 26/10/08 06:34 PM
This sounds like a potentially useful feature. Although, I would have it work more like this:


$pid(<number>)
$pid(400)
- Returns $null if PID 400 does not exist
- Returns the name of PID 400 if it exists, ie notepad.exe

$pid(<program>,n)
$pid(notepad.exe,1)
- Returns $null if a program called notepad.exe isn't running
- Returns the PID of the nth program called notepad.exe, or if n=0 returns total number of programs called notepad.exe

$pid(<number/name>[,n]).<param>
$pid(400).handles
- Returns $null if the PID/program doesn't exist
- Returns the specified param data
* <param> could potentially be any column that is displayed in the windows task manager (view > select columns). ie handles, threads, username, memory, description, etc.

-genius_at_work
Posted By: argv0 Re: $pid and $process identifiers - 26/10/08 08:29 PM
I guarantee that right after an mIRC release with $pid in it, someone will suggest to manipulate those process ids; the ability to kill a process, change its priority, etc.
Posted By: genius_at_work Re: $pid and $process identifiers - 26/10/08 08:41 PM
So you are suggesting a /pid command then?

-genius_at_work
Posted By: Doqnach Re: $pid and $process identifiers - 27/10/08 09:47 AM
with such a command it would become even easier to trojans to do their work abusing mIRC for it's own good. giving them the ability to kill virusscanner processes etc for instance.

I would highly suggest against such a feature ( the /pid one ).

I'm also not really sure what the $pid identifier would add personally but maybe someone can explain some usecases which show more then one person actually having use for it.
Posted By: Jigsy Re: $pid and $process identifiers - 27/10/08 10:49 AM
Agreed.

As for the $pid identifier, myggan wrote one on mircscripts.org.
Posted By: vexed2 Re: $pid and $process identifiers - 27/10/08 04:48 PM
No more dangerous than the $encode/$decode identifiers. You could just put a lock on them the same as Run/dll/decode/com
Posted By: Collective Re: $pid and $process identifiers - 27/10/08 07:20 PM
I'm not sure why you think it would be a security risk, the capability to end processes via script already exists via /run, /dll and $com.

Also, if your virus scanner is letting anyone kill it then your virus scanner sucks.
Posted By: Horstefan Re: $pid and $process identifiers - 14/12/08 10:46 AM
Originally Posted By: Doqnach
with such a command it would become even easier to trojans to do their work abusing mIRC for it's own good. giving them the ability to kill virusscanner processes etc for instance.

I would highly suggest against such a feature ( the /pid one ).

I'm also not really sure what the $pid identifier would add personally but maybe someone can explain some usecases which show more then one person actually having use for it.



I would not like to see a /pid command for above reasons,
if the $pid() feature could be realised it would be awesome!
Posted By: argv0 Re: $pid and $process identifiers - 14/12/08 09:44 PM
The question is, how many people actually need process control when scripting? It doesn't seem to me like a common scripting task. Common tasks make sense to add to mIRC.. less common ones are perfectly okay when left as one-line snippets people can import when needed.

I'm not a big fan of clogging up the global space. Adding an extra identifier would break any script already using some custom $pid identifier since identifiers can't be overloaded like /commands can. I don't get what the advantage of putting this in mIRC is? Unlike the poster above, I disagree that all (most) feature suggestions here can be scripted.. Most of the valid feature suggestions I see are ones that extend the language to allow scripters to do things they could not; I'd rather see more of those.
Posted By: Wims Re: $pid and $process identifiers - 15/12/08 02:12 AM
I agree.
Snippet that allow you to get info on process (or even kill them) already exists.
Posted By: Horstefan Re: $pid and $process identifiers - 15/12/08 05:14 PM
There shouldnt be any question about "needing" a function.
It would be nice if this function is available though.
edit: [read: available --> more simple to access]
Scripting is usefull, but not neccesary.
© mIRC Discussion Forums