Notes

玩物下载偷偷用我的NAS挖矿

起因

这几天发现黑群晖NAS的硬盘灯一直在闪,心想我的最近都没有用,怎么会一直闪,直到今天登上去,系统提示我120G的系统盘已经满了才发现有异常,由于我实际并未在系统盘中放多少文件。初步推测可能是有什么软件出现错误,日志写满了硬盘。于是ssh上去看看到底是什么占用了我的空间。

du * -sh一执行发现是@appstore里面玩物下载占用了80G空间,登陆套件中心,果断卸载了。卸载完成后,在群晖前端看到还是有什么软件在以1MB的速度在进行上传,实际都没有什么用授,绝对是不合理的,而且占用的磁盘空间还没有释放。

在shell中top看一下了一下,发现有两个用户名为ionewu的进程,一个是happ:master,另一个是happ:vod,于是赶紧将这个kill掉。网络不占用了,磁盘空间也释放了。

事后搜索一下,ionewu.com 就是玩物下载的官网。而happ:masterhapp:vod则是爱奇艺的IOCP计划的进程。
参考 http://open.iqiyi.com/developer/iocp/iocp_faq.html#FAQ3

结论

推测是玩物下载在后台安装了爱奇艺的缓存软件平台(占用了我80G空间),并不断的上传下载,也就是用我的NAS在挖矿。
吃相难看

Git(Github)使用gpg key

逛Github时突然发现有的提交(commit)那里有个Verified的标志,原来是使用了gpg签名。下面记录在Windows上如何配置Git(Github)使用gpg key的。

安装Git

前往git-scm.com下载安装最新的版本Git,安装完成git后,可以看到有一个git bash应用程序。

生成你的gpg key

打开git bash,输入命令

1
gpg --gen-key

会问你一连串问题,
一般选默认的即可,但是在录入个人信息时,注意填写github注册的邮箱。

完成后,输入

1
gpg --list-keys

即可看到生成的gpg key。

再配置git使用刚刚生成的key

1
2
git config --global user.signingkey keyid
#将keyid 用截图中马赛克部分替代

在github中添加gpgkey

在git bash中运行

1
2
gpg --armor --export keyid
#将keyid 用截图中马赛克部分替代

在github的设置中添加

使用生成的key进行签名和提交

与常规的git commit差异就在于需要使用-S表明这个提交需要使用签名。

1
git commit -S -am "commit message"

完了后,按常规进行git push即可。

Pythonista中的Shell环境

刚刚使用Pythonista安装了一个stash,使用这个工具,可以使用pythonista直接运行一个Shell,其中也有很多的命令

alias.py - Define or print aliases
cat.py - Print contents of file
cd.py - Change current directory
clear.py - Clear console
cowsay.py - configurable speaking cow
cp.py - Copy file
crypt.py - File encryption using AES in CBC mode
curl.py - Transfer from an URL
cut.py - Cut out selection portions of each line of a file
dropbox_setup.py - Configure dropbox accounts for other commands
du.py - Summarize disk usage of the set of FILEs, recursively for directories
easy_config.py - UI for configuring stash
echo.py - Output text to console
edit.py - Open any text type files in Pythonista editor
find.py - Powerful file searching tool
fg.py - Bring a background job to foreground
ftpserver.py - A simple FTP server
gci.py - Interface to Python's built-in garbage collector
gh.py - GitHub interface
git.py - Git client ported from shellista
grep.py - search contents of file(s)
head.py - Display first lines of a file
httpserver.py - A simple HTTP server with upload function (ripped from https://gist.github.com/UniIsland/3346170)
jobs.py - List all jobs that are currently running
kill.py - Terminate a running job
latte.py - package manager
ls.py - List files
mail.py - Send emails with optional file attachment
man.py - Show help message (docstring) of a given command
mc.py - Easily work with multiple filesystems (e.g. local and FTP) synchronously.
md5sum.py - Print or check MD5 checksums
mkdir.py - Create directory
monkeylord.py - Manage monkey patches with the goal to make Pythonista more viable
more.py - Display output one screen page at a time
mount.py - Mount filesystems
mv.py - Move file
openin.py - Show the open in dialog to open a file in external apps.
pbcopy.py - Copy to iOS clipboard
pbpaste.py - Paste from iOS clipboard
ping.py - Ping remote hosts
pip.py - Search, download, install, update and uninstall pure Python packages from PyPI.
printenv.py - List environment variables
printhex.py - Print hexadecimal dump of the given file
pwd.py - Print current directory
python.py - Run python scripts or modules
python3.py - Run python3 scripts or modules
quicklook.py - iOS quick look for files of known types
rm.py - delete (remove) file
rmdir.py - delete (remove) directories
scp.py - Copy files from/to remote servers.
selfupdate.py - Update StaSh from its GitHub repo
sha1sum.py - Print of check SHA1 checksums
sha256sum.py - Print of check SHA256 checksums
sort.py - Sort a list, also see unique
source.py - Evaluate a script in the current environment
ssh.py - SSH client to either execute a command or spawn an interactive session on remote servers. pyte is used for terminal emulation and gives the command the feel of a full-fledged SSH client.
ssh-keygen.py - Generate RSA/DSA SSH Keys.
stashconf.py - Change StaSh configuration on the fly
tail.py - Print last lines of a FILE.
tar.py - Manipulate archive files
touch.py - Update timestamp of the given file or create it if not exist
totd.py - Print a random tip
umount.py - Unmount filesystems
uniq.py - Remove duplicates from list, also see sort
unzip.py - Unzip file, also see zip
version.py - Show StaSh installation and version information
wc.py - Line, word, character counting
webviewer.py - Open a url in the webbrowser
wget.py - get data from the net
whatis.py - Show a description for some of the commands
which.py - Find the exact path to a command script
wol.py- Wake on LAN using MAC address for launching a sleeping system
xargs.py - Command constructing and executing utility
zip.py - Zip file, also see unzip
Built with Hugo
Theme Stack designed by Jimmy