You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Hayabusa is a Windows event log fast forensics timeline generator and threat hunting tool created by the Yamato Security group in Japan. Hayabusa means "peregrine falcon" in Japanese and was chosen as peregrine falcons are the fastest animal in the world, great at hunting and highly trainable. It is written in memory-safe Rust, supports multi-threading in order to be as fast as possible and is the
python-tips.py P�xת� #!/usr/bin/env python import datetime import argparse from tqdm import tqdm def log(*args): msg = ' '.join(map(str, [datetime.datetime.now(), '>'] + list(args))) print(msg) with open('log.txt', 'at') as fd: fd.write(msg + '\n') def main(): psr = argparse.ArgumentParser() args = psr.parse_args() print('hello!', args) if __name__ == '__main__': main()
自分で小さいツールを作る時に心に留めているtipsです. 書き始めたときは「どうせ書捨てだし」と思って書き始めると意外と長い間,もしくはいろんなところで使うことになったりするので,気をつけておくと後から楽になるというような小技です.大規模なソフトウェアの開発ではまた違った流儀があると思います. メインルーチンを関数にする 関数名はなんでもいいのですが,自分は趣味で main() という名前の関数を用意し,メインルーチンは全てそこに書くようにしています. pythonの小さなサンプルコードを見たりすると関数外の部分にベタで実行コードが書かれていたりします.もちろんそれでも動くのですが,以下の2点で後々面倒になることがあります. グローバル変数だらけになり管理が追いつかなくなる:「どうせ小さなスクリプトだし」ではじめると最初は見通しが良くてもだんだんどこでどの変数名を使っているか分からなくなっ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く