okay I just did a scan on the xiaomi repeater extender using nmap
and output like this:
nmap 192.168.90.8 -Pn -sV
Starting Nmap 7.92 ( https://nmap.org ) at 2022-01-19 15:08 WIB
Nmap scan report for 192.168.90.8
Host is up (0.048s latency).
Not shown: 999 closed tcp ports (conn-refused)
PORT STATE SERVICE VERSION
23/tcp open telnet?
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port23-TCP:V=7.92%I=7%D=1/19%Time=61E7C71F%P=x86_64-pc-linux-gnu%r(NULL
SF:,9,"Login\x20as:")%r(GenericLines,41,"Login\x20as:Invalid\x20User\x20Na
SF:me\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:")%r(tn3270,18
SF:,"Login\x20as:\xff\xfd\x18\xff\xfd\x19\xff\xfb\x19\xff\xfd\0\xff\xfb\0"
SF:)%r(GetRequest,41,"Login\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:I
SF:nvalid\x20User\x20Name\r\nLogin\x20as:")%r(HTTPOptions,41,"Login\x20as:
SF:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLogin
SF:\x20as:")%r(RTSPRequest,41,"Login\x20as:Invalid\x20User\x20Name\r\nLogi
SF:n\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:")%r(RPCCheck,9,"Login\x
SF:20as:")%r(DNSVersionBindReqTCP,9,"Login\x20as:")%r(DNSStatusRequestTCP,
SF:9,"Login\x20as:")%r(Help,25,"Login\x20as:Invalid\x20User\x20Name\r\nLog
SF:in\x20as:")%r(SSLSessionReq,9,"Login\x20as:")%r(TerminalServerCookie,9,
SF:"Login\x20as:")%r(TLSSessionReq,9,"Login\x20as:")%r(Kerberos,9,"Login\x
SF:20as:")%r(SMBProgNeg,9,"Login\x20as:")%r(X11Probe,9,"Login\x20as:")%r(F
SF:ourOhFourRequest,41,"Login\x20as:Invalid\x20User\x20Name\r\nLogin\x20as
SF::Invalid\x20User\x20Name\r\nLogin\x20as:")%r(LPDString,25,"Login\x20as:
SF:Invalid\x20User\x20Name\r\nLogin\x20as:")%r(LDAPSearchReq,41,"Login\x20
SF:as:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLo
SF:gin\x20as:")%r(LDAPBindReq,9,"Login\x20as:")%r(SIPOptions,13D,"Login\x2
SF:0as:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid\x20User\x20Name\r\nL
SF:ogin\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid\x20User\x20Na
SF:me\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid\x20Use
SF:r\x20Name\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid
SF:\x20User\x20Name\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLogin\x20as:
SF:Invalid\x20User\x20Name\r\nLogin\x20as:Invalid\x20User\x20Name\r\nLogin
SF:\x20as:")%r(LANDesk-RC,9,"Login\x20as:")%r(TerminalServer,9,"Login\x20a
SF:s:")%r(NCP,9,"Login\x20as:")%r(NotesRPC,9,"Login\x20as:")%r(JavaRMI,9,"
SF:Login\x20as:")%r(WMSRequest,9,"Login\x20as:")%r(oracle-tns,9,"Login\x20
SF:as:")%r(ms-sql-s,9,"Login\x20as:")%r(afp,9,"Login\x20as:")%r(giop,9,"Lo
SF:gin\x20as:");
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 120.76 seconds
then when I want to access the open port, which is port 23/telnet I can't press enter in the login field, and this is what I get:
telnet 192.168.90.8
Trying 192.168.90.8...
Connected to 192.168.90.8.
Escape character is '^]'.
Login as:admin^M
you can see above that I tried to press the enter key after filling in the admin login, but instead it came out
^M
is there something wrong with the scan?
Or is that port not accessible?
use python
Python 3.9.10 (main, Jan 15 2022, 11:40:36)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from telnetlib import Telnet
>>> Telnet('192.168.90.8',23).interact()
Related
Using arduino-cli, the arduino-ide, or directly the esptool.py (from https://github.com/espressif/esptool) I obtain the following error when uploading a simple (correct) sketch.
x#y:~/blink$ ~/tools/arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2
esptool.py v3.1
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
Traceback (most recent call last):
File "/home/x/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/upload.py", line 66, in <module>
esptool.main(cmdline)
File "/home/x/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 4074, in main
esp = esp or get_default_connected_device(ser_list, port=args.port, connect_attempts=args.connect_attempts,
File "/home/x/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 121, in get_default_connected_device
_esp.connect(before, connect_attempts)
File "/home/x/.arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool/esptool.py", line 639, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
Error during Upload: Failed uploading: uploading error: exit status 1
esptool.py v3.1
The problem was that my last apt upgrade updated the kernel from the 5.4.0-86-generic to 5.4.0-88-generic (I checked the update in /var/log/apt/history.log.1.gz). The driver CH341 in 5.4.0-88 is not working properly (the ESP I'm using require CH340G drivers). The solution is to go back to the 5.4.0-86 drivers and in the following I list what I've done.
disconnect any ESP or board connected to any USB. Then test that the CH341 module (which allows the serial communication with the EPS) is loaded. You can use this code to test the correct unload/load of the module in steps 2, 3.
x#y:~$ lsmod | egrep serial
usbserial 53248 2 cp210x,ch341
here is where modules of the current (5.4.0-88) and previous (5.4.0-86) kernel are
x#y:~$ ls -larh /lib/modules/
total 164K
drwxr-xr-x 6 root root 4,0K set 29 09:19 5.4.0-88-generic
drwxr-xr-x 6 root root 4,0K set 23 09:45 5.4.0-86-generic
[...]
unload current (5.4.0-88) CH341 module with the command
sudo rmmod /lib/modules/5.4.0-88-generic/kernel/drivers/usb/serial/ch341.ko
load previous (5.4.0-86) CH341 module with the command
sudo insmod /lib/modules/5.4.0-86-generic/kernel/drivers/usb/serial/ch341.ko
That's it :) You should now be able to upload a new sketch to your ESP8266.
I am trying to get the latest version of NodeMCU firmware working on my ESP8266 ES-12 module. I have followed the following steps with v1.5.4.x and it seems to be working just fine. Here are the steps:
Erase the flash esptool.py --port /dev/cu.usbXXXX erase_flash
Flash init data esptool.py --port /dev/cu.usbXXXX write_flash -fm dio -fs 32m 0x3fc000 esp_iot_sdk_v2.1.0/bin/esp_init_data_default.bin
Flash the actual build files esptool.py --port /dev/cu.usbXXXX --baud 115200 write_flash -fm dio -fs 32m 0x00000 0x00000.bin 0x10000 0x10000.bin
When I boot, I encounter the following after a file system format message
Got answer! Communication with MCU established.
AutoDetect firmware...
Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
l��r��c�n�����p�|����x��ǒ��p
�nn��;�n�����b�$rrp�n�������l���b�n��n���쎟
�p��nn�����l`���#�n��{nr���;����rp�n����r���pp��<��
���p��nn���r��#�n�$�l`�8`rn|��n����l`9~����#�n�$���nn���l`nn����r��l�pp��<����b��<~�n����l`�n��Ìrnr���;����{r�ےn����l`�����x�n��>r���n�b��lrb�������l�|��n���l`�<r�x��l`#�r����8��� #�r����8���0��lrr��;l�Ğb����bp�b��l��p����l�x~�n�nܒ��r���l���l��������l�{�n��ܒ��b�l���8�b�>��ܒ��b�|�rr�
Formatting file system. Please wait...
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x40100000, len 26772, room 16
tail 4
chksum 0x93
load 0x3ffe8000, len 2432, room 4
tail 12
chksum 0x74
ho 0 tail 12 room 4
load 0x3ffe8980, len 136, room 12
tail 12
chksum 0x67
csum 0x67
csum err
ets_main.c rl��r��c�n�����p�|����x��ǒ��p�nn��;�n�����b�cl`$`nn�������l���b�n��n���쎟�p��nn�����l`���#�n��{nr���;��?��rp�n����r���pp��<�����p��nn���r��#�n�$�l`�8`rn|��n����l`;~����#�n�$���nn���l`nn����r��l�pp��<����b��>~�n����l`�n��Ìrnr���;����{r�ےn����l`�8���;�b�Ē`$��r���wn��bp�
Like I mentioned before, following the exact same steps for v1.5.4 worked absolutely fine and I get a proper lua prompt after the file system is formatted. What am I missing here? Any help would be appreciated.
I implemented printing functionality in my iOS app. My iPad is connected to AirPrint Printer on same wi-fi. Is it possible to get Serial number or Mac address of printer in iOS application before giving print command?
You could use a two stage approach:
Query for the IP address of the printer, using standard Bonjour methods.
Find the MAC address of the printer using arp.
I cannot provide you the code... but the command line utility dns-sd will do to demo the first step.
Whatever info this command line can return to you, the dns-sd library API can also do. See /usr/include/dns_sd.h for more details....
The following outlines the steps to follow for the first stage.
1a.
Assuming that you want to find out the instance names for all AirPrint-capable devices in domain dns-sd.org....
You'd then use:
dns-sd -B _ipp._tcp.,_universal dns-sd.org.
Browsing for _ipp._tcp.,_universal.dns-sd.org.
DATE: ---Sat 02 Jul 2016---
14:20:07.190 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
14:20:07.626 Add 2 0 dns-sd.org. _ipp._tcp. Stuart's Home AirPrint Printer
^C
(Note the ,_universal suffix [requesting the AirPrint subset] to the standard query of _ipp._tcp. which requests the list of all generic IPP-capable print devices...)
You've now found one instance with the name "Stuart's Home AirPrint Printer".
1b.
You can now query for the hostname of the network node which is hosting service instance "Stuart's Home AirPrint Printer":
dns-sd -L "Stuart's Home AirPrint Printer" _ipp._tcp. dns-sd.org.
Lookup Stuart's Home AirPrint Printer._ipp._tcp..dns-sd.org.
DATE: ---Sat 02 Jul 2016---
14:37:44.436 ...STARTING...
14:37:44.813 Stuart's\032Home\032AirPrint\032Printer._ipp._tcp.dns-sd.org. can be reached at airprint.dns-sd.org.:631 (interface 0)
txtvers=1 \
qtotal=1 \
pdl=application/postscript,application/vnd.hp-PCL,application/vnd.hp-PCLXL,application/pdf,image/urf \
rp=ipp/printer \
URF=CP99,W8,OB10,PQ3-4-5,ADOBERGB24,DEVRGB24,DEVW8,SRGB24,IS1-2-4,MT1-2-3-5-12,MT1-2-3-5-12,RS600 \
ty=HP\ LaserJet\ 400\ color\ M451nw \
product=\(HP\ LaserJet\ 400\ color\ M451nw\) \
priority=10 \
adminurl=http://www.dns-sd.org/ServerStaticSetup.html \
note=At\ Stuart\'s\ house \
Color=T \
Duplex=F \
Scan=F
^C
Note the line "...can be reached at airprint.dns-sd.org.:631". This gives you the hostname you are looking for.
1c.
You can now ask for the IP addresses (IPv4 as well as IPv6) where this AirPrint instance is hosted:
dns-sd -Gv4v6 airprint.dns-sd.org.
DATE: ---Sat 02 Jul 2016---
14:19:12.040 ...STARTING...
Timestamp A/R Flags if Hostname Address TTL
14:19:12.426 Add 2 0 airprint.dns-sd.org. 50.197.138.101 75
14:19:12.544 Add 2 0 airprint.dns-sd.org. 0000:0000:0000:0000:0000:0000:0000:0000% 77 No Such Record
^C
So this AirPrinter does have an IPv4 (50.197.138.101) but no IPv6 address.
2.
To find the respective MAC address, just use ARP.
I have enabled the LPD and LPR on a Windows 8.
I want to print some files using the LPR command, but i can't even find the printer with the LPQ.
I can print normally with the printer through (ctrl + p), but i can't find it with the LPQ command.
C:\>lpq -S localhost -P HiTi_P510L
Servidor LPD do WindowsErro: the specified printer doesn't exists.
If i try to run the LPR directly i have the same error saying that the printer doesn't exists.
C:\>lpr -S 127.0.0.1 -P HiTi_P510L camila.jpg
Erro: o servidor de impressão não aceitou a requisição. Trabalho interrompido.
The event log:
LPD refused the job \\127.0.0.1\HiTi_P510L because the specified printer doens't exist on this computer.
net view:
C:\Windows\system32>net view \\myserver
Recursos compartilhados em \\myserver
Nome do compartilhamento Tipo Usado como Comentário
--------------------------------------------------------------
HiTi_P510L Impressão P510L
Comando concluído com êxito.
C:\Windows\system32>
update: port 515 is listening.
C:\>netstat -an
Conexões ativas
Proto Endereço local Endereço externo Estado
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:515 0.0.0.0:0 LISTENING
TCP 0.0.0.0:2869 0.0.0.0:0 LISTENING
TCP 0.0.0.0:49152 0.0.0.0:0 LISTENING
...
I can also telnet localhost 515 which gives me a black screen, and after i press ENTER i have this:
☺
Conexão ao host perdida.
C:\Windows\system32>
Any suggestion?
UPDATE: There are two issues here. The answer to the question regarding LPR/LPD is resolved here while the other issue was relating to the actual print stream is answered at the bottom of this response.
Ensure your firewall is off (or at least allowing 515 to pass through). Also, ensure you are using the IP of your network adapter and not local host as LPD tends to bind to an actual IP address.
If you want to ensure that your data is passed through without modification / encoding then use -o l in the command line. For example:
lpr -S <workstation_ip> -P <printer_share> -o l test.ps
lpr -S 192.168.1.6 -P P510L -o l test.ps
Also ensure the file you are sending is actually supported by the print device. While some printers support graphic formats most are expecting PCL, PS, XPS, PDF etc. Some support TIF and other JPG etc. Ensure the file you are sending is supported by the device.
In the end the issue appears to be the proprietary nature of the device and as such, the requirement is there to push the file through the print driver. One simple way is to use a graphics application that supports command line printing. One option is MS Paint.
mspaint /pt IMG_1234.jpg "Hiti P510L"
The printer name (Hiti P510L) is the name that appears in the devices and printers screen in Windows.
I'm trying to get my receipt printer working on Debian Wheezy.
On being plugged into computer, my USB-serial Receipt Printer (epson tm-t88ii/ii compatible) tics question marks every few seconds, and does not respond to commands.
the output from the printer is:
˥ ?????????????????£???≡█
attempting to print to it by echo fails with error:
/dev/ttyUSB0: Permission denied
even as root.
attempting to open the cash drawer fails with error:
/dev/ttyUSB0: No such device
How do I get it to stop the tic and print?
Here's how I got it working:
after sending:
# echo "test" > /dev/ttyUSB0
returns Permission denied,
# dmesg | tail
returns:
[92780.658576] ftdi_sio 2-3:1.0: FTDI USB Serial Device converter detected
[92780.658624] usb 2-3: Detected FT232BM
[92780.658626] usb 2-3: Number of endpoints 2
[92780.658628] usb 2-3: Endpoint 1 MaxPacketSize 64
[92780.658630] usb 2-3: Endpoint 2 MaxPacketSize 64
[92780.658632] usb 2-3: Setting MaxPacketSize 64
[92780.664556] usb 2-3: FTDI USB Serial Device converter now attached to ttyUSB0
[92782.102904] usb 2-3: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets config #1
[92782.104874] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[92782.104891] ftdi_sio 2-3:1.0: device disconnected
This indicates there is a conflict with package 'brltty', (braille device), which is installed by default.
# apt-get remove brltty
stops the tic
set baud with
# stty -F /dev/ttyUSB0 9600
try echo
$ echo "test" > /dev/ttyUSB0
it prints!
What about the cash drawer?
$ echo -e "\033\0160\0\031\372" >> /dev/ttyUSB0
it opens!
Problem solved. Unless you need a braille display as well.