tag:blogger.com,1999:blog-308151602024-03-23T17:26:51.533-04:00void ()In the void is virtue, and no evil. Wisdom has existence, principle has existence, The Way has existence, spirit is nothingness.Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.comBlogger149125tag:blogger.com,1999:blog-30815160.post-2354910179539917832024-03-23T17:25:00.004-04:002024-03-23T17:26:19.061-04:00Create a task that removes "shutdown task is running longer than" from other tasks$batchfileToAdd = @'@echo offSETLOCAL ENABLEDELAYEDEXPANSIONset srvlist=UDP_SERVER_CHAN0,UDP_CANBUS_SERVER,UDP_UART_SERVER_CHAN0for %%i in (%srvlist%) do (powershell "$task = get-ScheduledTask -taskname %%i ; $Task.Settings.ExecutionTimeLimit = 'PT0H' ; set-ScheduledTask $task")ENDLOCALexit /B'@Add-Content "C:\CAB\chgtskshtdn.bat" $batchfileToAdd$xmlfileToAdd = @'<Task version="1.2" xmlns="Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-63100273803377496422024-02-03T09:37:00.005-05:002024-02-03T09:37:51.296-05:00backup cmd:: *** SYNC DATA - Copy one way v3.6 ***@echo offtitle BACKUP in progressSETLOCAL ENABLEDELAYEDEXPANSIONif not defined is_min set is_min=1 && start "" /min "%~dpnx0" %* && goto endecho.if not "%~1" == "" (set source=%~1) if not "%~2" == "" (set destination=%~2) if not "%~3" == "" (set rcptto=%~3) else (echo USAGE: %~0 "source" "destination" "mail@dom.tld; mail2@dom.tld" "Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-32729555392435674942024-01-06T12:31:00.003-05:002024-01-06T12:31:38.692-05:00Powershell backup #Backup folder$dateStr = (Get-Date -Format "yyy-MM-dd-HH-mm")$Source = "C:\source"$Staging = "U:\BKPTemp"$Destination = "U:\Backup\destination_$dateStr.zip"Get-ChildItem "U:\Backup\" -Recurse -File | Where CreationTime -lt (Get-Date).AddDays(-90) | Remove-Item -ForceAdd-Type -AssemblyName System.IO.Compression.FilesystemCopy-Item -Path $Source -Destination $Staging -Recurse[Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-33970791428990152612023-12-04T12:41:00.007-05:002023-12-04T12:41:00.140-05:00List Members of AD groupsTo get the members of a group, we need to login into a server with an admin account. The admin account is member of another domain in the same forest, but the groups are in a different domain. In order to perform the inquiry, an AD controller server for the target domain must be specified.Get-ADGroup -Filter { Name -like "*the searched_group*" } -Server DC.TARGET.TLD | Get-ADGroupMember -Server&Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-80307326523225170842023-11-02T12:36:00.001-04:002023-11-02T12:36:00.144-04:00MULTIPLE SAMBA INSTANCES
In order to allow clients with different encryption levels access to
the same network share, multiple instances of SAMBA must be
configured on the same machine. We are benefiting from a feature of
SAMBA called “bind_interface” that allow a certain instance to
only run on a specific network interface. If only one interface is
available, “Virtual interfaces” might be defined.
Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-58450846127161311262023-10-16T17:50:00.004-04:002023-10-28T12:45:57.233-04:0018Not the best year.Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-30086339651243283862023-08-04T17:37:00.005-04:002023-08-04T17:44:01.727-04:00Generate pseudo-random, incremental serial numbers for motherboards @echo off
setlocal enableextensions disabledelayedexpansion
for /f "tokens=1,* delims=:" %%a in ('
findstr /l /b /c:":::persist:::" "%~f0"
') do set "%%~b"
if not defined savedValue (
set "savedValue=%random%" && ( call :persist.write savedValue )
)
&Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-32926416563896597192023-05-05T20:13:00.006-04:002023-05-14T11:01:58.585-04:00PingresultsPing a host once every X seconds and save the result in a csv: @echo offSETLOCALif [%1]==[/?] goto :help::Set the address to pingset address=%1if [%1]==[] goto :fatal::Set the destination filenameset filename=%2if [%2]==[] set filename=pingres.csv::Set delay between pings (seconds)set delay=%3if [%3]==[] set delay=30:: some infoecho.echo Running %0 %address% %filename% %delay% - press Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-65130166438889435692023-04-09T10:27:00.006-04:002023-04-09T10:27:51.961-04:00Stop a service and wait for it to stop @echo off
:: echo without NewLine <nul set /p =Please wait. Stopping Service... :: request stop service
sc stop "service we need to stop" >nul
:: wait up to 30 seconds for the service to stop set a=1
set tmout=30
:retry
:: is it stopped ?sc query "service we need to stop" | find "STOPPED"
if errorlevel 1 (:: echo dots on the same line
<nul set /p =.
timeout Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-38366116912809574632023-03-31T19:05:00.001-04:002023-03-31T19:10:07.422-04:00Reset ILO password without OSIf you have an OS installed is simple, just use hponcfg and you can change the password as explained in https://blog.toma.guru/2015/04/hp-ilo-linux-reset-password.html but if no OS is available, then hope is not lost, you can use the iLO Physical Presence Button.On RX2800 Itanium iLO Physical Presence Button is hidden behind the small red hole As stated on https://support.hpe.com/hpesc/Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-52212264404584676012022-12-18T12:21:00.004-05:002022-12-18T12:24:06.118-05:00Verify if the files refered by a variable in another files existsIf the file does not exist, rename the referencing file in *.BADSETLOCAL ENABLEDELAYEDEXPANSION ::use local variablesset di=c:\temp for %%f in (%di%\*.ctl) do ( ::look in every file that ends in .ctlfor /f "tokens=1,* delims==" %%a in ('findstr /i "object_name=" "%%f"') do (::get the name of the second file from the variable "object_name"if not exist "%di%\%%b"( ::if the second Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-72595778669532198372022-10-16T13:59:00.003-04:002022-11-12T12:06:19.091-05:0017 another one. soon is already 20 :)Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-9098771946161728812022-07-17T11:09:00.009-04:002023-07-19T15:56:18.605-04:00Intel AMT revisited The old article refers to using the Intel AMT SDK and Real VNC Plus for connecting to the remote console, but a better solution is to use meshcommander - this allows you to control all the available devices in your local network form one place.In order to install meshcommander, only NodeJS and the corresponding npm is needed, so it all resumes to:mkdir ~/.meshcommander
cd ~/.meshcommander
Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-20569602115368133152022-06-24T21:30:00.005-04:002022-06-24T22:33:18.579-04:00EliteBook ambientlight sensorMap keycode e033 (or any other key you choose) to the following command that toggles the sensor on or off:echo $((1 - $(cat /sys/devices/platform/hp-wmi/als))) | sudo tee -a /sys/devices/platform/hp-wmi/alsSorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-85569492879613926282022-04-23T17:43:00.004-04:002022-04-23T17:43:28.476-04:00HiSilicon Hi3516Ev200 debrick HiSilicon Hi3516Ev200 camera gets bricked if tried to update the OpenIPC from the web interface running on :85, as the mtd block erase crashes the system during the process.Download the latest build from github, unpack it and put it on the tftp directory.wget https://github.com/OpenIPC/firmware/releases/download/latest/openipc.hi3516ev200-br.tgz | tar -zvx /tmp/tftbootSet the local IP Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-4936393059112927432021-10-16T18:24:00.002-04:002021-10-16T18:24:00.189-04:0016 and going...Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-68138769901770147072021-06-01T15:46:00.004-04:002021-06-01T15:46:31.638-04:00Digium phone stuck on Contacting sip:proxy@IP:5060Any normal/softphone works perfectly, but Sangoma (Digium) phones uses an SSL certificate to encrypt phone configuration messages. That certificate expired on May 28th, 2021. The certificate is embedded in the DPMA blob, so it can't be renewed. Basically this is the cost of putting binary blobs on your server :(The solution is to download a new binary blob from digium and to replace the Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-79473603787562727842021-03-17T15:25:00.006-04:002022-06-12T18:09:15.342-04:00ESP Scale with calibration and tare #include "HX711.h"#include "Wire.h"#include "Adafruit_SSD1306.h"#include "ESP8266WiFi.h"#include "EEPROM.h"#include "ESP8266httpUpdate.h"#define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 32 #define OLED_RESET -1 #define SCREEN_ADDRESS 0x3C #define upd_version "1"#define upd_reboot true#define upd_server "10.11.12.13"#define upd_file "/update/scaleupd.php"Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-57464406133461648392021-02-03T11:11:00.001-05:002021-02-03T11:11:00.509-05:00ESP Scale pushing to server include "HX711.h"#include "ESP8266WiFi.h"#include "EEPROM.h"#include "ESP8266httpUpdate.h"#define upd_version "6a"#define upd_reboot true#define upd_server "123.45.67.89"#define upd_file "/update/index.php"const int LOADCELL_DOUT_PIN = D4;const int LOADCELL_SCK_PIN = D3;int CalEepromAdress = 101;int TarEepromAdress = 111;int DevEepromAdress = 121;float calibrationValue = 442.06;// See Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-63065855114472941622021-01-02T11:08:00.001-05:002021-01-02T11:08:25.593-05:00ESP OTA update - server side <?phpdate_default_timezone_set('America/New_York');header('Content-type: text/plain; charset=utf8', true); $pattern = ".php";$debuglog = "/var/log/ESP8266-ESPUpdate.log"; //update files must be named "LoadCell-$Version_number.bin"foreach(glob('./bin/LoadCell*.{bin}', GLOB_BRACE) as $filename){ $filenm = pathinfo($filename, PATHINFO_FILENAME); Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-35292179887368758622020-12-02T10:22:00.012-05:002020-12-02T10:22:00.460-05:00ESP WiFi sniffer with OLED and http upload#include "ESP8266WiFi.h"#include "oled.h"ADC_MODE(ADC_VCC);OLED Display=OLED(D1,D2);int RawPort = A0;char server[] = "192.168.1.101";String uploadfile = "wifi.php";String postVariable = "WiFi=";const char* ssid = "MyWiFi";const char* password = "P@55w0rd";String total = "";void setup() {// Serial.begin(115200);// Serial.println(""); Display.begin(); Display.setTTYMode(trueSorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-599304787088208892020-11-02T09:33:00.001-05:002020-11-02T09:33:00.742-05:00Check if WiFi is still connected on rpi #!/bin/bashgateway='192.168.0.1'lockfile='/var/run/chk-wifi.pid'wlan='wlan0'if [ -e $lockfile ]; then echo `date +%F\ %T\ `$0": A lockfile exists... Lets check to see if it is still valid" pid=`cat $lockfile` if kill -0 &>1 > /dev/null $pid; then echo `date +%F\ %T\ `$0": Process still running, Lockfile valid." Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-6284454226738921602020-10-22T09:36:00.003-04:002020-10-22T09:36:17.325-04:001515Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-50036752966185030112020-04-08T20:57:00.002-04:002020-04-08T20:59:50.435-04:00DD-WRT on a Videotron reflashed DIR-825The Videotron custom firmware does not allow local upgrade. On the firmware update page there is a nice "Firmware upgrade: Disabled" and that's where the update ends in the main interface.
In order to update, I've rebooted in recovery mode browser by keeping the reset pressed white plugin the power. However, the upload process was always staying at 0% and didn't finished;
Then Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0tag:blogger.com,1999:blog-30815160.post-78536972227433055822020-02-13T11:00:00.000-05:002020-02-13T11:00:03.775-05:00Asterisk PAGE say time every hourDigium D6x phones and CyberData SIP Speakers are used to page.
The phones are also used as intercoms (bidirectional page).
To start, we need accounts for the phones/speakers added to sip.conf:
[phone1] ; Phone
type=friend
host=dynamic
context=my-context
secret=5678
mailbox=319
[speaker1]; Speaker
type=friend
host=dynamic
context=my-context
secret=1234
mailbox=329
record_out=Sorinhttp://www.blogger.com/profile/18093222184379554605noreply@blogger.com0