Search found 907 matches

by ShadowThief
07 Oct 2018 12:47
Forum: DOS Batch Forum
Topic: Reading file with special characters
Replies: 3
Views: 1330

Re: Reading file with special characters

You can also shorten your original code to @echo off setlocal enabledelayedexpansion for /f "tokens=1-3,*" %%A in (_HashList.tmp) do ( if "%%A"=="MD5" ( set "email_name=%%D" set "email_name=!email_name:~0,-1!" ) else ( if not "%%A"=="CertUtil:" ( set "email_hash=%%A" >>z:\utilities\_HashDatabase.tmp...
by ShadowThief
07 Oct 2018 12:23
Forum: DOS Batch Forum
Topic: Reading file with special characters
Replies: 3
Views: 1330

Re: Reading file with special characters

If you don't mind regenerating the hashfiles, I've thrown together something that will automatically get the MD5 of the emails and put it in the format you wanted without the need for a temporary file. @echo off setlocal enabledelayedexpansion if "%~1"=="" goto :Usage for %%A in (%*) do ( set "email...
by ShadowThief
29 Sep 2018 09:44
Forum: DOS Batch Forum
Topic: Source code for MS-DOS v1.25 and v2.0
Replies: 2
Views: 1556

Re: Source code for MS-DOS v1.25 and v2.0

Fascinating. I wish I spoke assembly.
by ShadowThief
27 Sep 2018 18:56
Forum: DOS Batch Forum
Topic: bin2enc.cmd - Native .CAB & Self-Extracting Scripts
Replies: 10
Views: 3177

Re: MakeCab, CertUtil, & Expand... best file embedding?

Yeah, when I use the script, I generally stick everything in one folder and then just pass that folder as an argument instead of trying to handle multiple files as multiple parameters simultaneously.
by ShadowThief
26 Sep 2018 21:24
Forum: DOS Batch Forum
Topic: For loop doesn't work
Replies: 4
Views: 1335

Re: For loop doesn't work

You recursively unset the hidden attribute on all desktop.ini files on line 5, but then you explicitly specify to only delete hidden files on line 7. Get rid of the /A:H from your del statement and it should work.
by ShadowThief
24 Sep 2018 20:38
Forum: DOS Batch Forum
Topic: bin2enc.cmd - Native .CAB & Self-Extracting Scripts
Replies: 10
Views: 3177

Re: MakeCab, CertUtil, & Expand... best file embedding?

I wrote something a while ago that works reasonably well, but I'm sure somebody will find some edge cases that I missed. ::------------------------------------------------------------------------------ :: Generates a cabinet file from a provided folder that contains all other files :: and subfolders...
by ShadowThief
06 Sep 2018 21:20
Forum: DOS Batch Forum
Topic: Firewall Context Menu
Replies: 3
Views: 1327

Re: Firewall Context Menu

The doctor says to the patient, "What seems to be the trouble?"
Raising his arm, the patient says, "It hurts when I do this."
The doctor says, "Don't do that."
by ShadowThief
05 Sep 2018 22:36
Forum: DOS Batch Forum
Topic: Refresh Desktop (Powershell hybrid)
Replies: 6
Views: 2805

Re: Refresh Desktop (Powershell hybrid)

Squashman wrote:
05 Sep 2018 18:17
I am not a .net programmer but didn't someone show an example of creating and compiling quick and dirty .net code. Not sure if that would be faster.
You mean viewtopic.php?t=4762#p27555?
by ShadowThief
05 Sep 2018 13:42
Forum: DOS Batch Forum
Topic: Refresh Desktop (Powershell hybrid)
Replies: 6
Views: 2805

Re: Refresh Desktop (Powershell hybrid)

Working on my XP Pro virtual machine (once I installed the Windows Management Framework Core package), as well as Windows 7 32-bit and 64-bit.
by ShadowThief
04 Sep 2018 17:00
Forum: DOS Batch Forum
Topic: more tricks with certutil
Replies: 9
Views: 2943

Re: more tricks with certutil

dbenham wrote:
03 Sep 2018 23:24
ShadowThief wrote:
03 Sep 2018 22:20
It's possible that your mileage may vary, but I don't know why it would.
Mine varied :twisted:

I tried to use encodehex instead of encode, and it failed well before 74 MB,
Indeed. It seems that the limit for encodehex is 21510272 bytes.
by ShadowThief
03 Sep 2018 22:20
Forum: DOS Batch Forum
Topic: more tricks with certutil
Replies: 9
Views: 2943

Re: more tricks with certutil

Image

It's possible that your mileage may vary, but I don't know why it would.
by ShadowThief
03 Sep 2018 19:42
Forum: DOS Batch Forum
Topic: more tricks with certutil
Replies: 9
Views: 2943

Re: more tricks with certutil

CERTUTIL has a surprisingly low limit to the size file it can encode/decode. I'm not sure about the exact value, but the encode limit is only in the tens of millions range. Through trial and error, I've determined that the limit is 74472684 bytes. I'm guessing that there's an output file size thres...
by ShadowThief
01 Sep 2018 22:10
Forum: DOS Batch Forum
Topic: Automatically enter the login details batch file
Replies: 2
Views: 3016

Re: Automatically enter the login details batch file

You might also want to look into Selenium for automating logins, as that can be used on IE, Firefox, or Chrome. Beyond that, I'd recommend custom Greasemonkey scripts.
by ShadowThief
31 Aug 2018 21:30
Forum: DOS Batch Forum
Topic: Exist in /s "directory"doesn't work
Replies: 12
Views: 1820

Re: Exist in /s "directory"doesn't work

What are you expecting the /s flag to do? The only flag that if has is /i for case-insensitive comparisons.
by ShadowThief
28 Aug 2018 14:54
Forum: DOS Batch Forum
Topic: Print Result in Variable Obtained by for
Replies: 6
Views: 1143

Re: Print Result in Variable Obtained by for

You've enabled delayed expansion, but you aren't using it. Change the echo statements to

Code: Select all

echo !usr1_passwdexpiretmp!
echo !usr1_passwordchangeabletmp!