Skip to content

Instantly share code, notes, and snippets.

View rrcfesc's full-sized avatar
🌌
Quis custodiet ipsos custodes?

Ricardo Jesus Ruiz Cruz rrcfesc

🌌
Quis custodiet ipsos custodes?
View GitHub Profile
@rrcfesc
rrcfesc / pagen.py
Created April 17, 2018 23:48 — forked from Phillip-C/pagen.py
Brute-Force Password Generator
#!/usr/bin/python
################################################################################
# tool: PaGen - Brute-Force Password Generator
# version: 0.2
# email: mrh@bushisecurity.com
# www: bushisecurity.com/pagen/
################################################################################
# MIT License
@rrcfesc
rrcfesc / brutus.py
Created April 17, 2018 23:48 — forked from Phillip-C/brutus.py
Python FTP Brute-Force and Dictionary Attack Tool
#!/usr/bin/python
################################################################################
# tool: Brutus - FTP Brute-Force/Dictionary Attack Tool
# version: 0.3
# email: mrh@bushisecurity.com
# www: bushisecurity.com/brutus/
################################################################################
# MIT License
version: '2'
services:
web:
image: apachephp:7.0
expose:
- "9000"
ports:
- "80:80"
- "445:443"
- "8116:22"
@rrcfesc
rrcfesc / nginx.conf
Created June 13, 2018 16:27
Reverse Proxy Jenkins with A+ Grade SSL Check
upstream jenkins {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
server_name jenkins.rioxygen.com;
return 301 https://$host$request_uri;
}
server {
@rrcfesc
rrcfesc / letsencrypt_2018.md
Created July 26, 2018 17:23 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@rrcfesc
rrcfesc / AppKernel.php
Created November 16, 2018 20:58 — forked from K-Phoen/AppKernel.php
Functional tests for standalone Symfony2 bundles
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
return array(
@rrcfesc
rrcfesc / User.php
Created November 19, 2018 20:49 — forked from Ocramius/User.php
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
<?php
phpinfo()
echo "export UID=\"$(id -u)\"" >> ~/.bashrc
echo "export GID=\"$(id -g)\"" >> ~/.bashrc
<?php
function getDirContents($dir, &$results = array()){
$files = scandir($dir);
foreach($files as $key => $value){
$path = realpath($dir.DIRECTORY_SEPARATOR.$value);
if(!is_dir($path)) {
$results[$path] = md5($path);
} else if($value != "." && $value != "..") {
getDirContents($path, $results);