本教程不保证它的权威性和正确性,也不对任何实践中的错误、数据丢失等问题负责!
本教程平台为 macOS, 其他系统请酌情参考
@ 2020/8/29
- 添加"介绍"
- 更新 TWRP 信息
| --- | |
| - name: Update dat files | |
| hosts: all | |
| become: yes | |
| vars: | |
| - base_path: /etc/mosdns | |
| - restart_daemon: yes | |
| - daemon_service_name: mosdns | |
| - clean_up_after: yes |
| --- | |
| - name: Update dat files | |
| hosts: all | |
| become: yes | |
| vars: | |
| - base_path: /etc/mosdns | |
| - restart_daemon: yes | |
| - daemon_service_name: mosdns | |
| - clean_up_after: yes |
| package my.netty.http.upload; | |
| import io.netty.channel.Channel; | |
| import io.netty.channel.ChannelInitializer; | |
| import io.netty.channel.ChannelPipeline; | |
| import io.netty.channel.EventLoopGroup; | |
| import io.netty.channel.nio.NioEventLoopGroup; | |
| import io.netty.channel.socket.SocketChannel; | |
| import io.netty.channel.socket.nio.NioServerSocketChannel; | |
| import io.netty.handler.codec.http.HttpRequestDecoder; |
| #!/bin/bash | |
| # Installation: | |
| # | |
| # 1. vim /etc/ssh/sshd_config | |
| # PrintMotd no | |
| # | |
| # 2. vim /etc/pam.d/login | |
| # # session optional pam_motd.so | |
| # |
第一步,创建一个存放备份的文件夹:
比如 mkdir /alidata/backup
第二步,新建一个自动备份的脚本:
#!/bin/sh
NAME='mxlzb' # 手动修改为待备份项目的数据库名
DATE=`date +%Y%m%d%H%M%S`| # Should work on all Debian based distros with systemd; tested on Ubuntu 16.04+. | |
| # This will by default install all plugins; you can customize this behavior on line 6. Selecting too many plugins can cause issues when downloading. | |
| # Run as root (or sudo before every line) please. Note this is not designed to be run automatically; I recommend executing this line by line. | |
| apt install curl | |
| curl https://getcaddy.com | bash -s personal dns,docker,dyndns,hook.service,http.authz,http.awses,http.awslambda,http.cache,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.forwardproxy,http.geoip,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jekyll,http.jwt,http.locale,http.login,http.mailout,http.minify,http.nobots,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.upload,http.webdav,net,tls.dns.auroradns,tls.dns.azure,tls.dns.cloudflare,tls.dns.cloudxns,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnsmadeeasy,tls.dns.dnspod,tls.dns.dyn,tls. |
| import subprocess | |
| def getClipboardData(): | |
| p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE) | |
| retcode = p.wait() | |
| data = p.stdout.read() | |
| return data |
| `pip install pycrypto` | |
| from Crypto.Cipher import DES3 | |
| from Crypto import Random | |
| key = 'Sixteen byte key' | |
| iv = Random.new().read(DES3.block_size) #DES3.block_size==8 | |
| cipher_encrypt = DES3.new(key, DES3.MODE_OFB, iv) | |
| plaintext = 'sona si latine loqueri ' #padded with spaces so than len(plaintext) is multiple of 8 | |
| encrypted_text = cipher_encrypt.encrypt(plaintext) |