memory scanner for Linux
Clone or download
12345ieee ptrace: searchregions: Use a small buffer to store incoming memory
Instead of loading a whole region in memory, use a smaller
buffer (1 MiB) and multiple loads.
This massively improves memory consumed during the scan,
especially for large regions.

The searchregions loop has been rewritten and reoptimized,
and the dots printing with it.

Changes:
* Mild speedup (10%) for sparse scans, no change for dense
* The stop condition is checked every scanned MiB instead
  of every tenth of region, leading to more responsiveness
  where it matters
* Dots printing is checked every MiB, so when scanning very small
  regions (< 10 MiB) they will be bunched, but 10 MiB are so
  little that it isn't noticeable
Latest commit 4f61ab0 Apr 15, 2018
Permalink
Failed to load latest commit information.
gui Fix version number to 0.18~dev Jun 14, 2018
po gui: Rename *.desktop.in and *.appdata.xml.in Jan 21, 2018
test test/*: Add testing framework. Oct 9, 2017
.gitignore gui: Rename *.desktop.in and *.appdata.xml.in Jan 21, 2018
.travis.yml .travis.yml: Fix Coverity scan build Oct 13, 2017
AUTHORS main: Update copyright for 2017 Oct 13, 2017
COPYING No commit message Dec 30, 2009
ChangeLog ChangeLog: Link to the releases page on GitHub Apr 28, 2016
Makefile.am scanmem, common, makefile: Move `util_getenv()` definition to `common.h` Apr 21, 2018
NEWS NEWS: Only link to the releases page on GitHub Apr 28, 2016
README README: Add Slack chat badge Oct 13, 2017
README.md load/save cheat list Apr 25, 2013
TODO move pager routines to `show_messsage.c` Apr 8, 2018
autogen.sh autogen: Run autoheader to generate config.h.in May 5, 2016
build_for_android.sh android: Add an Android build script Jan 15, 2016
commands.c scanmem: Introduce sub-command completion Feb 20, 2018
commands.h scanmem: Introduce sub-command completion Feb 20, 2018
common.h scanmem, common, makefile: Move `util_getenv()` definition to `common.h` Apr 21, 2018
configure.ac Fix version number to 0.18~dev Jun 14, 2018
endianness.h libscanmem: Replace match_flags' bitfield with an enum Oct 7, 2017
getline.c libscanmem: fix grammatical errors in comments Aug 8, 2017
getline.h treewide: Change libscanmem license to LGPLv3 Nov 20, 2016
gpl-3.0.txt Added copies for GPL Jan 3, 2010
handlers.c move pager routines to `show_messsage.c` Apr 8, 2018
handlers.h scanmem: Introduce sub-command completion Feb 20, 2018
interrupt.c interrupt: add .c file for multiple ISR's Jan 28, 2018
interrupt.h interrupt: add .c file for multiple ISR's Jan 28, 2018
lgpl-3.0.txt license: Add lgpl-3.0.txt Nov 20, 2016
licence.h treewide: Change libscanmem license to LGPLv3 Nov 20, 2016
list.h list: Move everything to the header Feb 20, 2018
main.c scanmem CLI: Add persistence of command history Apr 21, 2018
maps.c maps: fix spacing Jan 7, 2018
maps.h libscanmem: Clean up includes Oct 7, 2017
menu.c scanmem CLI: Add persistence of command history Apr 21, 2018
menu.h scanmem: Move `sm_getcommand()` from `scanmem.h` to `menu.h` Sep 9, 2017
ptrace.c ptrace: searchregions: Use a small buffer to store incoming memory Jun 28, 2018
readline.c scanmem CLI: Add persistence of command history Apr 21, 2018
readline.h scanmem CLI: Add persistence of command history Apr 21, 2018
scanmem.1 Fix version number to 0.18~dev Jun 14, 2018
scanmem.c scanmem: Introduce sub-command completion Feb 20, 2018
scanmem.h scanmem, common, makefile: Move `util_getenv()` definition to `common.h` Apr 21, 2018
scanroutines.c scanroutines: Introduce checking for uservalue flags at scan selection Oct 13, 2017
scanroutines.h scanroutines: Introduce checking for uservalue flags at scan selection Oct 13, 2017
sets.c sets: implement `!` inversion Oct 5, 2017
sets.h sets: Declare `set_cleanup()` as `static inline` Sep 23, 2017
show_message.c scanmem, common, makefile: Move `util_getenv()` definition to `common.h` Apr 21, 2018
show_message.h move pager routines to `show_messsage.c` Apr 8, 2018
targetmem.c move pager routines to `show_messsage.c` Apr 8, 2018
targetmem.h targetmem.h: replace `uint` with `unsigned int` Apr 4, 2018
value.c value.c: Make `parse_uservalue_int()` work well with ints in [2^63,2^64) Oct 13, 2017
value.h value: Use the C99 fixed-width formatters to print matches Oct 7, 2017

README.md

scanmem & GameConqueror

Build Status Coverity Status Chat on Slack

scanmem is a debugging utility designed to isolate the address of an arbitrary variable in an executing process. scanmem simply needs to be told the pid of the process and the value of the variable at several different times.

After several scans of the process, scanmem isolates the position of the variable and allows you to modify its value.

GUI

GameConqueror is a GUI front-end for scanmem, providing more features, such as:

  • Flexible syntax for searching
  • Easier and multiple variable locking
  • Better process finder
  • Memory browser/editor

See gui/README for more details.

Requirements

scanmem requires libreadline to read commands interactively, and /proc must be mounted. GameConqueror requirements are documented in gui/README.

Documentation

To read documentation:

  • man scanmem
  • man gameconqueror
  • scanmem --help
  • enter help at the scanmem prompt
  • use the interactive help of GameConqueror

Build Requirements

The build requires autotools-dev, libtool, libreadline-dev, intltool, and python.

Build and Install

To generate files required for the build:

./autogen.sh

To build with GUI:

./configure --prefix=/usr --enable-gui && make
sudo make install

To build without GUI:

./configure --prefix=/usr && make
sudo make install

scanmem and GameConqueror use static paths to libscanmem. So executing ldconfig is not required. Consider setting --libdir=/usr/lib/scanmem or --libdir=/usr/lib64/scanmem to avoid that libscanmem is in a library search path.

Run ./configure --help for more details.

Android Build

You need a standalone toolchain of Android NDK (Advanced method) to build interactive capabilities for Android. For more information, run:

./build_for_android.sh help

License:

GPLv3, LGPLv3 for libscanmem