mIRC Homepage

Pipeline broke my script...

Posted By: colt45

Pipeline broke my script... - 29/12/20 02:22 AM

Pipeline appears to break my script from time to time.

i.e.

Code
on *:TEXT:*:*: {
     echo @TEST $strip($1)
}


And when someone type something like this.

Quote
He||o I'm John


Result I get is

Code
He
o I'm John Unknown command


If there is, I just couldn't figure out what word/code is, to treat that as a text but not as a code.

Thanks
Posted By: Loki12583

Re: Pipeline broke my script... - 29/12/20 03:42 AM

Sounds like you're putting this in a timer. This exploit can be used to run arbitrary code on your computer. You should wrap all user input in $unsafe().
Posted By: colt45

Re: Pipeline broke my script... - 29/12/20 12:30 PM

Not using a timer, it echoes instantly to my window from several channels I'm on - so I can read them all in 1 window rather than having to check in each channel.
Posted By: Loki12583

Re: Pipeline broke my script... - 29/12/20 01:30 PM

Are you then using the /scid or /scon commands with -a switch? Just using /echo is not enough to cause this behavior. Can you create a full minimal script, including creation of the test window that will run in a portable installation of mirc to reproduce this?
Posted By: colt45

Re: Pipeline broke my script... - 29/12/20 04:08 PM

Sorry meant to say echo @TEST $strip($1-) instead of echo @TEST $strip($1)

Yes, I use this

Code
scon 1 echo @All-In-One $strip($1-)


I'm using portable mIRC so I can run without having to reinstall over again after re-formatting my PC (%app-data% ruin me from time to time)

Nope, I haven't use the -a switch, will look into this. Thanks
Posted By: Loki12583

Re: Pipeline broke my script... - 29/12/20 08:23 PM

Oh I thought for some reason this was limited to using the -a switch but it looks like commands are always double evaluated with /scon

You should either use "scon 1" on its own line, or wrap in $unsafe($1-) as previously suggested
© 2021 mIRC Discussion Forums