Skip to content

Instantly share code, notes, and snippets.

Setting Up a Python Virtual Environment (venv) on a Mac

  1. Install Python (if not already installed)

Check if Python is installed:

python3 --version
@grantpullen
grantpullen / tunnel.md
Created April 3, 2019 09:33
tunnel ssh shuttle

author: Grey-Matter

Pivoting And Port Forwarding

Forwarding and Pivoting can be a confusing topic. I still get headache's sometimes trying to keep track of what i did to get to this port, and how im gonna get a reverse shell back to that subnet and whatnot. This is just a quick writeup attempting to show the differences in the main types of forwards and pivots, as well as what works for me.

For the purpose of this tut, im gonna set a few static ip's that ill stick with til the end

LHOST = 192.168.1.1

@grantpullen
grantpullen / modal.scss
Created September 25, 2019 05:00
Style modal-content of NgbModal / @ng-bootstrap/ng-bootstrap modal (background, border etc)
/* not it using @nebular, this must reside outside of @include nb-install-component() {..} */
::ng-deep .modal-content {
/* change border */
border: none;
/* change background */
background-color: red !important;
}
@grantpullen
grantpullen / KannelDLR.md
Last active September 3, 2023 20:29
Kannel DLR information and how it maps to SMPP return values.

SMSPP Delviery Reports and Kannel

This info page relates to the DLR values which are returned by kannel when requesting DLR. Some SMPP related information is also listed for reference.

dlr-mask

This [send-sms][1] parameter is used to request for delivery reports with the state of the sent message. This requires the [dlr-url][1] on sendsms-user group or use the dlr-url CGI variable to be set. The value is a bit mask composed of:

Value Description
@grantpullen
grantpullen / fastdelete.bat
Last active May 22, 2023 03:19
Windows 10 fast delete
@echo off
echo Delete Folder: %CD%
setlocal
:PROMPT
set /P AREYOUSURE=Are you sure (Y/[N])?
if /I "%AREYOUSURE%" NEQ "Y" goto END
echo Removing Folder: %CD%
set FOLDER=%CD%
cd /
@grantpullen
grantpullen / free_email_provider_domains.txt
Created September 18, 2020 10:31 — forked from okutbay/free_email_provider_domains.txt
Most complete list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0039.cf
0039.ga
0039.ml
007addict.com
00b2bcr51qv59xst2.cf
00b2bcr51qv59xst2.ga
00b2bcr51qv59xst2.ml
020.co.uk
02466.cf
02466.ga
@grantpullen
grantpullen / Kannel with Postgresql DLR storage.md
Created June 24, 2019 12:15
Kannel with Postgresql DLR storage

Kannel with Postgresql DLR storage

Create the dlr table in PostgreSQL

  • Must add WITH OIDS to the CREATE statment since kannel expects old PostgreSQL behaviour.
  • Optionally add extra column created_at to keep track of old DLR. DLR entries are automatically removed by kannel once the final dlr is received from the SMSC. In cases where this message is not received, the DLR will not be removed. A cron job can be setup to remove old DLR by comparing the current time to created_at.
CREATE TABLE dlr (
    smsc        VARCHAR(48),
    ts          VARCHAR(48),
    destination VARCHAR(48),
@grantpullen
grantpullen / css-selectors.md
Created April 26, 2021 07:25 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;

Display live HTTP traffic to console on a specified port for all interfaces

tcpdump -A -i any 'port 1333 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'

The example above captures all TCP traffic at port 133 and filter out the TCP session setup (SYN / FIN / ACK)

  • -A Print each packet (minus its link level header) in ASCII. Handy for capturing web pages.
  • -i any Include all interfaces
  • port 1333 Only look at TCP traffic to/from port 1333
  • (((ip[2:2] - ((ip[0]&amp;0xf)&lt;&lt;2)) - ((tcp[12]&amp;0xf0)&gt;&gt;2)) != 0) filter out the TCP session setup (SYN / FIN / ACK)
@grantpullen
grantpullen / linux_build.bat
Created December 20, 2019 08:33
Save git build info in Golang linux exec built within Windows
set GOARCH=amd64
set GOOS=linux
set NOW=%date% %time%
rem save the results from 'git describe --tags --dirty --always' to variable 'GINFO'
for /f %%i in ('git describe --tags --dirty --always') do set GINFO=%%i
rem set var GitInfo & var BuildDate in the go code
go build -ldflags "-X 'main.GitInfo=%GINFO%' -X 'main.BuildDate=%NOW%'" -o ./bin/gw