Nov 022018
 

New in latest Tiny PXE Server version : some files served over the built-in HTTP daemon such as files with extension PHP, VBS and PY can be dynamically processed on the server side and not simply sent back as text/html files.

This gives one the ability to implement a logic on the server side thru php, vbscript or python, including parameters in the URL.

Other engines could be added later on such as node.js, perl, …

Example of ipxe script file on the client side (more reading here).

chain http://${next-server}/boot.php?param1=value1&param2=value2

Example of a boot.php file server side.

<?php
//use $argv[1], $argv[2], etc to retrieve url parameters
echo "#!ipxe\n";
echo "kernel ${boot-url}/wimboot\n";
echo "initrd ${boot-url}/bootmgr                     bootmgr\n";
echo "initrd ${boot-url}/boot/BCD                    BCD\n";
echo "initrd ${boot-url}/Boot/boot.sdi               boot.sdi\n";
echo "initrd ${boot-url}/sources/boot.wim            boot.wim\n";
echo "boot\n";
?>  

The TinyPXE Server config.ini web section.

[web]
port=80
;php.exe file.php param1=value1
php=c:\_apps\php\php.exe
;cscript.exe file.vbs param1=value1 //nologo
vbs=C:\Windows\System32\cscript.exe
;python.exe file.py param1=value1
py=C:\Python27\python.exe
 Posted by at 15 h 40 min

Poster un Commentaire

avatar
  S’abonner  
Notifier de