From a1406ed910d5b55081f969631e475717beaeac30 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 14 Apr 2017 16:03:57 +0300 Subject: Added kamikaze example --- .gitignore | 1 + README.md | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 0d20b64..f2dc75e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pyc +*.zip diff --git a/README.md b/README.md index 3e06feb..d966c58 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,16 @@ def sayhello(): sayhello() ``` +### Running with scissors + +An extreme example - say you have a Mac with nothing more than an admin account with ARD access and you want to create a new user account. Here's one way to do it using `machammer`: + +Remote Desktop > Send UNIX command (as root): + +``` +curl -o /tmp/machammer.zip http://machammer.org/machammer.zip && echo -e 'from machammer import users\nusers.create_user("John Appleseed", "supersecret")' | PYTHONPATH=/tmp/machammer.zip python +``` + ### system_profiler `machammer` includes `system_profiler` - a small wrapper around OS X's `system_profiler (1)` tool. It provides a simple API for accessing system profile information as well as caching to improve performance (especially when dealing with application profile data). -- cgit v1.2.3