The Python security team removed two trojanized Python libraries from PyPI (Python Package Index) that were caught stealing SSH and GPG keys from the projects of infected developers. The two libraries were created by the same developer and mimicked other more popular libraries -- using a technique called typosquatting to register similarly-looking names. The first is "python3-dateutil," which imit
pexpect - Noah.org pexpectとは、PythonでLinux等のexpectコマンドみたいな機能が使えるべんりな野郎です。 インストールとかしなくても、pexpect.pyを入手して同じディレクトリに置けば使えちゃうので導入がめっちゃ手軽なのがポイント。 TelnetとかSSHとかFTPとかをPythonで扱いたい日でもコレで安心! で、今日は日本語の情報が少なめなのと、挙動で悩んだ点があったので自分用メモがてら記録します。 import pexpect # 同じディレクトリに置いたらこれだけで使える。 c = pexpect.spawn("telnet 192.168.0.2") # spawnした時点から、pexpectは入力に対する出力(=stdout?)の内容を内部的に保持する。 c.expect("login: ") # expectした時点で、内部的に保持
最近、とっても便利なPexpectというPythonパッケージを使ってみた。 調べたことをまとめがてら、紹介してみる。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く