Home Page › Forums › General Chat › ‼ IMPORTANT v2 ‼ Renderotica and RenderHub original download time tracking
Tagged: general chat, guide
- This topic has 93 replies, 35 voices, and was last updated 1 week, 4 days ago by Paul (Fuzzy3000).
-
AuthorPosts
-
December 31, 2023 at 5:38 pm #2051187
It might be a good idea to have a list of merchants who use this feature. If one buys a product and sees that said vendor has jumped on that bandwagon, the name could then be added.
January 1, 2024 at 10:40 am #2051252I've come up with a Windows Powershell script and batchfile that will remove any .dbf files, randomise the timestamps and create a new detracked zip file. I've tested it on a couple of RH downloads and it seems to work so I'm posting it here but test it and use at your own risk.
Powershell script (save this with the filename 'de-renderhub.ps1'
param ( [string]$ZipFilePath ) # Check if a zip file is provided if (-not $ZipFilePath -or -not (Test-Path $ZipFilePath) -or (Get-Item $ZipFilePath).Extension -ne ".zip") { Write-Host "Please provide a valid path to a zip file." exit } # Extract original file name without extension $OriginalZipFileName = [System.IO.Path]::GetFileNameWithoutExtension($ZipFilePath) $OriginalZipFileExtension = [System.IO.Path]::GetExtension($ZipFilePath) # Step 1: Unzip the file Write-Host "Unzipping the file..." $DestinationPath = Join-Path (Get-Location) "temp_folder" Expand-Archive -Path $ZipFilePath -DestinationPath $DestinationPath # Step 2: Traverse the directory structure Get-ChildItem -Recurse $DestinationPath | ForEach-Object { # Step 3: Check for files with the .dbf extension and delete them if ($_.Extension -eq ".dbf") { Remove-Item $_.FullName -Force Write-Host "Deleted: $($_.FullName)" } } # Step 4: Change the timestamps of all files and folders to a random value between 60 and 120 days before the current date # and a random time within the 24-hour day # Change the min and max value of 60 and 121 on the line beginning $randomDays if required. Write-Host "Changing timestamps of all files and folders..." Get-ChildItem -Recurse $DestinationPath | ForEach-Object { $randomDays = Get-Random -Minimum 60 -Maximum 121 $randomHours = Get-Random -Minimum 0 -Maximum 24 $randomMinutes = Get-Random -Minimum 0 -Maximum 60 $randomSeconds = Get-Random -Minimum 0 -Maximum 60 $newTimestamp = (Get-Date).AddDays(-$randomDays).AddHours(-$randomHours).AddMinutes(-$randomMinutes).AddSeconds(-$randomSeconds) $_.LastWriteTime = $newTimestamp $_.LastAccessTime = $newTimestamp } # Step 5: Zip the contents back with the original folder structure $NewZipFilePath = Join-Path (Get-Location) "$OriginalZipFileName-Detracked$OriginalZipFileExtension" Write-Host "Zipping the contents back to: $NewZipFilePath..." Compress-Archive -Path "$DestinationPath\*" -DestinationPath $NewZipFilePath -Force # Step 6: Rename the original zip file by appending 'Tracked' to the filename $NewOriginalZipFilePath = Join-Path (Get-Location) "$OriginalZipFileName-Tracked$OriginalZipFileExtension" Write-Host "Renaming the original zip file to: $NewOriginalZipFilePath..." Rename-Item -Path $ZipFilePath -NewName $NewOriginalZipFilePath -Force # Step 7: Clean up - remove the temporary folder Write-Host "Cleaning up..." Remove-Item -Path $DestinationPath -Recurse -Force Write-Host "Script completed!"
Batch file - save this as de-renderhub.bat (the extension is important!) in the same location as the .ps1 file above.
@echo off setlocal enabledelayedexpansion set "PS_SCRIPT=.\de-renderhub.ps1" if not exist %PS_SCRIPT% ( echo PowerShell script not found: %PS_SCRIPT% exit /b 1 ) if "%~1"=="" ( echo Please drop a zip file onto this batch file. exit /b 1 ) set "ZIP_FILE=%~1" powershell -ExecutionPolicy Bypass -File %PS_SCRIPT% -ZipFilePath "%ZIP_FILE%"
To use, put both files in a folder, copy a RH download to that folder, then drag and drop it onto the .bat file. The script should extract the contents of the zip file, search for and remove any .dbf files it finds, change the timestamps on all files then rezip the contents. You should be left with two zip files; one with -Detracked appended to the file name and one with -Tracked appended. The -Detracked zip file should be safe to upload, the -Tracked file is the original zip file renamed and can either be kept or deleted as required.
(This should also work on Renderotica files as it changes all filename dates but you should still remove the PDF files manually to be sure.)
The script changes the timestamp (date accessed and date modified) of every file to a random value between 60 and 120 days before the current date. To change those values, edit the line
$randomDays = Get-Random -Minimum 60 -Maximum 121
and change the values 60 and 121 as required.Once again, I've tested this with a couple of my own downloads, and should work but I can't absolutely guarantee and take no responsibility for it setting your PC on fire etc.
January 1, 2024 at 11:31 am #2051262Skippy, thank you so much for this! I had never had
a wish come true this swiftly.Once upon a time a comic came out titled "Marjorie Finnegan, Temporal Criminal". Marjorie would prance around across time and steal shiny things and do silly things. Since that could mess up the time stream and get here noticed, she would use a clever device with a complicated name, which would readjust some details to keep her hidden from the Time Police.
She nicknamed the device "the unf*cker". Asterisk added for chaste eyes only. Seriously though, really good comic, very subversive and funny. Although, be warned: it's by Garth Ennis. And nothing is sacred for that guy, so reader beware!
In homage to that witty comic and seeing how your script does something so similar, messing with time data to keep us hidden... I hereby baptize your wonderful script...
the 3D Unf*cker! I mean, it fits *so* well.
January 1, 2024 at 11:58 am #2051267This is great Skip, Just transferred 500 as a thank you!
January 2, 2024 at 1:01 pm #2051419@SkippyTheMeh Thanks, it's a great idea to automatize the process, I tried it, and the detracked files are perfect, but the folders inside the new zip are getting stamped with the current system time, and the finished -detracked zip too, tho the zip stamp is only problematic if the member uploads it to Mega, because Mega Sync will download it with the original time stamp.
(I tried it on a fresh W10 and W11).January 2, 2024 at 1:13 pm #2051422@Warrant63. Yeah, I noticed the folder timestamps after posting yesterday. It seems to be a function of using powershell's built-in zip function to re-zip the files. Changing the timestamp on the zip file should be easy enough to add though. I can look at using 7zip rather than the built-in function to re-compress the files, but that relies on people having 7zip installed as well. The other option is to use your method to change the system date and time, but if I can, I'd rather avoid doing that as if the script fails before resetting the time, it could lead to some unintended behaviour with Windows.
Give me a couple of days and I'll see what I can come up with.
January 2, 2024 at 1:32 pm #2051424@SkippyTheMeh No worries and thanks for the effort 🙂 I wanted to check out the other options as well because Winrar has a command line option too and the system time change is not always working :/ , but I didn't have time to work on it yet 😀
January 3, 2024 at 2:56 pm #2051549Can anyone confirm that the 3 pdfs are always present with the same names in 'rotica zip downloads?
January 3, 2024 at 3:10 pm #2051554@SkippyTheMeh If it's a fresh download yes, there will be 3x PDF in root, but the names are not constant. One is always an "EndUserLicense.pdf" but the other two have the vendor and item name in their title:
vendor_item_EndUserLicense.pdf (example: warrant63_warrantoutfitforG8_EndUserLicense.pdf)
item_Readme.pdf (example: warrantoutfitforG8_Readme.pdf)
+ There can be other PDF's in the pack too, like in the Documents folder or inside the item folders - if the vendor built in a PDF guide etc, but those are harmless (currently).
But they are making the process harder - deleting all the pdf's from the pack would be easier 😀January 3, 2024 at 5:06 pm #2051574Deleting all the pdfs is easy enough - I can use the same function as the one that deletes any .dbf files - but I was hoping to avoid it as the documentation is useful for some products. I'll add it as a stop-gap though.
I think the version I've been testing today is correctly changing the timestamps for the folders and the final detracked zip file using 7zip and I'm working on a second script that will act on any zip files in the same folder. Once I'm reasonably sure they're working, I'll zip 'em up and post them.
(I would have been a bit quicker, but it's a couple of decades since I last wrote any powershell scripts and I'm not a coder so I have to keep googling stuff while keeping the script as flexible as possible for if and when RH and 'rotica change things again.)
January 3, 2024 at 5:17 pm #2051576Yeah, deleting all the PDFs wouldn't be good 🙂
No hurries, the manual method is working atm (more or less) and you are already doing a great favor to the community 😉January 4, 2024 at 7:17 am #2051689Do you think renaming any PDF files in an archive to something like <zipfilename><random number> would be a safe alternative to deleting them?
I redownloaded and checked a couple of my old 'rotica purchases as well as a few new ones yesterday and it looks like they're also changing the timestamps on some of the other files in the archive to be the same as the download time, specifically any image files. I'm also only seeing EndUserLicense.pdf in the root of the archive on my downloads and new purchases. Vedor_Item_name_readme PDF is now in the Documentation folder.
January 4, 2024 at 10:02 am #2051709I've uploaded version 2 (actually more like version 24 or something) to bunkr:
https://bunkrr.su/d/MONJseiv6PHy5
The TL:DR is that the script now correctly fixes the timestamps for folders and the resulting zip file by using 7zip (7za.exe), deletes any .dbf files it finds and renames and re-timestamps any .pdf files in the archive.
Open the zip from above and extract the 'ZGFX-Detrack' folder to somewhere convenient,
(ZIP FILES TO DETRACK MUST BE IN THE SAME FOLDER AS THE SCRIPT!)
Either:
Drag a zip file from RH/Rotica onto "ZGFX-Detrack.bat" (make sure it's the .bat file, NOT the .ps1 file!)
or
Move several RH/Rotica zips into the folder and double-click on "ZGFX-Detrack-All-Zips.bat" to detrack several files at once. (I'd recommend not doing more than 20-30 at a time, the unzip/zip process can take some time for large zip files).
Read the "Readme.txt" file for more information.
As before, use at your own risk, no responsibility is taken for getting your wife/girlfriend/daughter pregnant.
January 7, 2024 at 2:28 pm #2052365So, basically, does the script in its current state take care of the timestamp in all files including the textures, the DSF etc?
January 7, 2024 at 2:45 pm #2052366@Nobunagaoda, Yes, the script does three things in this order:
1. Deletes any file with the .dbf extension
2. Renames any PDF files in the archive
3. Changes the timestamp of every file and folder to a random date between 60 and 365 days before the current date. Each file or folder gets a different timestamp.(#2 might cause some issues with tutorials that have shortcuts from within Studio).
By editing the main script, you can change or add to the extensions being deleted or renamed and change the time offsets.
The only non-text file in the download I posted is 7za.exe, which is the command line version of 7zip.
I strongly encourage anyone using the scripts to open them in their text editor of choice and take a look at what the scripts are doing, I've left comments within the scripts explaining what each section does as well as a readme.txt in the archive explaining how to use them and what each file does. Feel free to download your own version of 7za.exe from 7zip's webpage as well.
-
AuthorPosts
- You must be logged in to reply to this topic.