Skip to content

Instantly share code, notes, and snippets.

View cmbaughman's full-sized avatar
🧐
I may be slow to respond.

Chris Baughman cmbaughman

🧐
I may be slow to respond.
View GitHub Profile
@cmbaughman
cmbaughman / NewGoogleDorks.md
Last active February 27, 2023 22:07
New Google Dorks for open directories.

Open Directories


Ebooks examples

Paste this in the search box or use the URL that follows:

+(.MOBI|.CBZ|.CBR|.CBC|.CHM|.EPUB|.FB2|.LIT|.LRF|.ODT|.PDF|.PRC|.PDB|.PML|.RB|.RTF|.TCR) PUT EBOOK NAME HERE intitle:"index of" -inurl:(jsp|pl|php|html|aspx|htm|cf|shtml) -inurl:(listen77|mp3raid|mp3toss|mp3drug|index_of|wallywashis)
@cmbaughman
cmbaughman / compromisejs-name.js
Last active January 29, 2023 23:07
Using Compromise.js to get name formats right.
const nlp = require("compromise");
const nameParser = require("name-parser");
// Function to determine the name format
function determineNameFormat(name) {
// Patterns to match different name formats
const firstLast = nlp(name).match("#Honorific #FirstName #LastName").out("array");
const lastFirst = nlp(name).match("#LastName, #FirstName #Honorific").out("array");
const middleName = nlp(name).match("#FirstName #MiddleName #LastName").out("array");
const middleInitial = nlp(name).match("#FirstName #MiddleInitial #LastName").out("array");
@cmbaughman
cmbaughman / README.md
Created January 29, 2023 02:31
The JavaScript feature, Generators

Here is an example of using JavaScript generators to handle multiple HTTP requests in a sequential manner:

const fetch = require("node-fetch");

function* fetchUsers() {
  const user1 = yield fetch("https://jsonplaceholder.typicode.com/users/1");
 const user2 = yield fetch("https://jsonplaceholder.typicode.com/users/2");
@cmbaughman
cmbaughman / crowdsec-commands.md
Last active December 19, 2022 18:03
Crowdsec Commands

Useful Crowdsec Commands

Update

cscli hub update && cscli hub upgrade

Restart

systemctl restart crowdsec
@cmbaughman
cmbaughman / fail2ban.md
Created December 13, 2022 16:49
Set up fail2ban

Configure fail2ban

Install

sudo apt install fail2ban

Activate the service (so that after reboot it runs)

sudo systemctl enable fail2ban.service

Create

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

@cmbaughman
cmbaughman / ssh-password.md
Created April 27, 2020 20:39
SSH Passwords

How to set up passwordless ssh,scp, and rsync

Setup

  1. Install the application sshpass:
sudo apt install sshpass
  1. Make sure to set in your ~/.ssh/config file the following options to prevent ssh from using your pubkey:
@cmbaughman
cmbaughman / PublicPasswordsTrello.md
Created May 20, 2018 13:10
Security research Trello

Vulnerable companies using Trello for Private Data

Some folks I believe are under the impression that Trello and other apps like it are more private than they are. These are some Google queries as a proof of concept, that demonstrate the issue. Note: Need to look into the Trello security settings to see if there is a sufficient work-around.

In a Google search:

@cmbaughman
cmbaughman / psqlrc
Created December 30, 2014 00:56
From dotfiles, an awesome psql startup config!
-- Official docs: http://www.postgresql.org/docs/9.3/static/app-psql.html
-- Unofficial docs: http://robots.thoughtbot.com/improving-the-command-line-postgres-experience
-- Don't display the "helpful" message on startup.
\set QUIET 1
\pset null '[NULL]'
-- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
-- PROMPT2 is printed when the prompt expects more input, like when you type
@cmbaughman
cmbaughman / ListEvents.md
Created April 26, 2017 21:16
List all events on element with vanilla Javascript
  Element.prototype._addEventListener = Element.prototype.addEventListener;
  Element.prototype.addEventListener = function(a,b,c) {
    if(c==undefined)
      c=false;
    this._addEventListener(a,b,c);
    if(!this.eventListenerList)
      this.eventListenerList = {};
    if(!this.eventListenerList[a])
@cmbaughman
cmbaughman / cloudflare.vpn.md
Last active August 3, 2022 12:17
Cloudflare VPN IPv4 Addresses to block

Keeping a list here of automated attack IPs that use the cloudflare VPN. These are used by automated vulnerability scaners. Fuck those assholes.

173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20