View Full Version : Tutorial Simple code to handle netloaded 0-day packs



jOTTA67h
29th October 2009, 02:56
netloaded ([Only registered and activated users can see links]) is a very clean site that offers good daily 0-day packs.
However they pack with no embedded path information, have a suffix of '_nled' and also their own url link file.

Typical 0-day nled file
[Only registered and activated users can see links]

File showing contents, note no path
[Only registered and activated users can see links]

checkarcs 0-DAY section processing
[Only registered and activated users can see links]

Final checked directory
[Only registered and activated users can see links]

Script fragment


...
SET ODAY_EX_SAVE=%ODAY_EX%
...
:: Handle _nled files, ODAY_EX=E, handles _nled.part1.rar, _nled.part2.rar simple cases
ECHO %FILEA% | find /i "_nled." > nul
IF NOT "%ERRORLEVEL%" == "0" SET ODAY_EX=%ODAY_EX_SAVE%
IF "%ERRORLEVEL%" == "0" call :nled
GOTO :CHK_ODAYGRPA

:nled
ECHO ... ## nled file ##
setlocal EnableDelayedExpansion & SET FILEA=%FILEA%& SET ODAYGRP=%ODAYGRP%
set ODAYGRP=%ODAYGRP:"=%
set FILEB=%FILEA:_nled=%
set FILEE=%FILEA:_nled.part1=_nled.part2%
set FILEC=!FILEB:%ODAYGRP%\=!
set FILED=%FILEC:.part1=.part2%

if exist %FILEA% ECHO. & ECHO renamed ... %FILEA% & ECHO to ... %FILEC% & REN %FILEA% "%FILEC%" > NUL
if exist %FILEE% ECHO. & ECHO renamed ... %FILEE% & ECHO to ... %FILED% & REN %FILEE% "%FILED%" > NUL
set FILEA=%ODAYGRP%\%FILEC%
set ODAY_EX=E
endlocal & set FILEA=%FILEA%& set ODAY_EX=%ODAY_EX%
GOTO :EOF
...

notes


FILEA is path\name of 0-day pack file; eg:- 'D:\Downloads\DVD.Catalyst.3.v3.81.RETAIL-TE_nled.rar'
ODAYGRP is location of downloads; eg:- 'D:\Downloads'
ODAY_EX is E (extract) switch for WinRar later in script, creates a directory based on FILEA; eg:- 'DVD.Catalyst.3.v3.81.RETAIL-TE'


Have fun!