Re:Malicious software libraries found in PyPI posing as well...
by sdiepend on Friday September 15, 2017 @07:32AM
(#15256218)
Related to this? http://incolumitas.com/2016/06/08/typosquatting-package-mana...
[ Parent
| on HN ]
Re:Malicious software libraries found in PyPI posing as well...
by xnyhps on Friday September 15, 2017 @08:44AM
(#15256625)
That one is even more malicious, it uploads contents of your ~/.bash_history and system profile. But at least it notifies you afterwards...
Re:Malicious software libraries found in PyPI posing as well...
by edraferi on Friday September 15, 2017 @09:54AM
(#15257148)
Yes, but they do filter bash_history client side, only transmitting pip-related commands. They did this to find additional common typos. The relevant code:
def get_command_history():
if os.name == 'nt':
# handle windows
# http://serverfault.com/questions/95404/
#is-there-a-global-persistent-cmd-history
# apparently, there is no history in windows :(
return ''
elif os.name == 'posix':
# handle linux and mac
cmd = 'cat {}/.bash_history | grep -E "pip[23]? install"'
return os.popen(cmd.format(os.path.expanduser('~'))).read()