Skip to content

Instantly share code, notes, and snippets.

@hparadiz
Created June 20, 2020 07:25
Show Gist options
  • Save hparadiz/422abcb3dfade838ea703fa7e33681c8 to your computer and use it in GitHub Desktop.
Save hparadiz/422abcb3dfade838ea703fa7e33681c8 to your computer and use it in GitHub Desktop.
Force TCP Reset for PathOfExile_x64Steam.exe in GNU/Linux
#!/bin/sh
POEPID="$(ps -A -o pid,cmd|grep PathOfExile_x64Steam.exe | grep -v grep |head -n 1 | awk '{print $1}')"
POECONNECTION="$(lsof -np $POEPID | grep IPv4 | awk '{print $4}' | tail -n 1 | sed 's/u//g')"
GDBCOMMAND="call (int)close($POECONNECTION)"
POEIP="$(lsof -np 19380 | grep IPv4 | tail -n 1 | awk '{print $9}' | awk -F\> '{print $2}' | awk -F: '{print $1}')"
tcpkill host $POEIP &
sleep 2
for child in $(jobs -p); do
echo kill "$child" && kill "$child"
done
wait $(jobs -p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment