Created
June 20, 2020 07:25
-
-
Save hparadiz/422abcb3dfade838ea703fa7e33681c8 to your computer and use it in GitHub Desktop.
Force TCP Reset for PathOfExile_x64Steam.exe in GNU/Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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