Skip to content

Instantly share code, notes, and snippets.

@sighmin
sighmin / Loops and Functions Go Tour Exercise
Last active August 21, 2019 18:39
Go tour sqrt VS newton's method: http://tour.golang.org
package main
import (
"fmt"
"math"
)
func Newt(x float64) float64 {
if x == 0 { return 0 }
z := 1.0
@yenthanh132
yenthanh132 / godaddy_2step_pincode_bruteforce.go
Created October 8, 2018 04:12
Source code to brute force the pin code for Godaddy's 2-step authentication, written in Golang by Thanh Le
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
"math/rand"
"time"
)
"""
This script is a wrapper around veracrypt and zim that makes it easy to work
with notebooks that reside inside a veracrypt container.
The script does three things:
1) Mounts a veracrypt container to a target location.
2) Runs a zim notebook, intended to be located in the mounted partition.
3) Unmounts the partition when either Zim or this script exits.
Note: sudo session from mount might have expired. Be prepared to re-insert
sudo password.
@teusink
teusink / fake-email-domains.txt
Last active June 19, 2020 07:51
Domains with malicious or phishing intent by mimicing domains from real email services
# Domains with malicious or phishing intent by mimicing domains from real email services
# Examples: example domains (RFC 2606 & 6761) and fake domains that spoof real domains used for email services
address.local
cacema.nl
casama.nl
example.com
example.net
example.org
gmail.nl
gmial.com
@pry0cc
pry0cc / cold
Created August 13, 2020 22:23
A quick script to generate an on-the-fly CSV of resolved assets. Useful for generating asset discovery lists.
#!/bin/bash
(echo "Subdomain,IP,Region,Country,Organization,Netblock,Link Type" && while read line; do ip=$(echo $line| cut -d " " -f 2); name=$(echo $line | cut -d " " -f 1); echo -n "$name,"; echo $ip | ipi '[.ip,.city,.region,.country,.company.name,.asn.name,.asn.route,.asn.type] | @csv'; done) | tee -a assets.csv

How to store all the bug bounty assets like domains, ip addresses, etc. in file and automatically check for the any 0day vuln that comes into the market?

Here is a simple approach that might work for you. Perform reconnaissance as you would typically do and collect hosts and targets. Next, find an application running the target software or setup a local instance. Gather strings that would easily allow you to discern the piece of software from other applications (e.g. with GitLab this may be _gitlab_session). With that small list of keywords in hand, fingerprint all hosts by requesting the index page using a tool such as meg by @TomNomNom and then grepping for the strings. Make sure to then store your findings in a structured fashion that allows you to query applications running that software in future. I primarily use text files in folders for this purpose but I know of others who prefer to store everything in a database.

@teusink
teusink / consumer-email-domains.txt
Last active September 1, 2020 07:42
Domains used for email by consumers and consumer ISPs
# Domains used for email by consumers and consumer ISPs
# Included: General email providers, and Dutch and Belgium consumer ISPs
#
# GENERAL EMAIL PROVIDERS
aol.com
compuserve.com
cs.com
gmail.com
googlemail.com
hotmail.com
@yosriady
yosriady / _disqus_thread.html.erb
Last active October 17, 2020 15:14
Disqus Thread on Rails Turbolinks (AJAX) application
<div id="disqus_thread"></div>
<script type="text/javascript">
if(typeof DISQUS === "undefined"){
var disqus_shortname = 'your_shortname'; // required: replace example with your forum shortname
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
@nerboda
nerboda / elastic_search_query.rb
Last active October 28, 2020 03:46
Elastic Search Query
class << self
def query(params)
listings = self.active_record_search(params) # filter by other parameters first
# return right there if search is blank
return listings.page(params[:page]) if params[:search].blank?
# otherwise pass already filtered set to elastic search for further filtering
listing_ids = listings.pluck(:id)
self.elastic_search(params, listing_ids)
@ironicbadger
ironicbadger / etc-telegraf-telegraf.conf
Last active March 12, 2021 00:09
grafana dashboard
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.