Skip to content

Instantly share code, notes, and snippets.

View masbicudo's full-sized avatar
🍺
Keep it fun!

Miguel Angelo masbicudo

🍺
Keep it fun!
View GitHub Profile
@masbicudo
masbicudo / search-nvd-for-cves-with-multiple-cwes.py
Created March 21, 2024 02:38
Search through all of NVD CVEs for CVEs mapped to multiple CWEs
import requests
import json
import os
import time
def read_nvd(uri_params):
url = f'https://services.nvd.nist.gov/rest/json/cves/2.0?{uri_params}'
if os.path.isfile(f"nvd-cves.{uri_params}.json"):
with open(f"nvd-cves.{uri_params}.json", "r", encoding="utf-8") as fp:
data = json.load(fp)
@masbicudo
masbicudo / git-find-big-files-in-hist.sh
Created March 23, 2019 00:43
Script to find large files in git history
#!/bin/bash
# This code is based on the awesome answer by @torek from StackOverflow:
# https://stackoverflow.com/a/41626019/195417
# I have only made a shell for his code, added some options, added some colors
# and voilà!
#
# This script can be used to find large files inside a git repository
# and it's whole history. It will list files larger than a given threshold,
# and display these files in a colored human readable way.
#
@masbicudo
masbicudo / contour-animation.py
Created October 28, 2016 01:38
MatPlotLib 2D animation with contours
# based on sample by: Roberto Colistete Jr.
# extended with animation by: MASBicudo ()
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.animation as animation
from pylab import *
##############################################################################
## Personalize your plot parameters here.