Updated and now detects Windows 7 and as well as old version Windows 10 that supports SMB 1. I only implemented smb 1 and any smb 2 server you try this on will return a "not vulnerabile".
I researched on how the structure of a SMB1 packet and how to constructed rather than going by the packet information. I created add new code for more effiacy and better communication to the protocol. After this reasearch I understand more of the smb protocol more than I did in the previous code.
EternalBlue is a well-known SMB exploit created by the NSA to attack various versions of Windows, including Windows 7. Etern-Blue-Windows-7-Checker will basically send SMB packets to a host to see if that Windows host machine is vulnerable to the EternalBlue exploit (CVE-2017-0143).
Based on https://github.com/REPTILEHAUS/Eternal-Blue/blob/master/checker.py
If you have Microsoft Visual Studio Install, you can use vcvars64 on the command line, go to the Etern-blue-Windows-7 folder and type build into command line. vcvars64 can be found in "C:\Program Files (x86)\Microsoft Visual Stuido\2022\BuildTools\VC\Auxiliary\Build"
Go into the folder and type ./build.sh and it should build without any libs needed.
./Eternalblue -i "ip address"
./Eternalblue -i localhost
you can also speficy the port with -p "portnumber"