Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Open.Nat;
namespace ConsoleApplication3
{
class Program
@lontivero
lontivero / bitdump.sh
Created March 26, 2019 18:23 — forked from altamic/bitdump.sh
dumps Bitcoin network traffic
#!/usr/bin/env sh
# bitdump.sh
#
# captures Bitcoin network traffic
SELF=`basename $0`
if [[ $1 = "" ]]; then
DEFAULT="en1"
@lontivero
lontivero / onion_bitcoin
Created April 17, 2019 18:38 — forked from hungryduck/onion_bitcoin
List active .onion bitcoin nodes (Bash)
#!/bin/bash
# Command to get a list of active bitcoin .onion addresses from bitnodes.21.co
curl -s https://bitnodes.21.co/api/v1/snapshots/latest/ | egrep -o '[a-z0-9]{16}\.onion:?[0-9]*' | sort -ru
@lontivero
lontivero / Monoid.cs
Last active July 15, 2020 14:58 — forked from reidev275/Monoid.cs
Monoid and Foldable for C#
public interface Monoid<A>
{
public A Empty => default(A);
A Append(A x, A y);
}
public static class Foldable
{
public static A Fold<A>(this IEnumerable<A> list, Monoid<A> M) =>
list.FoldMap(x => x, M);
@lontivero
lontivero / pentest cheat sheet
Created June 7, 2021 15:35 — forked from githubfoam/pentest cheat sheet
pentest cheat sheet
----------------------------------------------------------------------------------------------------
sudo apt-get install p0f -yqq
p0f -L #LISTENING ALL THE INTERFACES
p0f -i eth0 -p -o /tmp/p0f.log # one interface and logging, -p promiscous mode
p0f -r /tmp/dump.pcap -o dump-result.log # analyze pcap file
----------------------------------------------------------------------------------------------------
#ZIP Password Cracking Windows
>zip2john.exe test.zip > test.hash #generate the hash with zip2john
>type test.hash
>john.exe --pot=test.pot --wordlist=\tmp\wordlists\Passwords\Common-Credentials\10-million-password-list-top-1000000.txt
@lontivero
lontivero / BlockChain.fs
Created September 27, 2021 02:26 — forked from Thorium/BlockChain.fs
Using NBitcoin to create private BlockChain with F# (FSharp)
// This is just an initial example / tech-demo.
#if INTERACTIVE
#I "./../packages/NBitcoin/lib/net45/"
#I "./../packages/Newtonsoft.Json/lib/net45"
#r "NBitcoin.dll"
#r "Newtonsoft.Json.dll"
#else
module BlockChain
#endif
@lontivero
lontivero / SSH Tips
Created October 18, 2021 17:24 — forked from mdemare/SSH Tips
Good SSH tips
1) COPY SSH KEYS TO USER@HOST TO ENABLE PASSWORD-LESS SSH LOGINS. (NOT ON MAC)
ssh-copy-id user@host
To generate the keys use the command ssh-keygen
2) START A TUNNEL FROM SOME MACHINE’S PORT 80 TO YOUR LOCAL POST 2001
ssh -N -L2001:localhost:80 somemachine
@lontivero
lontivero / README.md
Created October 18, 2021 17:26 — forked from jdutta/README.md
Useful tips and tricks

Useful tips and tricks

@lontivero
lontivero / effective-fsharp.md
Created October 22, 2021 13:04 — forked from swlaschin/effective-fsharp.md
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges