Skip to content

Instantly share code, notes, and snippets.

View makash's full-sized avatar

Akash Mahajan makash

View GitHub Profile
#!/bin/bash
for i in $(cat $1);
do
str2=$(curl -i -s -k -X 'POST' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0' -H 'DNT: 1' -H 'X-Requested-With: XMLHttpRequest' -H 'X-Prototype-Version: 1.6.0' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Referer: http://www.yougetsignal.com/tools/web-sites-on-web-server/' -H 'Origin: http://www.yougetsignal.com' --data-binary $'remoteAddress='$i'&key=' 'http://domains.yougetsignal.com/domains.php' | grep -i "domainCount")
echo $i $str2
done
16716594 n003-000-000-000.static.ge.com
11063439 nothing.attdns.com
4975683 hn.kd.ny.adsl
2683538 static.kpn.net
2647717 localhost
1759131 walmart.com
1098677 unknown.Level3.net
1024262
774367 no-dns-yet.demon.co.uk
528853 no-data
import re
import os
import sys
ip_re = re.compile(r'.* has address .*')
ec2 = re.compile(r'ec2-')
def ip_to_ec2(ip):
output = os.popen('host ' + ip).read()
hostname = output.split(' ')[4].rstrip()

Disclaimer

Everything I'm talking about below is not new, but I thought it was an interesting idea and realized I already had the majority of pieces in place to play with it. I want to share what I learned. If you are at all interested in exploring this topic further a good paper on it is here. Also, a few years ago IOActive published a blog post on the technique which is also a good read. Finally, the last two paragraphs in section 6 of RFC5246 clearly document the problem the best I've been able to find:

Any protocol designed for use over TLS must be carefully designed to
deal with all possible attacks against it.  As a practical matter,
this means that the protocol designer must be aware of what security
properties TLS does and does not provide and cannot safely rely on
the latter.
@makash
makash / pandoc-newpage.pl
Created February 23, 2017 11:05 — forked from bpj/pandoc-newpage.pl
Pandoc filter which converts LaTeX \newpage commands into appropriate pagebreak markup for other formats.
#!/usr/bin/env perl
# Pandoc filter which converts paragraps containing only the LaTeX \newpage
# command into appropriate pagebreak markup for other formats.
#
# You will need perl version 5.10.1 or higher <https://www.perl.org/get.html>
# (Strawberry Perl recommended on Windows!)
# and a module installer <http://www.cpan.org/modules/INSTALL.html>
# and the Pandoc::Elements module version 0.33 or higher
# <https://metacpan.org/pod/Pandoc::Elements>
@makash
makash / purge.sh
Created July 18, 2017 16:30 — forked from adrienbrault/purge.sh
Script to reduce VM size before packaging for vagrant
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5

Setup Work

  • Make a list of competitive/alternative services: See competitors.md file
  • Set up Google News alerts for "side project marketing" and "startup marketing".
  • Make list of blogs, subscribe to RSS feeds in Feedbin:
    • Startup marketing blogs
    • Side project blogs
    • Small business marketing blogs
    • Chicago small business/startup bloggers
  • Come up with a name and domain name
@makash
makash / getting-started-with-hashicorp-vault-in-simple-steps.md
Last active October 24, 2017 09:19
A gentle introduction to getting Hashicorp Vault up and running.

Install Vault

Download Vault

wget https://releases.hashicorp.com/vault/0.8.3/vault_0.8.3_linux_amd64.zip

Install unzip package and unzip the package

apt install unzip
unzip vault_0.8.3_linux_amd64.zip

Move vault to path

Security Tools for AWS

I often get asked which tools are good to use for securing your AWS infrastructure so I figured I'd write a short listof some useful Security Tools for the AWS Cloud Infrastructure.

This list is not intended be something completely exhaustive, more so provide a good launching pad for someone as they dig into AWS and want to make it secure from the start.

Open Source

Auth

@makash
makash / How to build a notification feed.md
Created November 22, 2020 14:46 — forked from tbarbugli/How to build a notification feed.md
How to build a notification feed using Stream

How to build a notification feed using Stream

Introduction

In this tutorial we are going to show how easy it is to build a notification feed using GetStream.io. First of all, let's quickly introduce you to our fictional example app. It's called bug-your-friends.com and allows you interact with your friends, ping them, follow them or poke them. Here's a quick list of example interactions:

  • poke another user (eg. Thierry pokes Alessandra)
  • follow a user (eg. Tommaso follows Iris)
  • ping a user (eg. Josie pings Carolina)

Whenever a user is part of one of these interactions, we want to update his notification feed, update the number of unseen and unread