Base64エンコードとURLエンコード

 

(22)
https://qiita.com/sawanoboly/items/461605ab86678053dc8f
https://www.kwbtblog.com/entry/2022/10/29/073259

-- 1. Base64エンコードデコード

echo -n "admin:admin" | base64
echo -n "YWRtaW46YWRtaW4=" | base64 -d

-- 2. URLエンコードデコード

sudo apt install jq nkf

echo -n "hoge@://fuga" | jq -Rr '@uri'
echo -n "hoge%40%3A%2F%2Ffuga" | nkf -w --url-input

 

(11)

https://qiita.com/sawanoboly/items/461605ab86678053dc8f
https://www.kwbtblog.com/entry/2022/10/29/073259

-- 1. Base64エンコードデコード

echo -n "admin:admin" | base64
echo -n "YWRtaW46YWRtaW4=" | base64 -d

-- 2. URLエンコードデコード

sudo apt install jq nkf

echo -n "hoge@://fuga" | jq -Rr '@uri'
echo -n "hoge%40%3A%2F%2Ffuga" | nkf -w --url-input

 

(RL8)

https://qiita.com/sawanoboly/items/461605ab86678053dc8f
https://www.kwbtblog.com/entry/2022/10/29/073259

-- 1. Base64エンコードデコード

echo -n "admin:admin" | base64
echo -n "YWRtaW46YWRtaW4=" | base64 -d

-- 2. URLエンコードデコード

dnf --enablerepo=powertools install jq nkf


echo -n "hoge@://fuga" | jq -Rr '@uri'
echo -n "hoge%40%3A%2F%2Ffuga" | nkf -w --url-input

(2022)
https://qiita.com/halpas/items/2296cf611a6370f640a3
https://win.just4fun.biz/?PowerShell/PowerShell%E3%81%A7URL%E3%82%A8%E3%83%B3%E3%82%B3%E3%83%BC%E3%83%89%E3%83%BBURL%E3%83%87%E3%82%B3%E3%83%BC%E3%83%89


-- 1. Base64エンコードデコード
notepad input1.txt
admin:admin

certutil -f -encode input1.txt output1.txt
type output1.txt


notepad input2.txt
YWRtaW46YWRtaW4=

certutil -f -decode input2.txt output2.txt
type output2.txt

-- 2. URLエンコードデコード
powershell

Add-Type -AssemblyName System.Web
[System.Web.HttpUtility]::UrlEncode("hoge@://fuga")

[System.Web.HttpUtility]::UrlDecode("hoge%40%3A%2F%2Ffuga")