hack のためのネタ帳, etc,,,

pip search 出来ずにお困りの方は pypiutil.py をお試し下さい。

状況

Ubuntu 20.04.1 LTS で python3.8 の pip 20.0.2 で search すると xmlrpc.client.Fault で腐る
$ python3 --version
Python 3.8.5
$ pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ pip3 search jupyter
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/search.py", line 52, in run
    pypi_hits = self.search(query, options)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/search.py", line 71, in search
    hits = pypi.search({'name': query, 'summary': query}, 'or')
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1450, in __request
    response = self.__transport.request(
  File "/usr/lib/python3/dist-packages/pip/_internal/network/xmlrpc.py", line 38, in request
    return self.parse_response(response.raw)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1341, in parse_response
    return u.close()
  File "/usr/lib/python3.8/xmlrpc/client.py", line 655, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: 'RuntimeError: This API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. Please use the Simple or JSON API instead.'>

pip3 search xmlrpc.client.Fault Fault 32500: RuntimeError: This API has been temporarily disabled」でググったら以下のページを見つけた。
なんか、 が紹介されてたんだけど、
Update
The XMLRPC Search endpoint is still disabled due to ongoing request volume. As of this update, there has been no reduction in inbound traffic to the endpoint from abusive IPs and we are unable to re-enable the endpoint, as it would immediately cause PyPI service to degrade again. We are working with the abuse contact at the owner of the IPs and trying to make contact with the maintainers of whatever tool is flooding us via other channels.
Posted 2 days ago. Dec 15, 2020 - 20:59 UTC
とかなんとかで、どうも XMLRPC Search endpoint への継続的なアクセスが殺到していて、サービスを止めざるを得ない状況っぽい。

2021-02-04: 追記
pip3 search 出来んの地味に不便なので、pypiutil.sh 書いた。
2021-02-28: 追記
練習がてら、Python3 への移植版 pypiutil.py を書いてみた。

2021-07-06: PyPiSearch_exe

コメント欄で、PyPiSearch_exe なんて物が出回り始めてるみたいな情報をもらったのだが、
  • GitHub / AiueoABC / PyPiSearch_exe
のことだろうか?
誤検出の可能性は残るにしても VirusTotal 先生はこんな状態なのでリンクは外しとく。
strings 取ってみると python37.dll とか文字が混ざってるので .py を .exe 化してそうな雰囲気なんだけど、PyPi なんて Python 使ってない人間は使わないわけだし、Windows 以外の人もいるのになぜ exe 配布なのか意味がわからないよ。
しかもソース付属してないとか、隠す意味。

検索も、このページと GitHub の topics しかひっかからんし、
トレンドもゼロだし、
これ標的型攻撃なんじゃ?

このページへのコメント

pip searchできなくて困っていたので読ませていただきました。
地味に不便ですよね、これ。
GitHubに代替品みたいなの(PyPiSearch_exeみたいなものです)が出回り始めていますが、そっちのもいつか落ちるんじゃないかとヒヤヒヤです。

1
Posted by 名無し(ID:gqrd5qhgFA) 2021年07月02日(金) 10:56:30 返信

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

フリーエリア

管理人/副管理人のみ編集できます