乱数は擬似乱数で十分なので、seedは /dev/urandom
を用いる。
- 文字種はtrで制御
- 文字数はfoldコマンドで
- 行数はheadで
$ cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 8
Qz5D4Ddy0CUTk7mU
FLbxZE5pls5tLCaJ
#!/usr/bin/python3 | |
import urllib.parse | |
import dns.resolver | |
import sys | |
with open(sys.argv[1]) as f: | |
for url in f: | |
url = url.strip() | |
parsed_url = urllib.parse.urlparse(url) |
乱数は擬似乱数で十分なので、seedは /dev/urandom
を用いる。
$ cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 8
Qz5D4Ddy0CUTk7mU
FLbxZE5pls5tLCaJ
# NETCRAFT IP RANGES | |
194.52.68.0-194.52.68.255 | |
194.72.238.0-194.72.238.255 | |
83.138.182.72-83.138.182.79 | |
83.138.189.96-83.138.189.103 | |
81.91.240.0-81.91.255.255 | |
89.36.24.0-89.36.31.255 | |
83.222.232.216-83.222.232.218 | |
184.172.0.0-184.173.255.255 |
jq -c < sample.json | jq -r "[.ip, .country, .city]|@csv" |
このリストは、2020年東京都知事選挙において、東京都選挙管理委員会が不用意に取得し放置したドメイン 2020tochijisen.tokyo へ2021年5月19日現在リンクしている投稿の一覧です。ドメインが期限切れ(Expire)することにより、第三者にドメインが取得され、リンク先で何かしらの被害を受ける可能性があります。
なお本件は、「東京都選挙管理委員会のずさんなドメイン取得およびWebサイト運用」だけが問題であり、これらの方へ何らかの非難を表明するものではありません。また個人が片手間に検索して抜き出したもののため、ヌケなどあると思います。そこに政治的意図などはありません。
何が問題なのかは、「主に東京都選挙管理委員会の方へ:政府・地方公共団体はドメインをどう取るべきか」にまとめてありますのでご一読ください。
#!/usr/bin/python3 | |
import urllib.request | |
import json | |
baseurl="http://10.10.169.100:3000/" | |
str="" | |
for i in range(20): | |
with urllib.request.urlopen(baseurl + str) as f: |
#!/bin/sh | |
for filename in *.png | |
do | |
convert "${filename}" -crop 1080x1850+0+70 "s-${filename}" | |
done |
I hereby claim:
To claim this, I am signing this object:
#include <stdio.h> | |
#include <dirent.h> | |
int main(int argc, char *argv[]) | |
{ | |
DIR *dir; | |
struct dirent *dentry; | |
dir = opendir(argv[1]); | |
while (dentry = readdir(dir)) { |
#!/usr/bin/python | |
strarr="56 55 62 56".split() | |
result="" | |
for code in strarr: | |
# result += chr(int(code, base=16)) | |
result += chr(int(code)) | |
print(result) |