Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
@richardsonlima
richardsonlima / osx-for-pentesting.sh
Created July 7, 2021 01:58 — forked from gabemarshall/osx-for-pentesting.sh
A fork of osx-for-hackers for my personal pentesting setup preferences
# OSX for Pentesting (Mavericks/Yosemite)
#
# A fork of OSX for Hackers (Original Source: https://gist.github.com/brandonb927/3195465)
#!/bin/sh
# Ask for the administrator password upfront
echo "Have you read through the script prior to running this? (y or n)"
read bcareful
@richardsonlima
richardsonlima / Jenkinsfile.groovy
Created July 11, 2019 21:00 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
apiVersion: v1
kind: Service
metadata:
name: traefik-web-ui
namespace: kube-system
spec:
selector:
k8s-app: traefik-ingress-lb
ports:
- name: web
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
for user in $(cat ./accounts.txt);do echo -e '\033[0;36m [+] Efetuando migração do usuario: \033[m' $user && imapsync --timeout 0 --addheader --syncinternaldates --buffersize 81920000 --host1 IP-SERVER-ORIGEM --user1 $user+DovecotSuperUser --password1 'PASSWORD' --authmech1 PLAIN --sep1 "/" --prefix1 "" --syncinternaldates --host2 localhost --port2 7143 --user2 $user@DOMAIN --password2 'PASSWORD' --authmech2 PLAIN --subscribed \
--folder "^INBOX$" \
--folder "FOLDERNAME-1" \
--folder "FOLDERNAME-2" \
--allowsizemismatch --useheader Message-ID ; done
Esta cofiguração permite acessar tunel vpn estabelecido no linux à partir duma VM Windows com interface bridge.
########## NO LINUX ##########
# backup do sysctl.conf
cp -Rfa /etc/sysctl.conf{,.ori}
# habilitando ip forward no sysctl.conf
sed -i 's/.*net.ipv4.ip_forward.*/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
tail -n 1000 -f /path/File.log|awk '/INFO/ {print "\033[32m" $0 "\033[39m"} /ERROR/ {print "\033[31m" $0 "\033[39m"} /WARNING/ {print "\033[33m" $0 "\033[39m"}'
#!/bin/sh
#
# GerenciamentoDRM.sh
#
# Autor: Aecio Paes Barreto <aeciojr@gmail.com> 13 de marco de 2014.
#
# Descrição: Gerenciamento de DRM/TSM Server.
#
# Obs..: Nenhuma.
#