Search found 499 matches

by npocmaka_
08 Nov 2020 09:13
Forum: DOS Batch Forum
Topic: batch file PID
Replies: 6
Views: 1344

Re: batch file PID

https://github.com/npocmaka/batch.scrip ... CmdPID.bat - you can try with this. It saves the PID to the errorlevel
by npocmaka_
02 Nov 2020 04:11
Forum: DOS Batch Forum
Topic: Nesting statement if ()==() ( ) gives an error
Replies: 2
Views: 1053

Re: Nesting statement if ()==() ( ) gives an error

One of your closing brackets is actually an opening one. Try like this: @ECHO OFF IF (c)==(c) ( echo test IF "(b)"=="(b)" ( echo yes ) ) the closing bracket in the nested if compared strings is taken for a closing bracket of the outer if. May be this example will be more descriptive: IF (c)==(c) ( I...
by npocmaka_
06 Oct 2020 12:41
Forum: DOS Batch Forum
Topic: Output messages I can't invoke.
Replies: 2
Views: 2374

Re: Output messages I can't invoke.

https://github.com/shaswata56/WindowsXP/blob/master/base/cmd/cmdmsg.mc here are the message ids that can be searched in the repository for some insights. Since windows vista these messages are stored in the .mui files in order to achieve some localisation. Looks like the process id can be printed in...
by npocmaka_
05 Jun 2020 12:26
Forum: DOS Batch Forum
Topic: Batch wont display anything on my new PC???
Replies: 5
Views: 1936

Re: Batch wont display anything on my new PC???

try with the console properties->terminal and try to use separate colors.
by npocmaka_
19 May 2020 13:28
Forum: DOS Batch Forum
Topic: pktmon.exe
Replies: 7
Views: 2067

Re: pktmon.exe

Very useful and very dangerous at the same time as a compromised system on a network can now automatically hack the network with the right batch file. :shock: That's a bit misleading. You can snoop on traffic, but you can't inherently do anything with it. It's like Wireshark. But in the article, th...
by npocmaka_
19 May 2020 04:13
Forum: DOS Batch Forum
Topic: pktmon.exe
Replies: 7
Views: 2067

pktmon.exe

There's a new command line tool in windows 10 that I've missed and looks interesting:

https://www.bleepingcomputer.com/news/m ... ow-to-use/
by npocmaka_
29 Apr 2020 07:41
Forum: DOS Batch Forum
Topic: Can SET be filled by a command?
Replies: 6
Views: 2608

Re: Can SET be filled by a command?

the common way is to use for /f:

Code: Select all

for /f "tokens=* delims=" %%# in ('myapp.exe input.pdf') do set "count=%%#"
echo %count%
by npocmaka_
28 Apr 2020 02:28
Forum: DOS Batch Forum
Topic: more tricks with certutil
Replies: 11
Views: 8864

Re: more tricks with certutil

downloading files with certutil is no more possible: certutil.exe -urlcache -split -f "https://download.sysinternals.com/files/PSTools.zip" pstools.zip As certutil has access to sensitive directories it was able to download (and overwrite) files in system directories this way of downloading is now t...
by npocmaka_
18 Apr 2020 10:19
Forum: DOS Batch Forum
Topic: mshta and javascript
Replies: 31
Views: 32497

Re: mshta and javascript

The code you've posted will work. But calling it without 'dedicated' file will not. Try this snipped by dbenham: @echo off setlocal :: Define simple macros to support JavaScript within batch set "beginJS=mshta "javascript:close(new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Wri...
by npocmaka_
18 Apr 2020 03:16
Forum: DOS Batch Forum
Topic: mshta and javascript
Replies: 31
Views: 32497

Re: mshta and javascript

Unfortunately GetObject("winmgmts:") does not work anymore from mshta and is detected as a thread :( . I'm almost sure some naughty boy has read this thread and use it to do some bad things .
by npocmaka_
18 Apr 2020 01:39
Forum: DOS Batch Forum
Topic: command prompt in windows 10
Replies: 37
Views: 22624

Re: command prompt in windows 10

Squashman wrote:
17 Apr 2020 16:55
ShadowThief wrote:
17 Apr 2020 15:46
I knew we had gotten curl and ssh, but tar is a nice surprise
I found TAR and CURL but I don't have SSH.
You can enable it with powershell or dism:

https://docs.microsoft.com/en-us/window ... l_firstuse
by npocmaka_
17 Apr 2020 14:08
Forum: DOS Batch Forum
Topic: command prompt in windows 10
Replies: 37
Views: 22624

Re: command prompt in windows 10

TAR and CURL are now part of windows 10 - https://techcommunity.microsoft.com/t5/ ... a-p/382409
by npocmaka_
04 Apr 2020 06:30
Forum: DOS Batch Forum
Topic: does this happen only to me?
Replies: 4
Views: 1965

Re: does this happen only to me?

Ok.

Thanks for the replies.