Last active
April 19, 2023 03:17
-
-
Save afshawnlotfi/049180f719825d4c71e209b2a959be38 to your computer and use it in GitHub Desktop.
USBFlasher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
shellPath = input("What is the path of the ISO\n").replace(" ", "") | |
if os.path.isfile(shellPath): | |
deviceNum = input("What is the device number. Refer to README for what this is.\n").replace(" ", "") | |
os.system("hdiutil convert -format UDRW -o write.img " + shellPath) | |
os.system("diskutil unmountDisk /dev/rdisk" + deviceNum) | |
os.system("sudo dd if=write.img.dmg of=/dev/rdisk" + deviceNum + " bs=1m") | |
else: | |
print("This is not a real file") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment