Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.

Overview

WindowsBuildFromISO

Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.

GitHub release (latest by date)

Features

  • Parse multiple ISO files from a directory.
  • Detect the Windows build number and OS language.
  • Sort and rename the ISO files in folders by OS major and minor builds.

Examples

  • Automatically sort and rename the isos from a directory by major and minor build numbers.

    ./WindowsBuildFromISO.py --iso-dir ./isos/ --archive-dir ./archive/
    
  • Only get the major and minor build numbers of an ISO.

    ./WindowsBuildFromISO.py --iso ./isos/Win10_21H1_x64_English.iso
    

Usage

$ ./WindowsBuildFromISO.py -h
usage: WindowsBuildFromISO.py [-h] (-i ISO | -d ISO_DIR) [-a ARCHIVE_DIR] [-v]

Extract Windows Build number from ISO files. v1.1

optional arguments:
  -h, --help            show this help message and exit
  -i ISO, --iso ISO     Path to iso file.
  -d ISO_DIR, --iso-dir ISO_DIR
                        Directory containing multiple ISOs to parse.
  -a ARCHIVE_DIR, --archive-dir ARCHIVE_DIR
                        Archive dir. (default: False)
  -v, --verbose         Verbose mode. (default: False)

How it works

In order to extract the Windows version from an ISO, we first need to mount the ISO file and open its content. In the ISO, there is a ./sources/ folder containing a Windows imaging (WIM) image in ./sources/boot.wim. When we uncompress this archive, we get a lot of files, but one file at the root of the archive stands out: '[1].xml'.

boot$ ls -lha
total 52K
drwxrwxr-x 5 podalirius podalirius 4,0K janv. 18 00:17  .
drwxrwxr-x 4 podalirius podalirius 4,0K janv. 18 00:17  ..
drwx------ 8 podalirius podalirius 4,0K mars  19  2019  1
-rw-rw-r-- 1 podalirius podalirius 3,9K janv. 18 00:16 '[1].xml'
drwx------ 8 podalirius podalirius 4,0K mars  19  2019  2
drwx------ 2 podalirius podalirius  32K janv. 18 00:16 '[DELETED]'

This file is a XML file containing information about the images contained inside the ./sources/boot.wim file. It contains all the information we need to know which major or minor build this ISO file is. Here is an extract of the '[1].xml' file:

... 9 Microsoft� Windows� Operating System WindowsPE WindowsPE WinNT en-US en-US 10 0 18362 418 0 19h1_release WINDOWS Microsoft Windows PE (x64) Microsoft Windows PE (x64) 9 ... ">
<WIM>
    <TOTALBYTES>530731284TOTALBYTES>
    <IMAGE INDEX="1">
        ...
        <WINDOWS>
            <ARCH>9ARCH>
            <PRODUCTNAME>Microsoft� Windows� Operating SystemPRODUCTNAME>
            <EDITIONID>WindowsPEEDITIONID>
            <INSTALLATIONTYPE>WindowsPEINSTALLATIONTYPE>
            <PRODUCTTYPE>WinNTPRODUCTTYPE>
            <PRODUCTSUITE>PRODUCTSUITE>
            <LANGUAGES>
                <LANGUAGE>en-USLANGUAGE>
                <DEFAULT>en-USDEFAULT>
            LANGUAGES>
            <VERSION>
                <MAJOR>10MAJOR>
                <MINOR>0MINOR>
                <BUILD>18362BUILD>
                <SPBUILD>418SPBUILD>
                <SPLEVEL>0SPLEVEL>
                <BRANCH>19h1_releaseBRANCH>
            VERSION>
            <SYSTEMROOT>WINDOWSSYSTEMROOT>
        WINDOWS>
        <NAME>Microsoft Windows PE (x64)NAME>
        <DESCRIPTION>Microsoft Windows PE (x64)DESCRIPTION>
        <FLAGS>9FLAGS>
    IMAGE>
    ...
WIM>

Contributing

Pull requests are welcome. Feel free to open an issue if you want to add other features.

You might also like...
A simple Python code that takes input from a csv file and makes it into a vcf file.

Contacts-Maker A simple Python code that takes input from a csv file and makes it into a vcf file. Imagine a college or a large community where each y

gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

Small-File-Explorer - I coded a small file explorer with several options
Small-File-Explorer - I coded a small file explorer with several options

Petit explorateur de fichier / Small file explorer Pour la première option (création de répertoire) / For the first option (creation of a directory) e

Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.
PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts.

SaveTools MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts. Credits Written by Asteris

Comments
  • Find where the common OS name is inside the ISO

    Find where the common OS name is inside the ISO

    For example "Windows server 2016" should be here instead of "Windows 10.0" :

    [iso] ./archive/Windows 10.0/10.0.14393.0 - Windows 10.0/en-us/10.0.14393.0.Windows_Server_2016_Datacenter.en-us.iso 
       [+] Windows 10.0 (build:14393.0)  (lang:en-us)
    
    enhancement 
    opened by p0dalirius 1
Releases(1.2)
Owner
Podalirius
Hacker of everything
Podalirius
Publicly Open Amazon AWS S3 Bucket Viewer

S3Viewer Publicly open storage viewer (Amazon S3 Bucket, Azure Blob, FTP server, HTTP Index Of/) s3viewer is a free tool for security researchers that

Sharon Brizinov 377 Dec 02, 2022
Sheet Data Image/PDF-to-CSV Converter

Sheet Data Image/PDF-to-CSV Converter

Quy Truong 5 Nov 22, 2021
gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the rem

Presslabs 2.3k Jan 08, 2023
BREP : Binary Search in plaintext and gzip files

BREP : Binary Search in plaintext and gzip files Search large files in O(log n) time using binary search. We support plaintext and Gzipped files. Benc

Arnaud de Saint Meloir 5 Dec 24, 2021
Here is some Python code that allows you to read in SVG files and approximate their paths using a Fourier series.

Here is some Python code that allows you to read in SVG files and approximate their paths using a Fourier series. The Fourier series can be animated and visualized, the function can be output as a tw

Alexander 12 Jan 01, 2023
Transforme rapidamente seu arquivo CSV (de qualquer tamanho) para SQL de forma rápida.

Transformador de CSV para SQL Transforme rapidamente seu arquivo CSV (de qualquer tamanho) para SQL de forma rápida, e com isso insira seus dados usan

William Rodrigues 4 Oct 17, 2022
CSV To VCF (Multiples en un archivo)

CSV To VCF Convierte archivo CSV a Tarjeta VCF (varias en una) How to use En main.py debes reemplazar CONTACTOS.csv por tu archivo csv, y debes respet

Jorge Ivaldi 2 Jan 12, 2022
Various converters to convert value sets from CSV to JSON, etc.

ValueSet Converters Tools for converting value sets in different formats. Such as converting extensional value sets in CSV format to JSON format able

Health Open Terminology Ecosystem 4 Sep 08, 2022
Listreqs is a simple requirements.txt generator. It's an alternative to pipreqs

⚡ Listreqs Listreqs is a simple requirements.txt generator. It's an alternative to pipreqs. Where in Pipreqs, it helps you to Generate requirements.tx

Soumyadip Sarkar 4 Oct 15, 2021
Organize the files into the relevant sub-folders

This program can be used to organize files in a directory by their file extension. And move duplicate files to a duplicates folder.

Thushara Thiwanka 2 Dec 15, 2021
Convert All TXT Files To One File.

AllToOne Convert All TXT Files To One File. Hi 👋 , I'm Alireza A Python Developer Boy 🔭 I’m currently working on my C# projects 🌱 I’m currently Lea

4 Jun 07, 2022
Powerful Python library for atomic file writes.

Powerful Python library for atomic file writes.

Markus Unterwaditzer 313 Oct 19, 2022
Swiss army knife for Apple's .tbd file manipulation

Description Inspired by tbdswizzler, this simple python tool for manipulating Apple's .tbd format. Installation python3 -m pip install --user -U pytbd

10 Aug 31, 2022
A simple file module for creating, editing and saving files.

A simple file module for creating, editing and saving files.

1 Nov 25, 2021
pydicom - Read, modify and write DICOM files with python code

pydicom is a pure Python package for working with DICOM files. It lets you read, modify and write DICOM data in an easy "pythonic" way.

DICOM in Python 1.5k Jan 04, 2023
An universal file format tool kit. At present will handle the ico format problem.

An universal file format tool kit. At present will handle the ico format problem.

Sadam·Sadik 1 Dec 26, 2021
Python file organizer application

Python file organizer application

Pak Maneth 1 Jun 21, 2022
Various technical documentation, in electronically parseable format

a-pile-of-documentation Various technical documentation, in electronically parseable format. You will need Python 3 to run the scripts and programs in

Jonathan Campbell 2 Nov 20, 2022
A bot discord that can create directories, file, rename, move, navigate throw directories etc....

File Manager Discord What is the purpose of this program ? This program is made for a Discord bot. Its purpose is to organize the messages sent in a c

1 Feb 02, 2022
A python wrapper for libmagic

python-magic python-magic is a Python interface to the libmagic file type identification library. libmagic identifies file types by checking their hea

Adam Hupp 2.3k Dec 29, 2022