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 \
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" |
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 \
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] |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
systemctl start mariadb.service |
#!/bin/bash | |
sudo service networking restart | |
sudo service NetworkManager restart |