Skip to content

Instantly share code, notes, and snippets.

@ellcom
Created July 30, 2026 10:16
Show Gist options
  • Select an option

  • Save ellcom/108fee1359816895c5dfe35c76837765 to your computer and use it in GitHub Desktop.

Select an option

Save ellcom/108fee1359816895c5dfe35c76837765 to your computer and use it in GitHub Desktop.
Epson TM-L90 passwork finder
/*
* Sometimes the default password doesn't work, this is because people have moved the UB-04 card from one printer to another.
* when this happens, the printer retains the serial number from the old printer or sometimes the motherboard is replaced in
* the TM-L90. Either way the password wont work and you are not going to be able to config the network.
* This script starts at X2NJ00 0001 and works upto 9999. You might be able to start at 1000? but this should give you the serial
* number the printer wants as the default password.
* Hopefully this saves someones sanity.
*/
<?php
$login = 'epson';
for( $i=1; $i<10000; $i++) {
$password = sprintf("X2NJ00%04d", $i);
$url = 'https://192.168.192.168';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
$result = curl_exec($ch);
curl_close($ch);
$failed = str_contains($result, "Authentication failed.");
if ($failed) {
echo "Failed for $password\n";
} else {
echo "Success for $password\n";
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment