-1

So I made an HWID Spoofer with python! Here's an example:

import urllib.request
urllib.request.urlretrieve(url, 'C:/Program Files/changer.bat')
urllib.request.urlretrieve(url, 'C:/Program Files/mac_changer.py')

My main python program is in desktop. Now, I need to call the bat file and other necessary python files from a different directory. How do I do that??

I have tried os.system - tho it works only for the current directory only so does the exec command!

Please help!

SDG8
  • 59
  • 1
  • 8
  • 2
    Does this answer your question? [Fetch a file from a local url with Python requests?](https://stackoverflow.com/questions/10123929/fetch-a-file-from-a-local-url-with-python-requests) –  Jul 07 '20 at 16:30
  • Does this [post](https://stackoverflow.com/questions/4230725/how-to-execute-a-python-script-file-with-an-argument-from-inside-another-python) answer your question? – Balaji Ambresh Jul 07 '20 at 16:31
  • @Daniil Thanks for the quick reply unfortuantely no :-( – SDG8 Jul 07 '20 at 16:35
  • @BalajiAmbresh Thank for the real quick reply, I believe that answered my question, I'll give it a try now :-) – SDG8 Jul 07 '20 at 16:35

1 Answers1

0

Try running os.chdir(path) before youre running os.system os.chdir changes the working directory.

example:

os.chdir("C:/Program Files/");
os.system("changer.bat");
raizo
  • 144
  • 2
  • 7