admin 726 0.0 1.0 6952 4752 pts/1 S< 18:45 0:00 /bin/bash admin 768 0.0 0.7 8648 3312 pts/1 R<+ 18:45 0:00 ps aux admin@i-0fcbbedeb8752ba6f:~$ ps aux | grep python root 580 0.2 6.1 107132 28492 ? Ss 18:43 0:00 /usr/bin/python3 /home/admin/webserver.py root 607 0.0 3.7 26612 17332 ? Ss 18:43 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal admin 721 0.5 4.1 98188 19316 pts/0 S<l+ 18:45 0:00 /usr/bin/python3 /usr/bin/asciinema rec -t paris/i-0fcbbedeb8752ba6f -q -i 2 /var/log/cast/i-0fcbbedeb8752ba6f admin 724 0.0 3.0 24456 14384 pts/0 S<+ 18:45 0:00 /usr/bin/python3 /usr/bin/asciinema rec -t paris/i-0fcbbedeb8752ba6f -q -i 2 /var/log/cast/i-0fcbbedeb8752ba6f admin 771 0.0 0.1 5264 636 pts/1 S<+ 18:45 0:00 grep python admin@i-0fcbbedeb8752ba6f:~$ strace -p 580 strace: attach: ptrace(PTRACE_SEIZE, 580): Operation not permitted admin@i-0fcbbedeb8752ba6f:~$ admin@i-0fcbbedeb8752ba6f:~$ admin@i-0fcbbedeb8752ba6f:~$ ls agent webserver.py admin@i-0fcbbedeb8752ba6f:~$ ls -la total 44 drwxr-xr-x 6 admin admin 4096 Sep 24 23:20 . drwxr-xr-x 3 root root 4096 Sep 17 16:44 .. drwx------ 3 admin admin 4096 Sep 20 15:52 .ansible -rw------- 1 admin admin 296 Oct 20 18:46 .bash_history -rw-r--r-- 1 admin admin 220 Aug 4 2021 .bash_logout -rw-r--r-- 1 admin admin 3526 Aug 4 2021 .bashrc drwxr-xr-x 3 admin admin 4096 Sep 20 15:56 .config -rw-r--r-- 1 admin admin 807 Aug 4 2021 .profile drwx------ 2 admin admin 4096 Sep 17 16:44 .ssh drwxr-xr-x 2 admin root 4096 Sep 24 23:20 agent -rwxrwx--- 1 root root 360 Sep 24 23:20 webserver.py admin@i-0fcbbedeb8752ba6f:~$ curl X localhost:5000
paris/i-0fcbbedeb8752ba6f
by SadServersMore by SadServers
level = logging.DEBUG if not os.path.exists(logdir): os.makedirs(logdir) logfile = os.path.join(logdir, "unattended-upgrades-shutdown.log") logging.basicConfig(filename=logfile, level=level, format="%(asctime)s %(levelname)s - %(message)s") UnattendedUpgradesShutdown(options).run() if __name__ == "__main__": main() admin@i-06e18ce49b1465f2e:~$ cat
paris/i-06e18ce49b1465f2e 04:42
by SadServersadmin@i-0be4fa9417f6a9d57:~$ less /var/log/journal/ec26942be8219bc22967aa0256120system.journal system@df99c4b1471c47279f87f0a9acf83714-0000000000000001-00060590bd3fe579.journaadmin@i-0be4fa9417f6a9d57:~$ less /var/log/journal/ec26942be8219bc22967aa0256120"/var/log/journal/ec26942be8219bc22967aa0256120fca/system.journal" may be a binaadmin@i-0be4fa9417f6a9d57:~$ less /var/log/^C admin@i-0be4fa9417f6a9d57:~$ ls agent webserver.py admin@i-0be4fa9417f6a9d57:~$ ./webserver.py bash: ./webserver.py: Permission denied admin@i-0be4fa9417f6a9d57:~$ chmod +x ./webserver.py chmod: changing permissions of './webserver.py': Operation not permitted admin@i-0be4fa9417f6a9d57:~$ curl localhost:500 curl: (7) Failed to connect to localhost port 500: Connection refused admin@i-0be4fa9417f6a9d57:~$