Skip to content

Instantly share code, notes, and snippets.

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

Dviejo Dviejopomata

🏠
Working from home
  • Alicante, Spain
View GitHub Profile
@Dviejopomata
Dviejopomata / Program.cs
Last active January 27, 2018 11:03
Add certificates to trusted root CA
using Microsoft.Extensions.CommandLineUtils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
namespace import_certs
{
class Program
@Dviejopomata
Dviejopomata / TestCerts.java
Created January 29, 2018 08:16
Java para generar Ca con intermediate
import org.bouncycastle.asn1.DERBMPString;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x500.X500NameBuilder;
import org.bouncycastle.asn1.x500.style.BCStyle;
import org.bouncycastle.asn1.x509.BasicConstraints;
import org.bouncycastle.asn1.x509.Extension;
import org.bouncycastle.asn1.x509.GeneralName;
import org.bouncycastle.asn1.x509.GeneralNames;
import org.bouncycastle.cert.X509CertificateHolder;
using System;
namespace poc_c_
{
class Program
{
const int filas = 5;
const int columnas = 4;
static int[,] matriz = new int[filas, columnas];
static void Main(string[] args)
class MatchSpider(scrapy.Spider):
name = 'match'
# allowed_domains = ['mobile.bet365.es']
def start_requests(self):
start_urls = ['https://mobile.bet365.es']
for i, url in enumerate(start_urls):
yield scrapy.Request(url, meta={'cookiejar': i}, headers={'host': 'mobile.bet365.es'},
{
"provincias": [
{
"origen": "Alicante",
"destinos": ["Madrid", "Barcelona"]
},
{
"origen": "Madrid",
"destinos": ["Barcelona", "Valencia", "Sevilla"]
},
package main
import (
"github.com/xenolf/lego/acme"
"crypto"
"crypto/rsa"
"crypto/rand"
"fmt"
"log"
"os"
@Dviejopomata
Dviejopomata / ej1
Created March 25, 2018 20:38
Ejercicio1 redes
# En el switch 2 y 3 ejecutamos los comandos como client
vtp mode client
vtp domain UOC
vtp password cisco123
end
# Configuramos la password en el switch 1
line con 0
password cisco123
login
@Dviejopomata
Dviejopomata / keybindings.json
Created May 11, 2018 13:33
Keyboard vscode
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+t",
"command": "workbench.action.terminal.focus"
},
{
"key": "ctrl+shift+l",
"command": "workbench.action.editor.changeLanguageMode"
},
var http = require('http'),
httpProxy = require('http-proxy');
var url = require('url') ;
//
// Create a proxy server with custom application logic
//
var proxy = httpProxy.createProxyServer({});
//
import net = require("net")
import sni = require("sni")
const TCP_PORT = 443
const PORT = "8444"
const CERT_PORT = "8445"
const remotehost = "localhost"
const remoteport = parseInt(PORT, 10)
const remoteCertHost = "localhost"
const remoteCertPort = parseInt(CERT_PORT, 10)
const log = (...str) => {