From 5c4bcef0a8d9c844a29cdfbc9d05969361bbc7f6 Mon Sep 17 00:00:00 2001 From: Pedro Pozzi Ferreira Date: Fri, 10 Jan 2020 21:11:05 -0300 Subject: [PATCH 1/8] Add Lazy Pythonic Way Not only rubists are lazy --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index d2dfe82..1cdb765 100644 --- a/README.md +++ b/README.md @@ -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 From b0ae82d18f3f19c5364e80bfbbefc847033efa46 Mon Sep 17 00:00:00 2001 From: "Hikaru Terazono (3c1u)" <3c1u@vulpesgames.tokyo> Date: Tue, 14 Jan 2020 08:18:13 +0900 Subject: [PATCH 2/8] Add The Arbitrary Code Execution Way --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index d2dfe82..7676874 100644 --- a/README.md +++ b/README.md @@ -639,3 +639,20 @@ ssh -i ec2-user@ vim ``` 5. In the AWS EC2, select the newly created EC2 instance and terminate the instance. + +## 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 +``` From 84c30b571b7f1160699a05ff18630eb843f53c90 Mon Sep 17 00:00:00 2001 From: Pablo Hugen Date: Sun, 19 Jan 2020 00:10:52 -0300 Subject: [PATCH 3/8] Add The Circuit Breaker Way --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d2dfe82..ec5d0dd 100644 --- a/README.md +++ b/README.md @@ -639,3 +639,14 @@ ssh -i ec2-user@ vim ``` 5. In the AWS EC2, select the newly created EC2 instance and terminate the instance. + +## 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. From 2520c84407a698018aae9a6abf187784243c9337 Mon Sep 17 00:00:00 2001 From: Jofferson Ramirez Tiquez Date: Wed, 22 Jan 2020 12:09:08 +0800 Subject: [PATCH 4/8] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d2dfe82..53b00e0 100644 --- a/README.md +++ b/README.md @@ -639,3 +639,8 @@ ssh -i ec2-user@ vim ``` 5. In the AWS EC2, select the newly created EC2 instance and terminate the instance. + +## The Permanent Way +Credit: @jofftiquez + +***Quit software eingineering for good.*** From 3cad87163ba3ba9eb98f98585e158a246a4ff516 Mon Sep 17 00:00:00 2001 From: Jofferson Ramirez Tiquez Date: Fri, 24 Jan 2020 16:59:35 +0800 Subject: [PATCH 5/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53b00e0..650bf1d 100644 --- a/README.md +++ b/README.md @@ -643,4 +643,4 @@ vim ## The Permanent Way Credit: @jofftiquez -***Quit software eingineering for good.*** +***Quit software engineering for good.*** From aed61217d2289e82cbe0284963400c46358a6039 Mon Sep 17 00:00:00 2001 From: cobaltblu27 <31608123+cobaltblu27@users.noreply.github.com> Date: Sun, 26 Jan 2020 15:59:55 +0900 Subject: [PATCH 6/8] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 2362e77..1d716a9 100644 --- a/README.md +++ b/README.md @@ -679,3 +679,8 @@ Credit:@Tomcat-42 Credit: @jofftiquez ***Quit software engineering for good.*** + +## The Stack Overflow Way +Credit: @cobaltblu27 + +*Yeah exiting vim is really frustrating sometimes. You should definately try using Neovim. It's fast, has terminal emulator, and also supports plugin that will help you exit vim.* From e304b297587bbb7be86556f8506c262e835fe905 Mon Sep 17 00:00:00 2001 From: Adam Leskis Date: Sun, 26 Jan 2020 22:30:22 +0000 Subject: [PATCH 7/8] The Ansible Way --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 2362e77..6741613 100644 --- a/README.md +++ b/README.md @@ -679,3 +679,38 @@ Credit:@Tomcat-42 Credit: @jofftiquez ***Quit software engineering for good.*** + +## The Ansible Way +Credit: @lpmi-13 + +run vim.yml playbook with the following contents: + +``` +--- +- hosts: vimbox + + vars: + required_packages: + - vim + + tasks: + - name: install python 2 + raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) + + - name: Update APT package cache + apt: + update_cache: yes + + - name: Run apt-get upgrade + apt: upgrade=safe + + - name: Install required packages + apt: state=installed pkg={{ item }} + with_items: "{{ required_packages }}" + + - name: Start Vim in the background. + shell: "(vim >/dev/null 2>&1 &)" + + - name: Quit Vim. + shell: "(pkill vim)" +``` From 67a590a5bcea84a4741eb7d50a9afa63971d9bb0 Mon Sep 17 00:00:00 2001 From: maiki Date: Mon, 3 Feb 2020 13:35:19 -0800 Subject: [PATCH 8/8] Fix headings and code formatting --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d716a9..9b46705 100644 --- a/README.md +++ b/README.md @@ -534,9 +534,10 @@ exit him how exit vim ``` -### Linux +## Linux ```vim :call libcallnr('libc.so.6', 'exit', 0) +``` ## The canonical way Credit: @ligurio