Saturday, August 01, 2020

Tuesday, June 23, 2020

Wednesday, March 25, 2020

mysqldump

#dump
mysqldump -uroot -p database -r utf8.dump

#dump the schema
mysqldump -uroot -p --no-data database -r utf8.dump

#import
mysql -uroot -p --default-character-set=utf8 database
mysql> SET names 'utf8'
mysql> SOURCE utf8.dump

Wednesday, March 11, 2020

Secure DNS, DNS over HTTPS

Open Firefox and type: about:config
filter with: network.trr.* and set the following values:
network.trr.mode value 3
network.trr.bootstrapAddress and set value as one ip from this page 'https://dns.google/query?name=mozilla.cloudflare-dns.com' (mine value is currently 104.16.249.249)
now open a new tab to this page ('https://www.cloudflare.com/ssl/encrypted-sni/') used to verify if everything is working. You should have all green except sni. To make all green you should
switch tab and go back to config page
change filter with: network.security.* and set:
network.security.esni.enabled value true
go back to previous tab and refresh. You should have all green.


If it's only a few domains you can add exceptions in about:config.
network.trr.excluded-domains = localhost,mythings.com



Phishing with Unicode Domains
network.IDN_show_punycode => true

test with https://www.xn--80ak6aa92e.com

Monday, February 17, 2020

JsStacks and MicroTasks, Can you guess the order of the prints?

~/Downloads/text.hmtl.html
<!DOCTYPE html>
<html>
<body>
<button id="myBtn">Try it</button>
<script>
button=document.getElementById("myBtn")
button.addEventListener("click", function(){
   Promise.resolve().then(()=>console.log('Microtask 1'));
   console.log('1');
});
button.addEventListener("click", function(){
 Promise.resolve().then(()=>console.log('Microtask 2'));
   console.log('2');
});
//button.click(); //not the same as click from the user... ..JsStacks and MicroTasks
</script>
</body>
</html>

Sunday, February 16, 2020

Format and Order docker ps

docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" | (read -r; printf "%s\n" "$REPLY"; sort -k 2 )

How to revert comments Youtube layout?

#see video for details  https://www.youtube.com/watch?v=J0L_nYtNlqs #uBlock Origin  https://chrome.google.com/webstore/detail/ublock-o...