mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Feature Suggestions Jump to new posts
Re: Build mIRC with /guard:cf afterdeck 5 hours ago
If anyone is curious, here is the working set of "mitigation options"; tested on Win 10 10362.

Code
<?xml version="1.0" encoding="UTF-8"?>
<MitigationPolicy>
  <AppConfig Executable="mirc.exe">
    <DEP Enable="true" EmulateAtlThunks="false" />
    <ASLR ForceRelocateImages="true" RequireInfo="false" BottomUp="true" HighEntropy="true" />
    <StrictHandle Enable="true" />
    <ExtensionPoints DisableExtensionPoints="true" />
    <DynamicCode BlockDynamicCode="true" AllowThreadsToOptOut="false" Audit="false" />
    <ControlFlowGuard Enable="true" SuppressExports="false" />
    <SignedBinaries MicrosoftSignedOnly="true" AllowStoreSignedBinaries="false" Audit="false" AuditStoreSigned="false" EnforceModuleDependencySigning="true" />
    <Fonts DisableNonSystemFonts="true" AuditOnly="false" Audit="false" />
    <ImageLoad BlockRemoteImageLoads="true" AuditRemoteImageLoads="false" BlockLowLabelImageLoads="true" AuditLowLabelImageLoads="false" />
    <Payload EnableExportAddressFilter="true" AuditEnableExportAddressFilter="false" EnableExportAddressFilterPlus="true" AuditEnableExportAddressFilterPlus="false" EnableImportAddressFilter="true" AuditEnableImportAddressFilter="false" EnableRopStackPivot="true" AuditEnableRopStackPivot="false" EnableRopCallerCheck="true" AuditEnableRopCallerCheck="false" EnableRopSimExec="true" AuditEnableRopSimExec="false" />
    <SEHOP Enable="true" TelemetryOnly="false" />
    <Heap TerminateOnError="true" />
    <ChildProcess DisallowChildProcessCreation="true" Audit="false" />
  </AppConfig>
</MitigationPolicy>
3 78 Read More
Feature Suggestions Jump to new posts
Re: Script Editor: Collapsible Code Sections Chokehold Yesterday at 06:58 PM
I agree as well, I have very much noticed difficulty tracking end braces when coding with nested if statements.
I would very much love a collapsible editor.
5 1,835 Read More
Scripts & Popups Jump to new posts
Re: $read command not finding file maroon 19/08/19 09:13 PM
Just a reminder that $read() has default behaviors that may not be intuitive, requiring it be a good idea for most users to use the nt switches

$read($scriptdircrit-table.txt, %crit.roll)
becomes
$read($scriptdircrit-table.txt,nt, %crit.roll)

Without the 'n' switch, it tries to evaluate identifiers found in the text line, and in some cases you can get some nasty surprises from this
Without the 't' switch, it looks at line#1 of the text file, and if it's a positive number, it uses that as the number of lines in the text file, even if line#1 has a much smaller number. The above syntax for $read shows a random line from the file, but if line#1 contains 10, then you get a random line from the next 10 lines, regardless how many lines there really are.
4 59 Read More
Scripts & Popups Jump to new posts
Re: $read command not finding file Wims 19/08/19 08:53 PM
Quote
I could be wrong but as it is, it's probably looking for crit-table.txt in $mircdir.
That's entirely correct.
4 59 Read More
Scripts & Popups Jump to new posts
Re: $read command not finding file Cygnata 19/08/19 07:47 PM
Works perfectly, thanks!
4 59 Read More
Scripts & Popups Jump to new posts
Re: $read command not finding file kap 19/08/19 07:07 PM
Hi

If you move the file crit-table.txt to the same directory the script file is in and change $read(crit-table.txt, %crit.roll) to $read($scriptdircrit-table.txt, %crit.roll) does it then work?

I could be wrong but as it is, it's probably looking for crit-table.txt in $mircdir.

hth
4 59 Read More
Scripts & Popups Jump to new posts
$read command not finding file Cygnata 19/08/19 06:19 PM
I own the Skeleton_in_the_Closet dicebot, based off the Dem Bones/Bone Devil code. One of the commands in the file tells the bot to search a crit table and randomly display a message from the file. However, no matter where I place the file, he's not seeing it! He's been offline for a couple years, but it worked fine before.

Relevant code:

; nifty little critical strike table; reads numbered lines from text based on d100 result.
on *:text:!crit*:#: {
set %crit.roll $rand(1,100)
msg $chan ( $+ $nick $+ ) $read(crit-table.txt, %crit.roll) }
unset %crit.roll
}

Where should I be moving crit-table.txt to so he'll actually see it?
4 59 Read More
Feature Suggestions Jump to new posts
Re: Script Editor: Collapsible Code Sections kap 19/08/19 10:30 AM
I agree with mruno. When you code blocks are larger than your screen can display, it would be very beneficial. Presently I find myself porting code to and fro another editor that does support this. This is not ideal.
5 1,835 Read More
Feature Suggestions Jump to new posts
collapsible if|else|elseif statements in editor kap 19/08/19 10:14 AM
Is it possible to (un)collapse entire if|else|elseif statements in the scripts editor so that it makes it easier working with large blocks of code?

Maybe any block of code...

I usually find myself porting code to and from an editor that can do this and even then I find the process cumbersome.


Edit: sorry, thread already exists...

https://forums.mirc.com/ubbthreads....tor-collapsible-code-sections#Post265481
0 20 Read More
Feature Suggestions Jump to new posts
Re: Build mIRC with /guard:cf Raccoon 19/08/19 02:32 AM
(I notice that VC++ VS 2015 Community is très popular on the githubs for windows projects)
3 78 Read More
Scripts & Popups Jump to new posts
Re: PCRE error at compile & exec time Wims 18/08/19 08:50 PM
Are there/what are the others negative value that can be returned by $regex which aren't related to PCRE?
3 72 Read More
Scripts & Popups Jump to new posts
Re: PCRE error at compile & exec time Wims 18/08/19 06:56 PM
On purpose it is, thanks.
3 72 Read More
Feature Suggestions Jump to new posts
Re: Build mIRC with /guard:cf Khaled 18/08/19 06:27 PM
mIRC is currently built with Visual Studio 2008. As far as I am aware, the guard option is only available in Visual Studio 2015 and onwards. I may move to a newer version of Visual Studio in the future but that would likely require code-rewriting and a lengthy beta cycle.
3 78 Read More
Scripts & Popups Jump to new posts
Re: PCRE error at compile & exec time Khaled 18/08/19 06:17 PM
The reason for this is that $regex() can fail for many reasons not related to PCRE. In the original implementation, the PCRE code was basic enough that this was not the case. But as it became more complicated, many other error contexts arose. To maintain backwards compatibility, it continued to return the execution error if there was one. But it defaults to PCRE_ERROR_INTERNAL in most other failure cases. It also returns error values from other PCRE calls. So the returned error value can actually be due to a number of APIs and contexts. It was never documented because of this. The most you can depend on with the return value is that if it is negative, it indicates an error.
3 72 Read More
Scripts & Popups Jump to new posts
PCRE error at compile & exec time Wims 18/08/19 04:06 PM
When you do $regex(test,expression), mIRC passes that expression to pcre_compile2(), and if compilation fails, mIRC store in $regerrstr a string corresponding to the error (given by pcre).

When you do $regex(test,??) pcre_compile2()/$regerrstr returns "nothing to repeat", which is correct.

After a pattern is compiled, it has to be executed via pcre_exec().

The PCRE demo code shows that after an error from pcre_compile (or pcre_compile2 really), you should not be trying to execute with pcre_exec(), which mIRC seems to be doing in this case, because $regex(test,??) returns -14, an error from pcre_exec().

Note that -14's error description does not match this context and that mIRC reports -14 for some others error reported by pcre_compile2(), ex: $regex(test,(?<=a*))

While I believe this is wrong from a programmer point of view, in practice, nobody uses $regerrstr, (which was undocumented and only found recently) to invalidate a regex match where $regex would have returned a non negative value (including 0 for no match, which doesn't mean there was an error).

There's no real relationship between pcre_compile() and pcre_exec; in practice, I believe that $regex returning a negative value in this case is much more useful and unlikely to surprise scripter and break scripts checking the returned value of $regex.

I was wondering if mIRC was smartly doing this on purpose or if this was just the result of using pcre_exec()?

Again, remember that returning 0 for $regex() would mislead scripters to think there was no match when an error actually occured, because scripters have not been trained to use $regstrerr, so I don't think $regex should return 0, I think it should return a negative value because the compilation failed and $regex kind of has the responsibility to provide an error for both compile/exec functions. Error codes for the exec() function go up to -32, pcre is a stable project with no new feature added to it (only in pcre2) so maybe returning a negative value larger than -32 (well, smaller then) could be a way to indicate to scripters that an error occured at compile time, in which case we could check $regerrstr anyway. Again this is according to the fact that people are not using $regerrstr currently.
3 72 Read More
Feature Suggestions Jump to new posts
Build mIRC with /guard:cf afterdeck 18/08/19 01:16 PM
As per https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-control-flow-guard?view=vs-2019:

Quote
Control Flow Guard (CFG) is a highly-optimized platform security feature that was created to combat memory corruption vulnerabilities. By placing tight restrictions on where an application can execute code from, it makes it much harder for exploits to execute arbitrary code through vulnerabilities such as buffer overflows.


As far as I can tell, ASLR seems to be already supported / enabled.
3 78 Read More
Bug Reports Jump to new posts
Re: mIRC beta Khaled 18/08/19 12:51 PM
The latest beta is mIRC v7.57.965 and can be downloaded here. It includes the following changes:

Quote
Beta v7.57.965 changes:
1.Item 11, another partial rewrite of the code used by /run, /exit -nr,
/url, etc. Note that /run may or may not report an error if a file
cannot be run, depending on the version of Windows. Also, /url now
uses a simpler method of opening the default browser.
2.Item 17, https://forums.mirc.com/ubbthreads.php/topics/265915

Beta v7.57.669 changes:
1.Item 11, https://forums.mirc.com/ubbthreads.php/topics/265834
Partial rewrite of code that affects /run, /url, /exit -nr, opening
DCC Files received folder, etc. The /exit -nr command needs to call
ShellExecute() synchronously, the opposite of other commands which
were fixed for https://forums.mirc.com/ubbthreads.php/topics/265736
2.Item 12, added.
3.Item 13, fixed.
4.Item 14, fixed.
5.Item 15, fixed.
6.Item 16, performed CppCheck on the source code.

Several issues were fixed, though most were mitigated in other ways so
were unlikely to cause issues, and others required specific, unlikely
contexts to be triggered.

A large number of 32/64bit portability issues identified which will
need to be changed over time for 64bit version.

Beta v7.57.528 changes:
1.Item 1, https://forums.mirc.com/ubbthreads.php/topics/265799
2.Item 2, changed.
3.Item 3, https://forums.mirc.com/ubbthreads.php/topics/265806
4.Item 4, https://forums.mirc.com/ubbthreads.php/topics/265805
5.Item 5, https://forums.mirc.com/ubbthreads.php/topics/263520
6.Item 6, https://forums.mirc.com/ubbthreads.php/topics/265812
7.Item 7, optimized.
8.Item 8, fixed.
9.Item 9, added. A large amount of DPI-related code has been added,
including detecting DPIs on different monitors for different windows
and on different versions of Windows, detecting DPI changes for top
level windows, scaling/resetting fonts to match DPI changes, changes
to dialog tabs to handle different size fonts, and so on.

However, most of the code is currently disabled as more work is
needed. mIRC uses a number of DPI APIs, some of which are only
available in the latest update to Windows 10.

10.Item 10, fixed. If files are present, such as with a new install,
they are used. If no files are present, the internal defaults point
to $mircdir. This is partly necessary for backwards compatibility
but the method has been improved.

Changes:
1.Fixed $+ not correctly reporting string too long errors.
2.Changed installer setting to make it DPI aware.
3.Changed $findfile() to preserve multiple spaces inside a wildcard
parameter.
4.Fixed /reload interacting incorrectly with Script Editor when a new,
unedited file is created.
5.Fixed $parms returning incorrect values in some contexts.
6.Fixed DCC trust user list bug that prevented autoget from working
correctly for trusted users.
7.Optimized SendMessage() processing to use less memory.
8.Fixed SendMessage() gpf bug where recursive calls result in a stack
overflow.
9.Updated several features to be DPI aware.
10.Fixed incorrect default location for alias, popup, and remote
scripts when no files are present.
11.Fixed /exit -nr not restarting mIRC.
12.Added /run -a switch to request running as administrator.
13.Fixed script editor bug that was wrapping excessively long lines,
resulting in script errors, instead of truncating them.
14.Fixed SendMesage() handling of negative indexes.
15.Fixed richedit control handling bug that may have caused some
editbox-related code to behave incorrectly if the richedit control
failed to load.
16.Fixed a number of issues identfied by CppCheck relating to range
checking, memory initialization, and pointer dereferences, that had
the potential to cause gpfs or unexpected behaviour.
17.Fixed script #group parsing bug for invalid group definitions.
1 167,812 Read More
Scripts & Popups Jump to new posts
WEATHER.PPA - Addon for Peace and Protection 4.22 kap 18/08/19 09:36 AM
For all you die-hard PnP users out there, here is a weather addon!

https://github.com/acvxqs/PnPAddons422/blob/master/WEATHER.PPA

For those that are willing, please test it and report it's not working as it should... :P
0 25 Read More
Scripts & Popups Jump to new posts
Re: getJFM - feedback? FroggieDaFrog 17/08/19 01:53 PM
1. you can't recursively call aliases

Code
// doesn't call getJFM and returns $null
return $getJFM


2. You can't use $input() from any events so be careful with it.If getJFM is called from the editbox its fine, if called from something like onload its not
3 100 Read More
Bug Reports Jump to new posts
Re: 7.57 //exit -nr bug Khaled 17/08/19 12:53 PM
Quote
When it was not working, it was also closing, but not rerunning itself, which seems to be only a /run call.
Just tested again and it works with the same install, files and folders in the mircdir.

The only solution that would resolve this thread's issue and the original post issue would be to make ShellExecuteEx() asynchronous and to add a small delay after /run or /url to allow the external process to begin. This would ensure that an immediate exit after /run or /url would still allow them to work.

However, the asynchronous method would also prevent /run from reporting an error. If everyone is happy with /run no longer reporting errors if an application cannot be run, I can make this change in the next beta.

Update: Actually, I think this change should be made due to the effect that using /run or /url in a remote script can have. This change will be in the next beta.
15 473 Read More
Bug Reports Jump to new posts
Re: 7.57 //exit -nr bug Khaled 17/08/19 12:50 PM
Quote
In version 7.56 with me also does not work.

In that case, it is a script-related issue. There is nothing that can be changed in how /run or /url work that would resolve this.
15 473 Read More
Scripts & Popups Jump to new posts
Re: getJFM - feedback? kap 17/08/19 12:46 PM
Ah cheers! Yes I suppose I wrote it like that, because in previous versions I was toying with variables. Cleaned it up a bit and forgot to change %dir.

maroon and Ouims also pointed out that if the file to check has groups in it, it will change the hash of the file so part of my code will fail. So, I could also check for the existance of this group (SReject/JSONForMirc/CompatMode) and check hashes based on its status.

This will be in the next version.
3 100 Read More
Bug Reports Jump to new posts
Re: invalid group-end gets sent to server Khaled 17/08/19 12:36 PM
Thanks this has been fixed for the next version.
3 144 Read More
Feature Suggestions Jump to new posts
Remove <> around nick afterdeck 17/08/19 11:34 AM
Hopefully trivial one, is it possible to make guillemets around nicks optional?

[Linked Image from i.imgur.com]
0 58 Read More
Feature Suggestions Jump to new posts
Re: ctrl-k color map FroggieDaFrog 17/08/19 11:15 AM
Im indifferent to it, in the mean time you can use xpallette
1 28 Read More
Page 1 of 86 1 2 3 85 86