Flash Player LocalConnection Shared Memory Native Code Library
This library is a native code library for connecting to the LocalConnection API used by Flash Player. This is done by connecting to the same shared memory and semaphores, to read and write to the messaging system. All of this was made possible by reverse engineering the API's and messaging formats used by Flash Player.
The library was tested against Flash Player 6 and up (Flash Player 6 introduced LocalConnection), and Flash Player on Windows, Mac, and Linux are all supported.
This library is tested against the compilers Clang, GCC, MSVC, and MinGW. See Travis and AppVeyor CI configuration for exact versions that are tested against. The library will likely also work with other compatible C99 compilers.
See the util directory for some sample usage. Some things to keep in mind.
data is a series of AMF encoded data, AMF0 or AMF3 depending on the message (size defines how large the encoded data is).hostname:connection-name (example.com:name, localhost:name)_global-connection-name (_domainshared:name)example.com = example.comwww.example.com = example.coma.b.example.com = b.example.com).is_per_user to match the isPerUser property used in ActionScript (the default is and will likely stay false, and this property is not available in older versions of Flash Player itself).flshm_lock and flshm_unlock functions to lock the semaphore for exclusive access to the shared memory while reading and writing messages and connections to avoid problems with race conditions.flshm_close to free memory allocated by the library, and avoid memory leaks.If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.
Pull requests are also welcome, but any changes must be cross-platform to be merged.
Copyright (c) 2016-2019 Alexander O'Mara
Licensed under the Mozilla Public License, v. 2.0.
If this license does not work for you, feel free to contact me.
If you find my software useful, please consider supporting independent and open-source software development by making a modest donation on my website at alexomara.com.