Skip to content

Instantly share code, notes, and snippets.

@NrI3
NrI3 / create.py
Created July 26, 2023 21:54
MS17-010/shellcode/create.py
#!/bin/python3
import sys
import subprocess
def execute(command):
subprocess.check_call(command, shell=True, stdout=sys.stdout, stderr=subprocess.STDOUT)
narg = len(sys.argv)
@NrI3
NrI3 / docker-bridge-ubuntu-server
Created March 23, 2023 00:03
Change default network bridge
# Create Backup
sudo cp /var/snap/docker/common/var-lib-docker/network/files/local-kv.db /tmp/local-kv.db
# Remove config file
sudo rm /var/snap/docker/common/var-lib-docker/network/files/local-kv.db
# Set new network bridge
sudo printf '{\n "bip": "172.18.0.1/16",\n "ipv6": false,\n "fixed-cidr": "172.18.0.1/24"\n}\n' > /etc/docker/daemon.json
# Restart system
sudo systemctl restart docker
# Verify Network
ip a
@NrI3
NrI3 / ext-download.py
Created June 14, 2022 13:21
Download file by extension
import requests
from bs4 import BeautifulSoup as bs
from urllib.parse import unquote as udecode
from tqdm import tqdm
import os
from argparse import ArgumentParser
class Download:
def __init__(self):
@NrI3
NrI3 / RPy.py
Last active March 28, 2020 02:32
Python - Ruby Way!
# Ruby way for python
# By [email protected]
from datetime import datetime
import types
class Dynamic:
@staticmethod
@NrI3
NrI3 / MPyo.py
Last active March 25, 2020 16:30
[Python] json to object
###
## Writed By [email protected]
###
import json
class Object:
pass
class Pyo(object):
# theme
https://gitlab.com/spass/toffee-xfwm-theme
# info
Theme: Xfce-dawn [GTK2], Adwaita [GTK3]
Icons: Newaita [GTK2], Adwaita [GTK3]
Clock: Conky
@NrI3
NrI3 / route-linux
Last active March 17, 2020 18:00
Routing linux
# show all routes
ip route
# add route
ip route add [network/mask] dev [interface]
ip route add 192.168.0.0/24 dev ens33
@NrI3
NrI3 / firewall-cmd-command-list
Created December 15, 2019 14:54
Firewall-cmd informacion
# Listar todas las zonas
firewall-cmd --list-all-zones |more
# Listar servicios
firewall-cmd --list-services
# Mostrar informacion de un servicio
@NrI3
NrI3 / static-gw-ip-dns-centos-8
Last active December 15, 2019 04:48
Set static ip, gateway, dns - centos 8
# example with ens33 interface
# down interface
ifdown ens33
# set static ip netmask network
nano /etc/sysconfig/network-scripts/ifcfg-ens33
# append and save
DEVICE=ens33
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { HttpHeaders } from '@angular/common/http';
import { Autenticar } from './Autenticar'
import { Observable } from 'rxjs';
export interface Config {
heroesUrl: string;