From 703405e0581fb60ba660dcf5b3114991ffa8b9a0 Mon Sep 17 00:00:00 2001 From: Dante <148709693+dante-tech@users.noreply.github.com> Date: Mon, 4 Dec 2023 02:04:00 +0100 Subject: [PATCH] Installation on README.md Added all the different installation methods for the repo --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8bfe05853..ebc47681d 100755 --- a/README.md +++ b/README.md @@ -34,12 +34,49 @@ Unintentional contributors: - @T-S-A's [smbspider](https://github.com/T-S-A/smbspider) script - @ConsciousHacker's partial Python port of Invoke-obfuscation from the [GreatSCT](https://github.com/GreatSCT/GreatSCT) project +# Installation + +There are multiple ways you can choose to go about the installation part, it depends on your goals and on which one you find the easiest. + +### Python Package + +If you want to use this method over the others, it is highly recommended to use [pipx](https://pypi.org/project/pipx/) instead of the classical pip. pipx is a tool that lets you install and run Python applications in isolated environments, making them globally accessible from your terminal, just like standard Linux commands. This way, you can avoid dependency conflicts, system breakage, and other issues that might occur when you install Python packages globally. To use pipx, you need to follow these steps: + +- Install pipx using `python3 -m pip install pipx`. This command uses pip to install pipx on your system. +- Run `pipx ensurepath` to add the pipx binary directory to your PATH environment variable. This allows you to run pipx commands from anywhere on your terminal. +- Install crackmapexec using `pipx install crackmapexec`. This command creates a separate virtual environment for crackmapexec and installs it there. You can then run crackmapexec as a command-line tool. + +### Docker + +Use docker to run the tool in a containerized environment. Docker is a platform that allows you to build, run, and share applications using containers. Containers are isolated environments that contain everything your application needs to run, such as code, libraries, and dependencies. This way, you can run your application on any system that supports docker, without worrying about compatibility issues. For this method, you can just run the following command: `docker pull byt3bl33d3r/crackmapexec`. + +### Binaries + +Download the correct and latest binaries of CrackMapExec for your OS [here](https://github.com/byt3bl33d3r/CrackMapExec/releases). + +### Installing from Source + +**IMPORTANT:** you should only install from source if you intend on making changes to the code and/or submitting a PR. + +To install CME from source, you need to do the following: + +- Use the `--recursive` flag when you clone the repository. This flag ensures that you download all of the sub-modules that CME depends on. Without this flag, the installation will likely fail. +- Download [Poetry](https://python-poetry.org/docs/#installing-with-pipx), a tool that helps you build, manage, and publish Python projects. Poetry automatically handles the creation of virtual environments and the installation of dependencies for CME. This way, you can avoid conflicts and errors that might occur when you use pip or other tools. +- Run the commands below to install the required packages, clone the repository, install CME, and run it. + +``` +#~ apt-get install -y libssl-dev libffi-dev python-dev build-essential +#~ git clone --recursive https://github.com/byt3bl33d3r/CrackMapExec +#~ cd CrackMapExec +#~ poetry install +#~ poetry run crackmapexec +``` + +To learn more about installation instructions, please refer to [official wiki](https://www.crackmapexec.wiki/getting-started/installation) or [here](https://github.com/byt3bl33d3r/CrackMapExec/wiki/Installation). + # Documentation, Tutorials, Examples See the project's [wiki](https://www.crackmapexec.wiki/) for documentation and usage examples -# Installation -Please see the installation instructions on the [official wiki](https://www.crackmapexec.wiki/getting-started/installation) - # Code Contributors Awesome code contributors of CME: