This file contains 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/bash | |
for fd in /proc/$1/fd/*; do | |
if [ ! -f "$fd" ]; then continue; fi | |
fdnum=$(basename "$fd") | |
fdinfo=/proc/$1/fdinfo/$fdnum | |
name=$(readlink "$fd") | |
size=$(stat -c "%s" "$name" 2>/dev/null || stat -c "%s" "$fd") | |
progress=$(grep ^pos "$fdinfo" | awk '{print $2}') | |
if [ $size -eq "0" ]; then | |
echo '['$fdnum']' "$name"':' $progress'/'$size |
This file contains 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import urllib.parse | |
for f in sys.argv[1:]: | |
os.rename(f, urllib.parse.unquote_plus(f)) |
This file contains 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
# Wrapper module for _ssl, providing some additional facilities | |
# implemented in Python. Written by Bill Janssen. | |
"""This module provides some more Pythonic support for SSL. | |
Object types: | |
SSLSocket -- subtype of socket.socket which does SSL over the socket | |
Exceptions: |
This file contains 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/bash | |
find . -type f -print0 | while IFS= read -r -d $'\0' filename; do | |
if [ -f "$1/$filename" ]; then | |
echo touch -r "$1/$filename" "$filename" | |
touch -r "$1/$filename" "$filename" | |
else | |
echo "$1/$filename" not exist | |
fi | |
done |
This file contains 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/bash | |
cd "$1" | |
find . -name "*.rar" -type f -print0 | while IFS= read -r -d $'\0' filename; do | |
basefn=$(basename "$filename") | |
basefncut="${basefn%.*}" | |
unar -p 扶她奶茶 -o /tmp -d "$filename" | |
7za a -tzip -mx=9 "${filename%.*}".zip /tmp/"$basefncut"/* | |
rm -rf /tmp/"$basefncut"/ | |
done |
This file contains 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
import os | |
import sys | |
import colorsys | |
""" | |
Black 0;30 Dark Gray 1;30 | |
Blue 0;34 Light Blue 1;34 | |
Green 0;32 Light Green 1;32 | |
Cyan 0;36 Light Cyan 1;36 | |
Red 0;31 Light Red 1;31 |
This file contains 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
# Volatility | |
# Copyright (C) 2007-2013 Volatility Foundation | |
# Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org> | |
# Copyright (C) 2009 Brendan Dolan-Gavitt | |
# | |
# This file is part of Volatility. | |
# | |
# Volatility is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or |
This file contains 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
''' | |
Clone of WWStar, an ancient Classical Chinese translator. | |
usage: python3 WWStarClone.py [dir] |
This file contains 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import random | |
from PIL import Image | |
''' | |
Copyright (c) 2016 gumblex |
This file contains 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/bash | |
echo 'Status: 200 OK' | |
echo 'Content-Type: text/html; charset=utf-8' | |
echo | |
echo '<!DOCTYPE html>' | |
echo '<html><head>' | |
echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8">' | |
echo '<meta name="description" content="'"$HTTP_USER_AGENT"'">' | |
# we use CloudFlare |
NewerOlder