Déc 152018
 

In a previous article, I released a GUI for libnfs library.

This time, I’ll release a command line tool allowing one to perform simple tasks against NFS exports.


nfsclient 0.1 by erwan2212@gmail.com
nfsclient 0.1 discover
nfsclient 0.1 read nfs://server/export/filename
nfsclient 0.1 write nfs://server/export/ local_filename
nfsclient 0.1 dir nfs://server/export/

Download here.
Discuss here.

Nov 022018
 

See previous article to understand why and what.

Previously we have created our master / parent disk.

Lets now create our differencing / child disks using our host (windows 8.1) virtual disk capabilities.

Lets do it in one batch.


rem list disks before
vmount disks
rem create child1 against parent iscsi.vhd
vmount createchild e:\_images\child1.vhd e:\_images\iscsi.vhd
rem create child2 against parent iscsi.vhd
vmount createchild e:\_images\child2.vhd e:\_images\iscsi.vhd
rem attach child1 without assigning any letter to it
vmount attach e:\_images\child1.vhd noletter
rem attach child2 without assigning any letter to it
vmount attach e:\_images\child2.vhd noletter
rem list disks
vmount disks
rem check attributes of disk2
vmount attributes 2
rem check attributes of disk3
vmount attributes 3
rem disk3 is most probably offline because of disk signature collision between disk2 and disk3
rem lets force it online : windows will generate a new signature
rem make sure to use a BCD using LOCATE and not using disk signature or else bootmgr will error
rem more about locate here http://www.mistyprojects.co.uk/documents/BCDEdit/files/device_locate.htm
vmount online 3

Notice how the second virtual disk now has a different signature (since we forced it online…).

 Posted by at 15 h 19 min
Déc 262017
 

Lately I decided to flash my Linksys wrt1200ac with dd-wrt as Linksys obviously dropped support for this nice hardware (no more firmware updates for a long time).
Not to mention that the vendor firmware is extremely basic (not to say limited…).

Once I had flashed the device with the proper firmware, next step for me was to monitor bandwidth from my domotic/monitoring box (jeedom).

The most obvious track was snmp (dd-wrt feature) – Helas, the snmp daemon does not implement counter64 snmp values so this is useless.
Next step was to use some curl/awk/grep script like curl -u root:password http://192.168.1.250/Status_Internet.asp, etc but the web pages heavily rely on javascript so here again, curl was a dead end.

I finally resorted to remotely read values from the device nvram using a script around ssh : not the most elegant way, but the only one I could work out.

The below will retrieve the day/month/year value from my Linksys wrt1200ac based on dd-wrt.
Note, I had to use ssh-keygen & ssh-copy-id to be able to ssh without having to provide a password.
Or alternatively, copy the root id_rsa.pub public key to the wrt authorized keys.

#!/bin/bash
read YYYY MM DD <<<$(date +'%Y %m %d')
#echo 'nvram get traff-'$MM'-'$YYYY
sudo ssh root@192.168.1.250 -q 'nvram get traff-'$MM'-'$YYYY | awk '{print $'$DD'}' | awk -F ":" '{print $1}'
Oct 312017
 

1.0.0.21
modified : dns proxy will read entries from config.ini (section=hostname,ident=ip), no more from hosts file
added : right click open config.ini
added : right click open root_path
fixed : share folder will now add everyone read-only on share permissions
added : share is created with STYPE_TEMPORARY flag, i.e will not survive a reboot
added : TPS will answer to specific ‘discovery’ messages (see discover.zip)
fixed : wsMinimized=1 was preventing form_show and load_config
added : each daemon will report on which ip it is listening (useful to troubleshoot)
added : syslogd will read ip under [syslog] in config.ini if one wants to bind to a specific interface (instead of 0.0.0.0 by default)
fixed : error handling in log_memo to avoid a possible date bug
fixed : httpd could not list files/folder in a non indexed folder
modified : ucimp.pas uses winsock, not wsck
modified : iphlpapi_helper.pas uses winsock, not wsck
modified : usnoop uses winsock, not wsck
modified : iptypes uses winsock, not wsck
modified : removed ipheader unit in main form
modified : TPS does not use wsck unit anymore

Discuss it here.
Download here.

 Posted by at 20 h 12 min
Oct 312017
 


1.0.0.20
added : new option wsMinimized in config.ini to start the app minimized
fixed : @mac,@ip,@arch added to dhcp_offer (was only dhcp_ack before)
fixed : pool start correct when opt54 set in ini file
todo : send arch in dhcp offer
added : @opt54 variable next to @mac,@ip,@arch -> similar to ${next-server} in ipxe
fixed : next server passed to send_dhcpoffer and send_dhcpack
added : will add a scrollbar when active monitor height <=600
added : vscroll=1 in config.ini will force a vertical scrollbar
fixed : option 6 dns server was wrong when choosing a different NIC
added : arch will be taken into account in the dhcp offer as well
fixed : tftpd can be disabled again in config.ini
added : will select the active nic in the opt54 combo box
modified : 2 more fields hidden and moved to the advanced part of the form
fixed : log to file is disabled
added : a syslog server is included in the zip file (syslog=127.0.0.1 in the config.ini)

Discuss it here.
Download here.

 Posted by at 20 h 10 min
Oct 312017
 

1.0.0.19
added : root can be an http url (netboot for debian, ubuntu, …)
fixed : stream.free on udp transfer complete
added : can log to a syslog server (add syslog=host in config.ini)
fixed : non critical udp socket errors would stop the dhcp daemon
added : in analysedata, will exit loop as soon as a dhcp message is found
added : in analysedata, will prevent (byte)offset>255
added : offline button will terminatethread if still active (53,67,4011)
fixed : no more high cpu usage on random occasions
added : new options skip_dhcp_inform & skip_dhcp_discarded
added : forcerenew dhcp messages logged

Discuss it here.
Download here.

 Posted by at 20 h 09 min
Fév 112017
 

Following a post from 2014 about booting Winpe over PXE on a UEFI computer, see below a different way to proceed.

-Disable secureboot (or else you’ll need to use a signed bootloader)
-Retrieve latest version of IPXE for UEFI, ipxe-snponly-x86-64.efi and rename it bootia64.efi
-run the following command against your BCD : bcdedit.exe /store BCD /set {bootmgr} nointegritychecks yes
-Use the below wimboot.ipxe script based on Wimboot
-set Tiny PXE Server as below screenshot

wimboot.ipxe


#!ipxe
set boot-url http://${dhcp-server}
kernel ${boot-url}/wimboot
initrd ${boot-url}/bootmgfw.efi bootmgfw.efi
initrd ${boot-url}/EFI/MICROSOFT/BOOT/BCD BCD
initrd ${boot-url}/BOOT/BOOT.SDI BOOT.SDI
initrd ${boot-url}/SOURCES/BOOT.WIM BOOT.WIM
boot

 Posted by at 15 h 26 min
Déc 282016
 

DNSPING uses windows dnsquery function to measure the time it takes for a nameserver to process and reply to your dns query.

This can be useful to monitor and/or troubleshoot DNS performance issues.

Result can easily be piped into a text file and later processed by excel or libreoffice calc (fixed space delimiter).


dnsping 192.168.1.250 www.google.fr 5
timestamp query result ttl duration
00:59:11 www.google.fr [216.58.210.227] TTL:219 time:47
00:59:16 www.google.fr [216.58.210.227] TTL:214 time:0
00:59:21 www.google.fr [216.58.210.227] TTL:209 time:0
00:59:26 www.google.fr [216.58.210.227] TTL:204 time:15

Tool can be downloaded here.

Erwan

Mai 102014
 

 

 

 Posted by at 20 h 13 min