Skip to content

Instantly share code, notes, and snippets.

View MrSuicideParrot's full-sized avatar

André Cirne MrSuicideParrot

View GitHub Profile
@MrSuicideParrot
MrSuicideParrot / ssl.go
Created February 6, 2020 20:37
Example of parsing TLS packets using gopacket library with tcpassembly
package main
import (
"bufio"
"encoding/binary"
"fmt"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"github.com/google/gopacket/tcpassembly"
@MrSuicideParrot
MrSuicideParrot / docker_kali_arm.md
Last active December 22, 2020 18:26
Installation of docker-ce on kali arm64

Change the iptables

update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

Install dependecies

apt-get install \
    apt-transport-https \
 ca-certificates \
@MrSuicideParrot
MrSuicideParrot / pack_hex_to_int_arr.py
Last active July 9, 2019 11:40
Convert a packed byte string to an int array in python2
import struct
def pack_hex_to_int_arr(hex_str):
arr = []
for i in hex_str:
arr.append(struct.unpack("B", i)[0])
return arr
if __name__ == "__main__":
test = "\xfcg\xb2I\x00\x00\x00\x00s\x0e@\x00\x00\x00\x00\x00\x18 `\x00\x00\x00\x00\x00\x8c\x06@\x00\x00\x00\x00\x00w\x0c@\x00\x00\x00\x00\x00"
"""
option vendor-encapsulated-options 01:11:68:74:74:70:3A:2F:2F:61:63:73:2E:6D:65:2E:63:6F:6D;
In any case you have to remember the 3 fields: option_code, value_length and value.
In this example we use http://acs.me.com as ACS URL, so our option will contain 0x01 (CWMP option for ACS URL), 0x11 (hex of decimal 17 = length of the URL) then the other 17 bytes forming the URL.
"""
url_to_convert = input('Give me a url: ')
encoded = '01:' + ('%x:' % (len(url_to_convert))).rjust(3,'0') + ''.join([('%x:'%(ord(i))).rjust(2,'0') for i in url_to_convert])[:-1]

Keybase proof

I hereby claim:

  • I am mrsuicideparrot on github.
  • I am mrcirne (https://keybase.io/mrcirne) on keybase.
  • I have a public key ASDHZV1mJ3gGjbYCu5XjzP_Ip2R6Vl0IFJ6AO5Zq_wdX1Ao

To claim this, I am signing this object:

@MrSuicideParrot
MrSuicideParrot / StartMariaDB.sh
Last active August 15, 2017 10:45
Start of MariaDB server for Arch Linux
#!/bin/bash
systemctl start mariadb.service
@MrSuicideParrot
MrSuicideParrot / Resoluções de Base de Dados.md
Last active May 16, 2018 16:43
Resoluções dos exercicios de SQL da cadeira Base de Dados do ano 2017
@MrSuicideParrot
MrSuicideParrot / Wifi-restart.sh
Last active March 29, 2024 14:28
Restart network on kali linux, after use wirless in monitor mode
#!/bin/bash
sudo service networking restart
sudo service NetworkManager restart