POST Form Data with Curl
curl -X POST https://reqbin.com/echo/post/form -H "Content-Type: application/x-www-form-urlencoded" -d "param1=value1¶m2=value2"
References
https://reqbin.com/req/c-sma2qrvp/curl-post-form-example
curl -X POST https://reqbin.com/echo/post/form -H "Content-Type: application/x-www-form-urlencoded" -d "param1=value1¶m2=value2"
References
https://reqbin.com/req/c-sma2qrvp/curl-post-form-example
pyinstaller.exe --onefile --windowed app.py
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
To make the change permanent open the /etc/fstab
file and append the following line:
/swapfile swap swap defaults 0 0
sudo swapon --show
sudo free -h
References
https://linuxize.com/post/create-a-linux-swap-file/
Get a root shell
sudo -s
check what else is possibly already listening to port 53
ss -lp 'sport = :domain'
systemctl stop systemd-resolved systemctl disable systemd-resolved
ss -lp 'sport = :domain'
Download and run dnscrypt-proxy
Download dnscrypt-proxy here: dnscrypt-proxy binaries.
cp example-dnscrypt-proxy.toml dnscrypt-proxy.toml
./dnscrypt-proxy
Change the system DNS settings
apt-get remove resolvconf
cp /etc/resolv.conf /etc/resolv.conf.backup
rm -f /etc/resolv.conf
And create a new /etc/resolv.conf
file with the following content:
nameserver 127.0.0.1 options edns0
Install the proxy as a system service
./dnscrypt-proxy -service install
./dnscrypt-proxy -service start
./dnscrypt-proxy -service stop
./dnscrypt-proxy -service restart
./dnscrypt-proxy -service uninstall
Want to check that DNS resolution works?
./dnscrypt-proxy -resolve example.com
Connect to 1.1.1.1 using DoH clients
Add cloudflare
and cloudflare-ipv6
to the server list in dnscrypt-proxy.toml
:
server_names = ['cloudflare', 'cloudflare-ipv6']
References
https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Installation-linux
https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/dns-over-https-client/
string jsonFormatted = JValue.Parse(json).ToString(Formatting.Indented);
string jsonFormatted = JToken.Parse(json).ToString(Formatting.Indented);
References
https://weblog.west-wind.com/posts/2015/mar/31/prettifying-a-json-string-in-net
https://stackoverflow.com/questions/54816674/how-to-write-a-json-file-in-pretty-format-using-net
The hosts file is a way to map hostnames to IP addresses. This is very important with certain setups and to make networking on Linux a bit easier. In a sense, the hosts file acts as a local DNS server.
sudo nano /etc/hosts
For example, to block Wikipedia, you’d type (remembering to use the Tab key rather than Space):
127.0.0.1 wikipedia.org
or static dns lookup for hostnames
198.20.14.51 example.com
References
https://www.makeuseof.com/tag/modify-manage-hosts-file-linux/
The reason is if you “shutdown” does not actually shut down most of the time in Windows, but only hibernates.
Unmount the Ntfs partition by running
sudo umount -a
to get the partition to mount with full read/write access
sudo ntfsfix /dev/sdaxx #(for example /dev/sda3)
References
https://superuser.com/questions/1394263/ntfs-file-system-read-only-by-ubuntu-remount-doesnt-work
PowerShell :
[System.Net.Dns]::GetHostEntry('google.com').AddressList.IPAddressToString
References
https://www.kjctech.net/powershell-tip-how-to-get-all-ips-assigned-to-a-dns-domain/
dig a google.com
dig a google.com +short @8.8.8.8
References
https://superuser.com/questions/152576/how-to-get-all-ips-of-a-domain
https://superuser.com/questions/847575/how-do-i-find-all-known-ips-for-a-given-domain-in-linux
You can force a flush of all cached DNS records using the following command:
ipconfig /flushdns
a list of all the records in your cache along with their TTL by executing the following command at the command prompt:
ipconfig /displaydns
References
https://superuser.com/questions/80744/how-often-does-the-dns-cache-clear