Jump to content

magicdanw

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by magicdanw

  1. On the contrary, I find ASM lots of fun, mostly because of how strange it is to program. It forces the brain to stretch in different ways. I believe Dr. Frankenfurter said it best:
  2. Update: I've found a solution using two vbscript files (because vbscript includes full error handling, it can attempt file operations without risk of an error). Here's my code: This gets added to the beginning of the go.cmd file: wscript test1.vbs if exist test.txt goto end wscript test2.vbs if not exist test.txt goto end del test.txt This gets added to a file called test1.vbs in the same folder as go.cmd: on error resume next dim filesys Set filesys = CreateObject("Scripting.FileSystemObject") If filesys.FileExists("test.txt") Then filesys.DeleteFile "test.txt" This gets added to a file called test2.vbs in the same folder as go.cmd: on error resume next dim filesys Set filesys = CreateObject("Scripting.FileSystemObject") filesys.CreateTextFile "test.txt", True Now, it will work normally when the write-lock switch is off. When write-lock is on, it won't do anything, and no error messages. I hope other people find this code useful for their own projects! :D
  3. Well, if you're interested in making sure files don't get overwritten (or appended), I used this code at the beginning of my file to put all of my files in subfolders of the computername folder, based on the current time and date. That's in case I want to get new info from the same computer. if not exist WIPdump md WIPdump >nul if not exist WIPdump%computername% md WIPdump%computername% >nul set folder=%date:~0,3%_%date:~4,2%_%date:~7,2%_%date:~10%...%time:~0,2%_%time:~3,2% md WIPdump%computername%%folder% >nul cd WIPCMD >nul Then, all of my stuff later on gets stored to WIPdump%computername%%folder% Also, as of now my switchblade won't pwn my pc because of if exist c:safety.txt goto end which checks if a safety.txt is in my c drive, but I'd like the write-protect switch for use on other pcs (ex. I might not want to accidentally set off antivirus on a school computer (at least not under my account :D )). Plus, I just think it's cool to have a physical "safety catch" on my flash drive 8). So, if anyone has any ideas, please let me know! Thanks!
  4. Hi! This is my first post, but I've been reading the forums for a while, and they're great! I've set up my own switchblade, but have been annoyed with plugging it into a computer to just read files and having it automatically pwn the system. I had the idea of using the read-write switch on the drive to serve as a safety catch of sorts, and the batch file could check if the drive is writable. If not, it will exit prematurely. However, my current method of writing to a new file and checking if it exists doesn't work well because windows gives nice big loud popup errors if it's unable to write. Is there any way to make the ">" or "mkdir" or "attrib" commands less "verbose", or is there another way to check if a drive is writeable, all from a batch file/command-line utility? Thanks for your help, and thanks for the great switchblade tutorials!
×
×
  • Create New...