Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewsolomon/55af070082fd38f905792af28910118f to your computer and use it in GitHub Desktop.
Save andrewsolomon/55af070082fd38f905792af28910118f to your computer and use it in GitHub Desktop.
rex debug dump
ubuntu@ip-172-30-1-155:~/git/ebox-factory$ rex -d shellinabox
[2016-05-02 11:18:37] DEBUG - This is Rex version: 1.4.0
[2016-05-02 11:18:37] DEBUG - Command Line Parameters
[2016-05-02 11:18:37] DEBUG - d = 1
[2016-05-02 11:18:37] DEBUG - Creating lock-file (Rexfile.lock)
[2016-05-02 11:18:37] DEBUG - Loading Rexfile
[2016-05-02 11:18:37] DEBUG - Enabling task_chaining_cmdline_args feature
[2016-05-02 11:18:37] DEBUG - Activating new template engine.
[2016-05-02 11:18:37] DEBUG - Disabling usage of a tty
[2016-05-02 11:18:37] DEBUG - Activating autodie.
[2016-05-02 11:18:37] DEBUG - Using Net::OpenSSH if present.
[2016-05-02 11:18:37] DEBUG - Add service check.
[2016-05-02 11:18:37] DEBUG - Setting set() to not append data.
[2016-05-02 11:18:37] DEBUG - Registering CMDB as template variables.
[2016-05-02 11:18:37] DEBUG - activating featureset >= 0.51
[2016-05-02 11:18:37] DEBUG - activating featureset >= 0.40
[2016-05-02 11:18:37] DEBUG - activating featureset >= 0.35
[2016-05-02 11:18:37] DEBUG - activating featureset >= 0.31
[2016-05-02 11:18:37] DEBUG - Creating new distribution class of type: Base
[2016-05-02 11:18:37] DEBUG - new distribution class of type Rex::TaskList::Base created.
[2016-05-02 11:18:37] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2016-05-02 11:18:37] DEBUG - Creating task: prepare
[2016-05-02 11:18:37] DEBUG - Found Net::OpenSSH and Net::SFTP::Foreign - using it as default
[2016-05-02 11:18:37] DEBUG - Registering task: prepare
[2016-05-02 11:18:37] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2016-05-02 11:18:37] DEBUG - Creating task: shellinabox
[2016-05-02 11:18:37] DEBUG - Registering task: shellinabox
[2016-05-02 11:18:37] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2016-05-02 11:18:37] DEBUG - Creating task: get_installed
[2016-05-02 11:18:37] DEBUG - Registering task: get_installed
[2016-05-02 11:18:37] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2016-05-02 11:18:37] DEBUG - Initializing Logger from parameters found in Rexfile
[2016-05-02 11:18:37] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2016-05-02 11:18:37] DEBUG - Returning existing distribution class of type: Rex::TaskList::Base
[2016-05-02 11:18:37] INFO - Running task shellinabox on localhost
[2016-05-02 11:18:37] DEBUG - Rex::Group::Entry::Server (private_key): returning /home/ubuntu/git/ebox-factory/keypairs/illy.pem
[2016-05-02 11:18:37] DEBUG - Rex::Group::Entry::Server (public_key): returning /home/ubuntu/git/ebox-factory/keypairs/illy.pub
[2016-05-02 11:18:37] DEBUG - $VAR1 = '';
[2016-05-02 11:18:37] DEBUG - Auth-Information inside Task:
[2016-05-02 11:18:37] DEBUG - auth_type => [[key]]
[2016-05-02 11:18:37] DEBUG - password => [[%s]]
[2016-05-02 11:18:37] DEBUG - user => [[ubuntu]]
[2016-05-02 11:18:37] DEBUG - sudo_password => [[]]
[2016-05-02 11:18:37] DEBUG - sudo => [[]]
[2016-05-02 11:18:37] DEBUG - private_key => [[/home/ubuntu/git/ebox-factory/keypairs/illy.pem]]
[2016-05-02 11:18:37] DEBUG - public_key => [[/home/ubuntu/git/ebox-factory/keypairs/illy.pub]]
[2016-05-02 11:18:37] DEBUG - port => [[]]
[2016-05-02 11:18:37] DEBUG - Using Net::OpenSSH for connection
[2016-05-02 11:18:37] DEBUG - Using user: ubuntu
[2016-05-02 11:18:37] DEBUG - Using password: **********
[2016-05-02 11:18:37] DEBUG - Connecting to localhost:22 (ubuntu)
[2016-05-02 11:18:37] DEBUG - get_openssh_opt()
[2016-05-02 11:18:37] DEBUG - $VAR1 = {};
[2016-05-02 11:18:37] DEBUG - OpenSSH: key_auth or not defined: localhost:22 - ubuntu
[2016-05-02 11:18:37] DEBUG - OpenSSH options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = [
'localhost',
'user',
'ubuntu',
'port',
22,
'master_opts',
[
'-o',
'ConnectTimeout=2',
'-o',
'LogLevel=QUIET'
],
'default_ssh_opts',
$VAR1->[6]
];
[2016-05-02 11:18:37] DEBUG - OpenSSH constructor options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = {};
[2016-05-02 11:18:37] DEBUG - Trying following auth types:
[2016-05-02 11:18:37] DEBUG - $VAR1 = [
'key',
'pass'
];
[2016-05-02 11:18:37] DEBUG - Current Error-Code: 0
[2016-05-02 11:18:37] DEBUG - Connected and authenticated to localhost.
[2016-05-02 11:18:37] DEBUG - Successfully authenticated on localhost.
[2016-05-02 11:18:37] DEBUG - Executing: perl -MFile::Spec -le 'print File::Spec->tmpdir'
[2016-05-02 11:18:37] DEBUG - Detecting shell...
[2016-05-02 11:18:37] DEBUG - Searching for shell: sh
[2016-05-02 11:18:37] DEBUG - Searching for shell: zsh
[2016-05-02 11:18:37] DEBUG - Searching for shell: tcsh
[2016-05-02 11:18:37] DEBUG - Searching for shell: ash
[2016-05-02 11:18:37] DEBUG - Searching for shell: idrac
[2016-05-02 11:18:37] DEBUG - Rex::Interface::Exec::OpenSSH/executing: version
[2016-05-02 11:18:37] DEBUG - ========= ERR ============
[2016-05-02 11:18:37] DEBUG - bash: version: command not found
[2016-05-02 11:18:37] DEBUG - ========= ERR ============
[2016-05-02 11:18:37] DEBUG - Searching for shell: bash
[2016-05-02 11:18:37] DEBUG - Found shell and using: bash
[2016-05-02 11:18:37] DEBUG - Shell/Bash: Got options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = {};
[2016-05-02 11:18:37] DEBUG - SSH/executing: LC_ALL=C ; export LC_ALL; perl -MFile::Spec -le 'print File::Spec->tmpdir'
[2016-05-02 11:18:37] DEBUG - /tmp
[2016-05-02 11:18:37] DEBUG - Executing: which perl
[2016-05-02 11:18:37] DEBUG - Detecting shell...
[2016-05-02 11:18:37] DEBUG - Found shell in cache: bash
[2016-05-02 11:18:37] DEBUG - Shell/Bash: Got options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = {};
[2016-05-02 11:18:37] DEBUG - SSH/executing: LC_ALL=C ; export LC_ALL; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin; export PATH; which perl
[2016-05-02 11:18:37] DEBUG - /usr/bin/perl
[2016-05-02 11:18:37] DEBUG - Executing shellinabox
UPTO 1
[2016-05-02 11:18:37] DEBUG - Calculating checksum (MD5) of /tmp/shellinabox.deb
[2016-05-02 11:18:37] DEBUG - Executing: perl -MDigest::MD5 -e 'open my $fh, "<", $ARGV[0] or die "Cannot open " . $ARGV[0]; binmode $fh; print Digest::MD5->new->addfile($fh)->hexdigest;' '/tmp/shellinabox.deb'
[2016-05-02 11:18:37] DEBUG - Detecting shell...
[2016-05-02 11:18:37] DEBUG - Found shell in cache: bash
[2016-05-02 11:18:37] DEBUG - Shell/Bash: Got options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = {};
[2016-05-02 11:18:37] DEBUG - SSH/executing: LC_ALL=C ; export LC_ALL; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin; export PATH; perl -MDigest::MD5 -e 'open my $fh, "<", $ARGV[0] or die "Cannot open " . $ARGV[0]; binmode $fh; print Digest::MD5->new->addfile($fh)->hexdigest;' '/tmp/shellinabox.deb'
[2016-05-02 11:18:37] DEBUG - 336a28f643dd933394cf972dca40d364
[2016-05-02 11:18:37] DEBUG - MD5 checksum of /tmp/shellinabox.deb: 336a28f643dd933394cf972dca40d364
[2016-05-02 11:18:37] DEBUG - Calculating checksum (MD5) of deb/shellinabox_2.19_amd64.deb
[2016-05-02 11:18:37] DEBUG - Executing: export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin ; LC_ALL=C perl -MDigest::MD5 -e 'open my $fh, "<", $ARGV[0] or die "Cannot open " . $ARGV[0]; binmode $fh; print Digest::MD5->new->addfile($fh)->hexdigest;' 'deb/shellinabox_2.19_amd64.deb'
[2016-05-02 11:18:37] DEBUG - 336a28f643dd933394cf972dca40d364
[2016-05-02 11:18:37] DEBUG - MD5 checksum of deb/shellinabox_2.19_amd64.deb: 336a28f643dd933394cf972dca40d364
[2016-05-02 11:18:37] DEBUG - Connections in queue: 2
[2016-05-02 11:18:37] DEBUG - Calculating checksum (MD5) of /tmp/shellinabox.deb
[2016-05-02 11:18:37] DEBUG - Executing: perl -MDigest::MD5 -e 'open my $fh, "<", $ARGV[0] or die "Cannot open " . $ARGV[0]; binmode $fh; print Digest::MD5->new->addfile($fh)->hexdigest;' '/tmp/shellinabox.deb'
[2016-05-02 11:18:37] DEBUG - Detecting shell...
[2016-05-02 11:18:37] DEBUG - Found shell in cache: bash
[2016-05-02 11:18:37] DEBUG - Shell/Bash: Got options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = {};
[2016-05-02 11:18:37] DEBUG - SSH/executing: LC_ALL=C ; export LC_ALL; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin; export PATH; perl -MDigest::MD5 -e 'open my $fh, "<", $ARGV[0] or die "Cannot open " . $ARGV[0]; binmode $fh; print Digest::MD5->new->addfile($fh)->hexdigest;' '/tmp/shellinabox.deb'
[2016-05-02 11:18:37] DEBUG - 336a28f643dd933394cf972dca40d364
[2016-05-02 11:18:37] DEBUG - MD5 checksum of /tmp/shellinabox.deb: 336a28f643dd933394cf972dca40d364
[2016-05-02 11:18:37] DEBUG - local md5 and remote md5 are the same: 336a28f643dd933394cf972dca40d364 eq 336a28f643dd933394cf972dca40d364. Not uploading.
UPTO 2
[2016-05-02 11:18:37] DEBUG - Rex::Group::Entry::Server (private_key): returning /home/ubuntu/git/ebox-factory/keypairs/illy.pem
[2016-05-02 11:18:37] DEBUG - Rex::Group::Entry::Server (public_key): returning /home/ubuntu/git/ebox-factory/keypairs/illy.pub
[2016-05-02 11:18:37] DEBUG - Sudo: Executing: dpkg -i /tmp/shellinabox.deb
[2016-05-02 11:18:37] DEBUG - Shell/Bash: Got options:
[2016-05-02 11:18:37] DEBUG - $VAR1 = {
'prepend_command' => 'sudo -p \'\' -S',
'command' => 'dpkg -i /tmp/shellinabox.deb',
'auto_die' => undef
};
[2016-05-02 11:18:37] DEBUG - sudo: exec: sudo -p '' -S sh -c "LC_ALL=C ; export LC_ALL; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin; export PATH; dpkg -i /tmp/shellinabox.deb "
[2016-05-02 11:18:37] DEBUG - Rex::Interface::Exec::OpenSSH/executing: sudo -p '' -S sh -c "LC_ALL=C ; export LC_ALL; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/pkg/bin:/usr/pkg/sbin; export PATH; dpkg -i /tmp/shellinabox.deb "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment