Last active
July 26, 2017 08:17
-
-
Save serpent213/1fb70935f29fcf12fbf7b4331b825ccf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% iex --name '[email protected]' --cookie '1mk0ulenVwtz4bktF15Xu2OH8xn0CjgC4Vp4KVU5QC/kIqsbXuEoF4nPTgB04zys' --remsh '[email protected]' | |
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] | |
Interactive Elixir (1.4.5) - press Ctrl+C to exit (type h() ENTER for help) | |
iex([email protected])1> System.cmd("pwd", []) | |
{"/srv/erlang\n", 0} | |
iex([email protected])2> System.cmd("ls", ["/etc"]) | |
{"ssl\nshadow\nresolv.conf\nprofile.d\npasswd\nos-release\nnsswitch.conf\nnetwork\nmtab\nmodprobe.d\nmke2fs.conf\nlibnl\nhosts\ngroup\nfw_env.config\nerlinit.config\nerl_inetrc\n", | |
0} | |
iex([email protected])3> model_bin = File.read!("/proc/device-tree/model") | |
<<84, 73, 32, 65, 77, 51, 51, 53, 120, 32, 66, 101, 97, 103, 108, 101, 66, 111, | |
110, 101, 32, 71, 114, 101, 101, 110, 32, 87, 105, 114, 101, 108, 101, 115, | |
115, 0>> | |
iex([email protected])4> binary_part(model_bin, 0, byte_size(model_bin) - 1) | |
"TI AM335x BeagleBone Green Wireless" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment