宝塔面板解决反向代理与SSL冲突的方法
需要注意2点：先申请SSL后再设置反向代理，或者将反向代理暂停后再申请SSL再开启；申请完证书后，通过如下代码将.well-known目录伪静态化，使得该目录可以被外部访问，即可实现自动续签。[hide]location /.well-known/ { }[/hide]
Transfer Files Between Any Devices Using Piping Server-转载
This guide teaches you how to easily and securely transfer files between any devices using Piping Server from command line and via a web browser. You can transfer any kind of data infinitely with Piping Server. It could be a directory, a text file, an audio, video, or anything. Also, It doesn't matter which OS or device you're using. Sharing files with Piping Server is quite easy and straight forward.A brief introduction to Piping ServerPiping Server is a free web service used to share any data between any devices over HTTP/HTTPS. The data can be transferred either from the Terminal using curl program or via a web UI. No sign-up or registration required! You don't even need to install any extra software. All you need is either curl command line program or a modern web browser, which are pre-installed in most operating systems.The Piping Server transfers the data securely with end-to-end encryption. It never stores your data in any central location or public cloud. Piping Server uses peer-to-peer method to relay data from one device to anther.It can able to share data between multiple devices at the same time. Just send a file from one device and receive it from multiple devices. If a file or folder is too big to share, simply compress it and send it.The developer has also created a few more applications and scripts that uses Piping Server:Text stream chatShare Drawing via Piping Server with End-to-End EncryptionTerminal screen sharingPiping UI - A web interface to easily and securely share data between devices over HTTPSPiping-ssh-web - SSH over HTTPS via Piping Server on Web browserPiping-vnc-web - VNC over pure HTTPS via Piping ServerThe link to the aforementioned applications are given in the Piping Server main GitHub repository.Transfer files between any devices using Piping Server from commandlineSharing files between multiples devices with Piping Server is very easy! First, we will see how to share data between two systems using curl program.For example, I am going to share a text file named ostechnix.txt from my Fedora system and receive it in Ubuntu system.On the sender node (i.e. Fedora in my case), type the following command to share the file:$ curl -T ostechnix.txt https://ppng.io/ostechnixNow go to the receiver node (i.e. Ubuntu in my case) and download the file using command:$ curl https://ppng.io/ostechnix > ostechnix.txtIt's that simple. The file will be downloaded in the current directory.Transfer Files Between Any Devices Using Piping Server In LinuxHere, https://ppng.io/ostechnix is the file upload URL. You can use different secret path at the end of this URL. For example, the secret path can be /mymessage or /text123 or anything you want. A sender and receivers who specify the same path can transfer. Both the sender and the recipient can start the transfer first. The first one waits for the other.You can also pipe the contents of a text file and then share it. On the sender node, run the following command to share a text file named ostechnix.txt:$ cat ostechnix.txt | curl -T - https://ppng.io/ostechnixGo to the receiver node and get the above text file using command:$ curl https://ppng.io/ostechnix > ostechnix.txtAs soon as the receiver run the above command in his/her, the shared file will start to download in their system.Here is the sample output. I've shared the oxtechnix.txt file from my Ubuntu system to the Fedora system via Terminal.Transfer Files Between Any Devices Using Piping ServerTransfer directories using Piping ServerIf you want to share a directory, just archive or compress it and share it.Archive a directory using tar and share it using Piping Server:$ tar zfcp - ~/mydirectory | curl -T - https://ppng.io/ostechnixCompress a directory using zip and share it using Piping Server:$ zip -q -r - ~/mydirctory | curl -T - https://ppng.io/ostechnixShare textAs stated already, you can send any kind of data, even text messages. Let us share a text message between two systems.On the sender node, type the following:$ echo "Welcome to OSTechNix" | curl -T - https://ppng.io/ostechnixOn the receiving node, you can get this message by typing the following command:$ curl https://ppng.io/ostechnixShare text between systems using piping serverQuite easy, isn't it? It comes handy when sharing URLs and clipboard between systems.If you want to append the text message to a file, simply do:$ curl https://ppng.io/ostechnix > ostechnix.txtThe above command will save the text in a text file instead of printing in the standard output.Encrypt filesTo encrypt and send files with Piping Server, run:$ cat ostechnix.txt | openssl aes-256-cbc | curl -T - https://ppng.io/ostechnixTo decrypt and download the file:$ curl https://ppng.io/ostechnix | openssl aes-256-cbc -dTransfer files to multiple receivers using Piping ServerIn the above cases, we shared the file to only one recipient. As soon as the recipient, the download link will expire, so you can't download the same file from any other devices.Even if someone tries to access that file, they will get the following message:$ curl https://ppng.io/ostechnix [ERROR] The number of receivers has reached limits.If you want to transfer files to more than receivers, for example 5, use ?n=5 parameter at the end of the URL like below:$ cat ostechnix.txt | curl -T - https://ppng.io/ostechnix?n=5Now the above file can be accessed by 5 recipients (or 5 times in a system) using the following URL:$ curl https://ppng.io/ostechnix?n=5Please note the URL. You must give the exact URL as mentioned in the sender's node. After the file is received by all receivers, the link you will see a successful message in the senders node:[INFO] Waiting for 5 receiver(s)... [INFO] A receiver was connected. [INFO] A receiver was connected. [INFO] Start sending to 5 receiver(s)! [INFO] Sent successfully! [INFO] All receiver(s) was/were received successfully.Transfer files using Piping Server via web browserIf you don't want to receive the file via Terminal, just copy the download URL and paste it in your browser's address bar to download it.Transfer files using Piping Server via web browserTransfer files from Piping Server Web UIAs mentioned already, you can send and receive them either via terminal or a web browser in Unix-like operating systems. If you are not comfortable with command line options or if you are suing other operating systems like Windows, you can use the Piping Server's web UI for transferring files. Piping Server has the following two web interfaces for those who prefers GUI over CLI:https://ppng.io/https://piping-ui.org/ (a more modern UI with encryption option)Go to any one of the above links and choose the file you want to share, enter the secret path, and click Send button. If you use the second UI (i.e. piping-ui), there is an option to password-protect files. Now a file upload URL will be generated. You can use this URL to download the file from any system.Transfer files from Piping Server Web UITo download the file, just paste the URL which you copied in the earlier step in GET tab in Piping Server web interface. You may need enter the passphrase to unlock and download the file.Install Piping Server LocallyCurrently, a few public servers are maintained by the Piping Server developer(s) to transfer files. You can also self-host it using docker or using the portable executable file.If you prefer to use Docker, run the following command to run a local Piping Server instance:$ docker run -p 8080:8080 nwtgck/piping-serverPoint your web browser to http://localhost:8080 URL to access the Piping Server.if you prefer to use portable executable file, download its latest version from the official releases page:$ wget https://github.com/nwtgck/piping-server-pkg/releases/download/v1.1.0/piping-server-linuxMake it executable:$ chmod +x piping-server-linuxAnd run the Piping Server local instance with command:$ ./piping-server-linuxYou can now access the Piping Server web UI from URL http://ip-address:8080.Self Host Piping ServerThere are also a few more ways to deploy Piping Server in your local machine. Refer the project's GitHub link to know how.Getting helpTo display Piping Server help section, run:$ curl https://ppng.io/helpResource:Piping Server GitHub RepositoryRelated read:Share Files Between Multiple Devices Using Snapdrop Via Web BrowserShare Files Between Linux Desktops With WarpinatorPSiTransfer – A Simple Open Source Self-hosted File Sharing SolutionHow to Setup A Basic File server Using simpleHTTPserverAn Easy And Fast Way To Share Files Over Internet From Command LineOnionShare – Share Files Of Any Size Securely And AnonymouslyAirDroid – Access and manage your Android device from Computer
本文转载自：https://www.cnblogs.com/f-ck-need-u/p/7545187.htmlshadow文件的格式就不说了。就说说它的第二列——密码列。通常，passwd直接为用户指定密码就ok了。但在某些情况下，要为待创建的用户事先指定密码，还要求是加密后的密码，例如kickstart文件中的rootpw指令，ansible创建用户时提前指定密码等，这时候不得不手动生成合理的密码。先说说shadow文件中第二列的格式，它是加密后的密码，它有些玄机，不同的特殊字符表示特殊的意义：①.该列留空，即"::"，表示该用户没有密码。②.该列为"!"，即":!:"，表示该用户被锁，被锁将无法登陆，但是可能其他的登录方式是不受限制的，如ssh公钥认证的方式，su的方式。③.该列为""，即"::"，也表示该用户被锁，和"!"效果是一样的。④.该列以"!"或"!!"开头，则也表示该用户被锁。⑤.该列为"!!"，即":!!:"，表示该用户从来没设置过密码。⑥.如果格式为"$id$salt$hashed"，则表示该用户密码正常。其中$id$的id表示密码的加密算法，$1$表示使用MD5算法，$2a$表示使用Blowfish算法，"$2y$"是另一算法长度的Blowfish,"$5$"表示SHA-256算法，而"$6$"表示SHA-512算法，目前基本上都使用sha-512算法的，但无论是md5还是sha-256都仍然支持。$salt$是加密时使用的salt，hashed才是真正的密码部分。下文都以生成明文"123456"对应的加密密码为例。要生成md5算法的密码，使用openssl即可。openssl passwd -1 '123456' openssl passwd -1 -salt 'abcdefg' '123456'生成密码后，直接将其拷贝或替换到shadow文件的第二列即可。例如：替换root用户的密码shell> field=$(awk -F ':' '/^root/{print $2}' /etc/shadow) shell> password=$(openssl passwd -1 123456) shell> sed -i '/^root/s%'$field'%'$password'%' /etc/shadow但openssl passwd不支持生成sha-256和sha-512算法的密码。在CentOS 6上，可以借助grub提供的密码生成工具grub-crypt生成。[root@server1 ~]# grub-crypt -h Usage: grub-crypt [OPTION]... Encrypt a password. -h, --help Print this message and exit -v, --version Print the version information and exit --md5 Use MD5 to encrypt the password --sha-256 Use SHA-256 to encrypt the password --sha-512 Use SHA-512 to encrypt the password (default) Report bugs to <bug-grub@gnu.org>. EOF [root@server1 ~]# grub-crypt --sha-512 Password: Retype password: $6$nt4hMDAYqYjudvfo$AKIZ3Z0o6/6HV6GKXqq21VEmh.ADFAZUQw2mvbIlplKx7gu9MQiEWjdmHnF2YPnYzgce1cP/bzDguVnUkMg/N.grub-crypt其实是一个python脚本，交互式生成密码。以下是grub-crypt文件的内容。[root@server1 ~]# cat /sbin/grub-crypt #! /usr/bin/python '''Generate encrypted passwords for GRUB.''' import crypt import getopt import getpass import sys def usage(): '''Output usage message to stderr and exit.''' print >> sys.stderr, 'Usage: grub-crypt [OPTION]...' print >> sys.stderr, 'Try `$progname --help\' for more information.' sys.exit(1) def gen_salt(): # 生成随机的salt '''Generate a random salt.''' ret = '' with open('/dev/urandom', 'rb') as urandom: while True: byte = urandom.read(1) if byte in ('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' './0123456789'): ret += byte if len(ret) == 16: break return ret def main(): '''Top level.''' crypt_type = '$6$' # SHA-256 try: opts, args = getopt.getopt(sys.argv[1:], 'hv', ('help', 'version', 'md5', 'sha-256', 'sha-512')) except getopt.GetoptError, err: print >> sys.stderr, str(err) usage() if args: print >> sys.stderr, 'Unexpected argument `%s\'' % (args[0],) usage() for (opt, _) in opts: if opt in ('-h', '--help'): print ( '''Usage: grub-crypt [OPTION]... Encrypt a password. -h, --help Print this message and exit -v, --version Print the version information and exit --md5 Use MD5 to encrypt the password --sha-256 Use SHA-256 to encrypt the password --sha-512 Use SHA-512 to encrypt the password (default) Report bugs to <bug-grub@gnu.org>. EOF''') sys.exit(0) elif opt in ('-v', '--version'): print 'grub-crypt (GNU GRUB 0.97)' sys.exit(0) elif opt == '--md5': crypt_type = '$1$' elif opt == '--sha-256': crypt_type = '$5$' elif opt == '--sha-512': crypt_type = '$6$' else: assert False, 'Unhandled option' password = getpass.getpass('Password: ') password2 = getpass.getpass('Retype password: ') if not password: print >> sys.stderr, 'Empty password is not permitted.' sys.exit(1) if password != password2: print >> sys.stderr, 'Sorry, passwords do not match.' sys.exit(1) salt = crypt_type + gen_salt() print crypt.crypt(password, salt) # 生成最终的加密密码 if __name__ == '__main__': main()很不幸，CentOS 7上默认安装的是grub2，它不提供grub-crypt。因此参照grub-crypt内容，使用下面的python语句简单代替grub-crypt，这同样也是交互式的。python -c 'import crypt,getpass;pw=getpass.getpass();print(crypt.crypt(pw) if (pw==getpass.getpass("Confirm: ")) else exit())'如果不想交互式，再改成如下形式：python -c 'import crypt,getpass;pw="123456";print(crypt.crypt(pw))'现在就方便多了，直接将结果赋值给变量即可。[root@server1 ~]# a=$(python -c 'import crypt,getpass;pw="123456";print(crypt.crypt(pw))') [root@server1 ~]# echo $a $6$uKhnBg5A4/jC8KaU$scXof3ZwtYWl/6ckD4GFOpsQa8eDu6RDbHdlFcRLd/2cDv5xYe8hzw5ekYCV5L2gLBBSfZ.Uc166nz6TLchlp.例如，ansible创建用户并指定密码：a=$(python -c 'import crypt,getpass;pw="123456";print(crypt.crypt(pw))') ansible 192.168.100.55 -m user -a 'name=longshuai5 password="$a" update_password=always'
突破微软E5应用密钥限制上限2年的办法-转载
写在前面昨天在整挂载onedrive，设置应用密钥的时候发现上限为2年，今天发现loc上有人整出方法来了。本方法搬运自hostlocloc上人才济济，每日都有新玩意儿开始Graph Explorer-在线测试API工具​ 工具地址:https://developer.microsoft.com/zh-cn/graph/graph-explorer需要在左侧登录你的账号​ Micro Graph API文档:https://docs.microsoft.com/zh-CN/graph/api/overview?view=graph-rest-1.0​ 使用条件:有Graph Explorer调用API对应所需权限的账号，方便起见直接使用全局管理员步骤AAD中复制应用的对象ID(Object ID)Graph Explorer 中调用API添加密码2.1 请求类型改为POST,请求地址https://graph.microsoft.com/v1.0/applications/{id}/addPasswordid改为应用的对象ID2.2 添加请求正文，过期时间(utc格式)必选，密钥名称、开始时间可选{ "passwordCredential": { "displayName": "300年", "endDateTime": "2300-01-01T00:00:00Z" } }2.3 给Graph Explorer权限:修改权限(预览版)-同意许可2.4 运行查询复制保存响应中的密钥AAD中验证密钥有效期，看不到刷新或重新登陆 （我是重新刷新了下网页，就有了）搬运完毕本文转载自主机贴士，原文地址： https://zhujitips.com/3175Hostloc原帖地址： https://hostloc.com/thread-840678-1-2.html
端口转发[ppblock ex="请输入密码"]panel.myoracle.xyz[/ppblock]Azure开机面板[ppblock ex="请输入密码"]az.okjason.com[/ppblock]
?微信/QQ/TIM防撤回补丁适用于 Windows 下 PC 版微信/QQ/TIM的防撤回补丁。支持最新版微信/QQ/TIM，其中微信能够选择安装多开功能。下载地址：⚡️点我下载最新版本 |☁备用下载-蓝奏云 | ☁备用下载-百度云 相关文档：✔支持哪些版本 | ❓常见问题 | ?查看完整文档原理与方法：?微信 |?QQ |?TIM附带产物：一个通用的微信多开工具?截图?使用方法首先，你的系统需要满足以下条件：Windows 7 或更高版本，不支持XP。.NET Framework 4.5.2 或更高版本。低于此版本在打开程序时可能无反应，或者直接报错。使用本程序前，先关闭微信/QQ/TIM。以管理员身份运行本程序，等待右下角获取最新的补丁信息。选择微信/QQ/TIM的安装路径。如果你用的安装版的微信/QQ/TIM，正常情况下本程序会自动从注册表中获取安装路径，绿色版需要手动选择路径。点击防撤回。界面可能会出现一段时间的无响应，请耐心等待。由于修改了微信的 WeChatWin.dll 文件、QQ/TIM的 IM.dll 文件，杀毒软件可能会弹出警告，放行即可。注意：微信/QQ/TIM更新之后要重新安装补丁！❤Thankswechat_anti_revoke?LicenseGPLv3本文转载自：https://github.com/huiyadanli/RevokeMsgPatcher