Instantly share code, notes, and snippets.

Ido Kanner ik5

  • :::1
View GitHub Profile
View config
Host *
ControlPath ~/.ssh/sockets/master-%l-%r@%h:%p
ControlMaster auto
ServerAliveInterval 25
Compression yes
IdentityFile ~/.ssh/id_rsa
#ControlPersist yes
UseRoaming no
View checksum.go
package main
import (
// CalcChecksum takes a slice of bytes and calculate it as a checksum
// it is using SHA512 for that (128 bytes for result)
func CalcChecksum(buff []byte) []byte {
View peek.go
package utils
import (
// PeekReadCloser return a copy of a reader without loosing the original content
View wav_duration.go
package main
import (
View testing_hash_functions.go
package main
import (
#!/usr/bin/env python3
Example on how to do TCP port scanner in Python
import socket
def scan(address, port, timeout=3):
'''TCP Port Scanner'''
#!/usr/bin/env perl
use warnings;
use strict;
use v5.20;
use IO::Socket::INET;
use experimental qw( switch );
View scan.go
package main
import (
const (
View index.js
.then((data) => { return data.json() } )
.then((data) => { console.table(JSON.stringify(data)) } )
.catch((err) => { console.error(err) } )
View scan.rb
#!/usr/bin/env ruby
require 'socket'
def tcp_connect(address, port, timeout: 20)
# making sure we are talking with IP
connected = false
addr = Socket.getaddrinfo(address, nil)
sock_addr = Socket.pack_sockaddr_in(port, addr[0][3])[0][0]), Socket::SOCK_STREAM, 0).tap do |socket|