From 64dd07d1c040e3f23240a716e96a48b4db2a8575 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 24 Oct 2021 12:35:02 +0300 Subject: [PATCH] Fixed stat --- pwncat/platform/linux.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pwncat/platform/linux.py b/pwncat/platform/linux.py index 00bb2fa..cb219a7 100644 --- a/pwncat/platform/linux.py +++ b/pwncat/platform/linux.py @@ -1735,9 +1735,13 @@ class Linux(Platform): # 14 total size in bytes for i in range(len(fields)): - if not fields[i].isdigit(): + if fields[i] == "?": fields[i] = "0" + # Fix stat output issues in some enviroments + if fields[1] == "W": + fields[1] = "0" + stat = os.stat_result( tuple( [