class SidBinTest{ public static void Main(){ byte[] array = new byte[28]; SecurityIdentifier user = new SecurityIdentifier("S-1-5-21-2947568794-2193893069- 2968809547-1000"); user.GetBinaryForm(array, 0); for(int i = 0; i < 28; i++){ Console.Write(String.Format("{0:x2}", array[i])); } } }
z0-9+/]{2}==)$" > base64_all.txt これだけでは26万行ほど抽出されるので,重複の削除と,短すぎ る結果と長すぎる結果の削除を行う 27 f = open('base64_all.txt’, ‘r’) g = open(‘base64_all_filtered.txt', 'w') base64_list = [] while True: line = f.readline() if line == ‘’: break if base64_list.count(line) == 0 and 16 <= len(line) <= 160: base64_list.append(line) for line in base64_list: g.write(line) f.close() g.close()