Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Jul 4, 2014
  1. Merge branch 'sun-readme'

  2. Merge branch 'readme' of into sun-readme

    Add, but still keep readme.txt.
Commits on Jul 1, 2014
  1. @sun
Commits on Feb 26, 2014
  1. Recognise more sequences; ignore newline immediately after wrap.

    Added support for CHT & CBT (move forward/backward by tabs), DECAWM (don't
    wrap at EOL), CRM (display control characters, but still perform newline)
    and REP (repeat last character, including BEL, BS, TAB, LF and CR).
    It always bugged me that newline would add an unneeded blank line due to
    wrap, but not enough to do anything about it.  For some reason, adding CRM
    got me to thinking about it, so I finally did it.
    Stopped \e[K from erasing the first character of the next line.
    Restore cursor visibility on unload.
Commits on Feb 20, 2014
  1. Use window height, not buffer.

    Clear screen (\e[2J) will scroll in a new window the first time it's used,
    or the window has scrolled, or the cursor is on the last line of the buffer.
    Restore Cursor Position (\e[u) will recognise screen size changes and limit
    itself to the new boundaries.
Commits on Feb 18, 2014
  1. Better parsing of escape & CSI sequences.

    Recognise general Parameter & Intermediate Bytes, rather than testing
    specific characters.  Explicitly ignore xterm 38 & 48 SGR values.
Commits on Feb 10, 2014
  1. Exclude entire programs; better hooking of dynamically-loaded libraries.

    ANSICON_EXC can now be used to exclude an entire program (including children).
    This is achieved by simply not specifying an extension: ANSICON_EXC=program.exe
    will just ignore program.exe (its DLLs will still be hooked, as will its child-
    ren), but ANSICON_EXC=program will not hook program at all (which also means
    its children will not be hooked).
    The various LoadLibrary hooks would only hook the DLL that was specified - any
    DLLs it loaded would be missed.  That has now been rectified.  Similarly, a DLL
    that is injected via CreateRemoteThread, using LoadLibraryA or LoadLibraryW as
    its ThreadProc, will now be hooked.
Commits on Feb 8, 2014
Commits on Feb 7, 2014
Commits on Feb 4, 2014
  1. Inject by adding to the Import Directory Table.

    -p uses CreateRemoteThread, determining kernel32.dll & LLW dynamically.
    Loading via LoadLibrary will remember the current attributes, restoring them on
    Tweaked log output (remove quotes around CreateProcess command line; add an
    underscore to 64-bit addresses).
    ansicon.exe will really output (to the console) strings as Unicode.
    Fixed ansicon.exe, if installed, restoring the default attributes, not current.
    ansicon.exe will start with ANSICON_DEF (if defined and -m not used).
Commits on Jan 27, 2014
Commits on Jan 25, 2014
  1. LoadLibrary hooking improvements.

    Don't hook ourself from LoadLibrary or LoadLibraryEx.
    Test additional LoadLibraryEx flags before deciding to hook.
Commits on Nov 13, 2013
Commits on Sep 20, 2013
Commits on Sep 19, 2013
Commits on Sep 4, 2013
Commits on Aug 2, 2013
Commits on Jul 25, 2013
Commits on Jul 18, 2013
Commits on Feb 20, 2013
  1. Minor change to the readme.

Commits on Feb 14, 2013
  1. Commit the updated readme...

  2. Go back to using ANSI-LLW.exe.

Commits on Nov 24, 2012
  1. New method to obtain 32-bit LoadLibraryW from 64-bit code, eliminatin…

    …g the need
    for ANSI-LLW.exe.
    Set the code page so ansicon.exe can display some strings properly.
    Expand wildcards for -t.
    VC6 can now compile the 32-bit version; use it for the release binaries.
    Improvements to the VC makefile.
    Describe the sequences in a bit more detail.
Commits on Jun 12, 2012
Commits on Jun 2, 2012
Commits on Jun 1, 2012
  1. Implemented \e[39m & \e[49m.

Commits on Apr 10, 2012
Commits on Feb 24, 2012
Commits on Feb 5, 2012
Commits on Jan 15, 2012
Commits on Jan 7, 2012
Commits on Dec 14, 2011
  1. Exclude modules from being hooked; hook only selected GUI programs.

    Added environment variable ANSICON_EXC to specify modules that should not be
    hooked.  This should work around the nvd3d9wrap.dll issue.  Since it helps to
    know what the modules are, logging is now always available, controlled by -l
    or ANSICON_LOG.  A side-effect caused debugstr.c to move to util.c.
    GUI programs are once again not hooked, unless run by "ansicon" directly or in
    the ANSICON_GUI environment variable.  Since not hooking still leaves ANSICON in
    the environment, created ANSICON_VER as a dynamic-only variable, which can also
    serve as a version check.
    Due to an email requesting a reverse video option, realised I always take the
    current attributes as default.	This means if you turned on reverse and ran a
    program, it would take the reverse as its default.  Created ANSICON_DEF variable
    to explicitly set the default attribute, using the current if it doesn't exist.
    The reverse video option is done via a "negative" attribute (e.g. "-m-f0" is
    reversed black on white, meaning you'll get white on black, with foreground
    sequences changing the background).  (The difference from "\e[7m" is that it
    won't be reset on "\e[m".)
    A child program will inherit the parent's modes (but not shift); the parent will
    read the child's modes on exit (but not unload).  The exception is "ansicon",
    which will always start with the default modes and leave the parent unchanged.
    Improved the AutoRun entry, only running "ansicon" if ANSICON_VER doesn't exist.
    The "ansicon" command is always first.
    Stopped -u implying -p; return the program's exit code; don't restore the
    original color when just using -p; output error messages to stderr.
Something went wrong with that request. Please try again.