orangeboy's batch files from 2010

November 20, 2017 at 18:15:32
Specs: Windows 10
Sorry for the necro-post but I don't know where else to look.

Does anyone have a copy of orangeboy's bat files from here?

https://www.computing.net/answers/p...


See More: orangeboys batch files from 2010

Reply ↓  Report •

#1
November 20, 2017 at 19:47:43
Nope, and considering the site's host name came from a dynamic DNS service, chances are good the server's not even online anymore.

How To Ask Questions The Smart Way


Reply ↓  Report •

#2
December 1, 2017 at 00:08:14
If we know what the lost bats do, we can work on it
2017-12-01 15:04:32.03 GMT +7

=====================

M2 Get custom script or take private lessons


Reply ↓  Report •

#3
December 3, 2017 at 13:20:04
Here's what I've got so far:

Len.bat was was probably a modified version of this (Get length of string):
https://gist.github.com/davidruhman...

d2b was probably a modified version of this:
http://www.robvanderwoude.com/sourc...
(I also found this python script called b2d, https://github.com/SeanBolt/binary
but I'm trying to stick to CMD)

The original poster was trying to:
1. Ping computername and resolve the ip address.
2. use the ip address and compare it to know subnets on out company network to find out what subnet it is on.

So something like this may have been used as well:
https://chentiangemalc.wordpress.co...


Reply ↓  Report •

Related Solutions

#4
December 6, 2017 at 08:04:29
::====== script starts here ===============
:: works up to 1023
:: len2.bat 2017-12-06 22:44:18.54
@echo off & setLocal enableDELAYedeXpansioN

set/p S=< string.txt
set N=

:loop
set/a N+=1
set S=!S:~1!
if '!S!' equ '' echo length is !N! && goto :eof
goto :loop
goto :eof
::====== script ends here =================

=====================

M2 Get custom script or take private lessons


Reply ↓  Report •

#5
December 10, 2017 at 02:46:14
As with #4 this works to about 1023

::====== script starts here ===============
::
:: numcheck.bat 2017-12-07 14:41:43.82
@echo off & setLocal enableDELAYedeXpansioN

set/p S=<mystring.txt
if '!S!' equ '' echo no string && goto :eof

:loop
set C=!S:~0,1!
set S=!S:~1!

set OK=
for /L %%N in (0 1 9) do (if !C! equ %%N set OK=!C!)
if defined OK if '!S!' neq '' (goto :loop)
if defined OK echo all nums
if not defined OK echo !C! is not a num
goto :eof
::====== script ends here =================

=====================

M2 Get custom script or take private lessons


Reply ↓  Report •

#6
December 10, 2017 at 08:05:01
::======  script starts here  ===============
:: 
:: DEC2BIN2.BAT  2017-12-10 19:24:57.25
@echo off & setLocal enableDELAYedeXpansioN

set S=000000000000
set/p D= decimal number?

for /L %%i in (1 1 !D!) do call :sub0
call :REV
echo decimal !D! = !N! binary

goto :eof

:sub0
set C=!S:~0,1!
set S=!S:~1!
if !C! equ 1 (
  set B=!B!0
  goto :sub0
  ) else (
  if !C! equ 0 set B=!B!1
)
set S=!B!!S!
set B=

goto :eof

:REV
set N=
set L=

for %%C in (!S!) do (
:loop
set L=!S:~-1!
set S=!S:~0,-1!
  if "!S!" neq "" (
    set N=!N!!L!
    goto :loop
  ) else (
    set N=!N!!L!
  )
)
goto :eof

::======  script ends here  =================

=====================

M2 Get custom script or take private lessons


Reply ↓  Report •

#7
December 10, 2017 at 17:14:30
You know, you have bitwise operators available to you. Seems a shame not to use them when converting.
@ECHO OFF
SET /P dec= decimal number?
SET bin=

:Loop
SET /A b=dec ^& 1
SET /A dec ^>^>= 1
SET bin=%b%%bin%
IF NOT %dec%==0 GOTO Loop

SET bin=00000000000000000000000000000000%bin%
ECHO %bin:~-32%

How To Ask Questions The Smart Way

message edited by Razor2.3


Reply ↓  Report •

Ask Question