Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved automatic pxe start
#1
Hi.
Is it possible to start the pxe server without the webgui? i mean with "bash iventoy.sh start"
Reply
#2
Maybe you could send a start request with curl after starting from a batch or shell file:

Code:
curl 'http://tftpserver:26000/iventoy/json' \
  -H 'Accept: application/json, text/javascript, */*; q=0.01' \
  -H 'Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
  -H 'DNT: 1' \
  -H 'Origin: http://tftpserver:26000' \
  -H 'Referer: http://tftpserver:26000/' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
  -H 'X-Requested-With: XMLHttpRequest' \
  --data-raw '{"method":"start_server","ip":"192.168.1.69","mask":"255.255.255.0","gw":"192.168.1.1","pool_begin":"192.168.1.210","pool_end":"192.168.1.219"}' \
  --compressed \
  --insecure

Of course you have to set your values here like the DNS name IP's and the Subnets.
Just tested, works like a charm  Big Grin

EDIT: i got a iventoy.sh as attachment which does start automatically, but you have to edit DNS and IP's to your needs and of course CURL installed


Attached Files
.zip   iventoy.zip (Size: 1.21 KB / Downloads: 20)
Reply
#3
(06-30-2023, 06:40 AM)phil2sat Wrote: Maybe you could send a start request with curl after starting from a batch or shell file:

Code:
curl 'http://tftpserver:26000/iventoy/json' \
  -H 'Accept: application/json, text/javascript, */*; q=0.01' \
  -H 'Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
  -H 'DNT: 1' \
  -H 'Origin: http://tftpserver:26000' \
  -H 'Referer: http://tftpserver:26000/' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
  -H 'X-Requested-With: XMLHttpRequest' \
  --data-raw '{"method":"start_server","ip":"192.168.1.69","mask":"255.255.255.0","gw":"192.168.1.1","pool_begin":"192.168.1.210","pool_end":"192.168.1.219"}' \
  --compressed \
  --insecure

Of course you have to set your values here like the DNS name IP's and the Subnets.
Just tested, works like a charm  Big Grin

EDIT: i got a iventoy.sh as attachment which does start automatically, but you have to edit DNS and IP's to your needs and of course CURL installed

It works perfect. Thank you so much for sharing it.

Regards
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)