Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻

Miglen Evlogiev miglen

👨‍💻
View GitHub Profile
@miglen
miglen / packagejson.py
Created Feb 10, 2021
Dirty check for non existing public npm dependencies
View packagejson.py
#!/bin/env python3
# https://www.bleepingcomputer.com/news/security/researcher-hacks-over-35-tech-firms-in-novel-supply-chain-attack/
# The following script finds all package.json files in the current dir and checks if there are referenced any
# dependencies that no public package is available for, making your application vulnerable to supply-chain attack.
# Simply run ./packagejson.py in your root repository direcotory.
import json
import requests
from pathlib import Path
import urllib.parse
@miglen
miglen / aws.opml
Created Feb 9, 2021 — forked from benkehoe/aws.opml
AWS RSS feeds
View aws.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>AWS RSS feeds 2019-04-22</title>
</head>
<body>
<outline text="AWS" title="AWS">
<outline type="rss" text="Infrastructure &amp; Automation" title="Infrastructure &amp; Automation" xmlUrl="https://aws.amazon.com/blogs/infrastructure-and-automation/feed/" htmlUrl="https://aws.amazon.com/blogs/infrastructure-and-automation/"/>
<outline type="rss" text="AWS Developer Blog" title="AWS Developer Blog" xmlUrl="http://feeds.feedburner.com/AwsDeveloperBlog" htmlUrl="https://aws.amazon.com/blogs/developer/"/>
@miglen
miglen / check-CVE-2021-3156.sh
Created Jan 27, 2021
Test and patch CVE-2021-3156
View check-CVE-2021-3156.sh
#!/bin/bash
# Test and patch CVE-2021-3156
patch() {
# Simple method to patch with yum | apt
if command -v apt-get >/dev/null; then
sudo apt-get update
sudo apt-get install $1
elif command -v yum >/dev/null; then
sudo yum updateinfo $1
@miglen
miglen / iam_priviledge_escallation_deny_poilcy.json
Created Dec 15, 2020
IAM Policy to deny API actions that could potentially allow privilege escalation.
View iam_priviledge_escallation_deny_poilcy.json
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "DenyPriviledgeEscallationActions",
"Effect": "Deny",
"Action": [
"cloudformation:CreateStack",
"codestar:AssociateTeamMember",
"codestar:CreateProject",
"codestar:CreateProjectFromTemplate",
@miglen
miglen / ec2-instance-prompt.sh
Last active Feb 10, 2021
AWS EC2 Instance Prompt with EC2 ARN Instance Id Public IP Private IP Account Id Region and Instance Name Tag
View ec2-instance-prompt.sh
#!/bin/bash
#
# description: EC2 Instance Prompt
# author: Miglen Evlogiev <github@miglen.com>
#
# deployment: copy this file into /etc/profile.d/ec2-instance-prompt.sh
# sudo wget https://gist.githubusercontent.com/miglen/e2e577b95acf1171a1853871737323ce/raw/ec2-instance-prompt.sh -P /etc/profile.d/
# sudo bash /etc/profile.d/ec2-instance-prompt.sh
#
@miglen
miglen / flyefit.py
Created Aug 25, 2020
Automatic booking of flyefit.ie sessions.
View flyefit.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
from bs4 import BeautifulSoup
"""
The following script books specified sessions for
tomorrow in flyefiet gym web app.
"""
@miglen
miglen / web-servers.md
Created Mar 9, 2019 — forked from willurd/web-servers.md
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@miglen
miglen / natas.md
Last active Nov 14, 2018
OverTheWire - Natas challenge
View natas.md

URL: http://overthewire.org/wargames/natas/ Type: Web

Natas Level 0

curl -s -u natas0:natas0 http://natas0.natas.labs.overthewire.org

The password is hidden in the source-code.

Natas Level 1

@miglen
miglen / news-feeds-eradicator-linkedin.user.js
Last active Apr 25, 2021
News Feed Eradicator for LinkedIn
View news-feeds-eradicator-linkedin.user.js
// ==UserScript==
// @name News Feed Eradicator for LinkedIn
// @namespace http://miglen.com/
// @version 0.4
// @description News Feed Eradicator for LinkedIn
// @author Miglen Evlogiev (hi@miglen.com)
// @match https://www.linkedin.com/*
// @grant none
// @downloadURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
// @updateURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
@miglen
miglen / Kernel-panic-ios-safari.html
Created Sep 17, 2018
Kernel-panic-ios-safari.html
View Kernel-panic-ios-safari.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAA