Skip to main content
Copy edited (e.g. ref. <https://en.wikipedia.org/wiki/Microsoft_Windows> and <https://en.wikipedia.org/wiki/Calculator_(Windows)>) - name of the executable is "calc.exe" (ref. <https://en.wikipedia.org/wiki/Calculator_(Windows)#Windows_10>). Added some context.
Source Link

You should have seen the windows calculatorthe Windows calculator pop up. If you didn't, I've screwed up that filename somewhere, which makes my point a little weaker, but fairly modest tweaks would still cause this vulnerability. In brief, your code would ultimately execute:

You should have seen the windows calculator pop up. If you didn't, I've screwed up that filename somewhere, which makes my point a little weaker, but fairly modest tweaks would still cause this vulnerability. In brief, your code would ultimately execute:

You should have seen the Windows calculator pop up. If you didn't, I've screwed up that filename somewhere, which makes my point a little weaker, but fairly modest tweaks would still cause this vulnerability. In brief, your code would ultimately execute:

deleted 18 characters in body
Source Link
ymbirtt
  • 840
  • 5
  • 10

Do not useRemove your reliance on scary functions like os.system at all

You almost never need to execute shell commands for your code to do things - shell commands are usually just wrappers for much simpler and cleaner APIs. If you're interfacing with some third-party application, just type "name of application python API" into your favourite search engine and use that where possible. It'll be much easier and much safer.

Do not use scary functions like os.system at all

You almost never need execute shell commands for your code to do things - shell commands are usually just wrappers for much simpler and cleaner APIs. If you're interfacing with some third-party application, just type "name of application python API" into your favourite search engine and use that where possible. It'll be much easier and much safer.

Remove your reliance on scary functions like os.system

You almost never need to execute shell commands - shell commands are usually just wrappers for much simpler and cleaner APIs. If you're interfacing with some third-party application, just type "name of application python API" into your favourite search engine and use that where possible. It'll be much easier and much safer.

edited body
Source Link
ymbirtt
  • 840
  • 5
  • 10

They'd expect that this would cause the file input toby the user to be moved to the backup directory. All fine.

They'd expect that this would cause the file input to the user to be moved to the backup directory. All fine.

They'd expect that this would cause the file input by the user to be moved to the backup directory. All fine.

Source Link
ymbirtt
  • 840
  • 5
  • 10
Loading