├── .gitignore ├── LICENSE ├── README.md ├── figure ├── AllScan.jpg ├── DosScan.jpg ├── HostScan.jpg ├── NetBIOSScan.jpg ├── PortScan.jpg ├── SNMPScan.jpg ├── SQLScan.jpg ├── SnifferScan.jpg ├── WeakKeyScan.jpg ├── login.jpg ├── login_failed.jpg ├── login_input.jpg ├── login_succeed.jpg └── respone.jpg ├── paper.pdf └── sources ├── AllScan.cpp ├── AllScan.h ├── CmdDlg.cpp ├── CmdDlg.h ├── Debug ├── Scanner.ilk ├── Scanner.pdb ├── Scanner.res ├── rebort.html ├── vc60.idb └── vc60.pdb ├── DosScan.cpp ├── DosScan.h ├── HostScan.cpp ├── HostScan.h ├── IPEXPORT.H ├── IPHLPAPI.LIB ├── IPTYPES.H ├── Iphlpapi.h ├── NetBIOSScan.cpp ├── NetBIOSScan.h ├── PortScan.cpp ├── PortScan.h ├── ReadMe.txt ├── Release ├── Scanner.res ├── rebort.html └── vc60.idb ├── SNMPScan.cpp ├── SNMPScan.h ├── SQLScan.cpp ├── SQLScan.h ├── SSSelectIP.cpp ├── SSSelectIP.h ├── Scanner.aps ├── Scanner.clw ├── Scanner.cpp ├── Scanner.dsp ├── Scanner.dsw ├── Scanner.h ├── Scanner.ncb ├── Scanner.opt ├── Scanner.plg ├── Scanner.rc ├── Scanner.rc.bak ├── Scanner.sln ├── Scanner.suo ├── Scanner.vcproj ├── Scanner.vcproj.HYT-PC1.ls.user ├── ScannerDlg.cpp ├── ScannerDlg.h ├── SnifferScan.cpp ├── SnifferScan.h ├── StdAfx.cpp ├── StdAfx.h ├── WeakKeyScan.cpp ├── WeakKeyScan.h ├── etwet-cppcheck-build-dir ├── files.txt ├── lastResults.xml └── statistics.txt ├── etwet.cppcheck ├── faceShoot ├── 1.PNG ├── 11.PNG ├── 12.PNG ├── 13.PNG ├── 14.PNG ├── 15.PNG ├── 16.PNG ├── 2.PNG ├── 3.PNG ├── 4.PNG ├── 5.PNG ├── 6.PNG ├── 7.PNG ├── 8.PNG ├── 9.PNG ├── password.dic └── username.dic ├── rebort.html ├── res ├── Scanner.ico └── Scanner.rc2 └── resource.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Angel_Kitty 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 本科毕业设计-网络扫描器的设计与实现 2 | 3 | ## 运行环境 4 | 5 | - 操作系统:Windows XP及以上。 6 | 7 | - 开发工具:Microsoft Visual C++6.0,Notepad++。 8 | 9 | - 开发语言:C/C++, MFC。 10 | 11 | ## 主要功能模块测试 12 | 13 | ### 主机扫描功能模块测试 14 | 15 | 在主机扫描功能模块中,管理员输入起始 IP 为 192.168.0.100,结束 IP 为 192.168.0.103,在这个 IP 段的范围内进行测试,结果显示有两台主机处在存活状态,分别是 192.168.0.100 和 192.168.0.102,其扫描结果如图所示: 16 | 17 | ![HostScan](./figure/HostScan.jpg) 18 | 19 | ### 端口扫描功能模块测试 20 | 21 | 在端口扫描功能模块中,管理员输入起始 IP 为 192.168.0.100,结束 IP 为 192.168.0.102,在这个 IP 段的范围内进行测试,端口范围设置为 1~1024,结果显示,主机 192.168.0.100 开放了 80 端口,192.168.0.102 开放了 135、139 和 445 端口,其扫描结果如图所示: 22 | 23 | ![PortScan](./figure/PortScan.jpg) 24 | 25 | ### NetBIOS 扫描功能模块测试 26 | 27 | 在网上基本输入输出系统 NetBIOS 扫描模块中,管理员选择 192.168.0.102 主机作为当前的目标主机,该主机为当前的主机 IP,显示出的结果与实际相符,其扫描结果如图所示: 28 | 29 | ![NetBIOSScan](./figure/NetBIOSScan.jpg) 30 | 31 | ### SNMP 扫描功能模块测试 32 | 33 | 在简单网络管理协议 SNMP 扫描功能模块中,管理员选择 192.168.0.102 主机作为当前的目标主机,该主机为当前的主机 IP,显示出的结果与实际相符,其扫描结果如图所示: 34 | 35 | ![SNMPScan](./figure/SNMPScan.jpg) 36 | 37 | ### 弱密码扫描功能模块测试 38 | 39 | 在弱密码扫描功能模块中,管理员选择 192.168.0.102 主机作为当前的目标主机,该主机为当前的主机 IP,用户名设置为 test,密码采用字典文件的方式去枚举,通过扫描出来的结果进行验证,可以确定该结果与实际相符,其扫描结果如图所示: 40 | 41 | ![WeakKeyScan](./figure/WeakKeyScan.jpg) 42 | 43 | ### 嗅探器扫描功能模块测试 44 | 45 | 在嗅探器扫描功能模块中,管理员添加 Pass、Password、pwd 三个关键字对本机进行监听,然后通过由服务器搭建的一个登陆提交表单的页面去提交用户名和密码,结果成功拦截到了响应的数据包,根据数据包内容,管理员可以判断该结果与实际相符合,其扫描结果如图所示: 46 | 47 | ![SnifferScan](./figure/SnifferScan.jpg) 48 | 49 | ### DOS 攻击功能模块测试 50 | 51 | 在DOS攻击功能模块中,管理员启动 2048 个线程对目标 IP 为 39.99.157.58 的 80 端口进行连接,然后再尝试访问网站,结果发现网站宕机,管理员可以判断该结果与预期相符合,其扫描结果如图所示: 52 | 53 | ![DosScan](./figure/DosScan.jpg) 54 | 55 | ### 注入检测功能模块测试 56 | 57 | 在注入检测功能模块中,为了测试结果,我尝试在服务器上搭建了一个简易的测试 Demo,网站由两部分构成,一个是登录页面 login.html,一个是验证是否登录成功的页面 respone.php,登录页面如图所示: 58 | 59 | ![login_input](./figure/login_input.jpg) 60 | 61 | 如果以 welcome+ 用户名的形式返回则说明登录成功,登录成功的页面如图所示: 62 | 63 | ![login_succeed](./figure/login_succeed.jpg) 64 | 65 | 如果登陆失败会返回“The username or password is wrong!”,登录失败的页面如图所示: 66 | 67 | ![login_failed](./figure/login_failed.jpg) 68 | 69 | login.html 源代码如图所示: 70 | 71 | ![login](./figure/login.jpg) 72 | 73 | respone.php 源代码如图所示: 74 | 75 | ![respone](./figure/respone.jpg) 76 | 77 | 管理员根据以上测试分析可以得出结论,如果管理员把 welcome 一词当做注入漏洞的标志,若登录成功出现 welcome 一词,则说明网站存在注入漏洞,其结果如图所示: 78 | 79 | ![SQLScan](./figure/SQLScan.jpg) 80 | 81 | ### 报告生成功能模块测试 82 | 83 | 在报告生成功能模块中,管理员输入目标 IP 地址,然后尝试打印部分功能扫描出来的结果,以HTML的形式生成,可以看出该结果与预期相符合,其结果如图所示: 84 | 85 | ![AllScan](./figure/AllScan.jpg) 86 | 87 | ## 未来展望 88 | 89 | 本文所设计的网络扫描器由于时间和实验条件的限制,该网络扫描器还存在需要进一步改进的地方,主要表现在: 90 | 91 | - 该网络扫描器只能在 Windows 平台下运行,不支持 macOS、Unix、Linux 等其它主流操作系统。 92 | 93 | - 该网络扫描器的兼容性太差,在 32 位的环境下和 64 位的环境下运行结果会不太一样,需要进一步的去完善。 94 | 95 | - 网络扫描器的多线程实现过于简单,无法很好地处理线程间的关系,常常会因为卡顿而导致程序崩溃,需要进一步的去调整。 96 | 97 | - 网络扫描器接收到的数据只有英文字符不会乱码,中文字符会乱码,编码转换问题没有做好,也有待去改进和完善。 98 | 99 | - 网络扫描器目前报告只能打印 HTML 的形式,没有办法支持多种报告格式,希望能进一步的扩充其功能内容。 -------------------------------------------------------------------------------- /figure/AllScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/AllScan.jpg -------------------------------------------------------------------------------- /figure/DosScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/DosScan.jpg -------------------------------------------------------------------------------- /figure/HostScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/HostScan.jpg -------------------------------------------------------------------------------- /figure/NetBIOSScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/NetBIOSScan.jpg -------------------------------------------------------------------------------- /figure/PortScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/PortScan.jpg -------------------------------------------------------------------------------- /figure/SNMPScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/SNMPScan.jpg -------------------------------------------------------------------------------- /figure/SQLScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/SQLScan.jpg -------------------------------------------------------------------------------- /figure/SnifferScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/SnifferScan.jpg -------------------------------------------------------------------------------- /figure/WeakKeyScan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/WeakKeyScan.jpg -------------------------------------------------------------------------------- /figure/login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/login.jpg -------------------------------------------------------------------------------- /figure/login_failed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/login_failed.jpg -------------------------------------------------------------------------------- /figure/login_input.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/login_input.jpg -------------------------------------------------------------------------------- /figure/login_succeed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/login_succeed.jpg -------------------------------------------------------------------------------- /figure/respone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/figure/respone.jpg -------------------------------------------------------------------------------- /paper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/paper.pdf -------------------------------------------------------------------------------- /sources/AllScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/AllScan.cpp -------------------------------------------------------------------------------- /sources/AllScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_ALLSCAN_H__A9D89B2D_AA2C_4126_B461_50D331B02EE0__INCLUDED_) 2 | #define AFX_ALLSCAN_H__A9D89B2D_AA2C_4126_B461_50D331B02EE0__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // AllScan.h : header file 8 | // 9 | 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // CAllScan dialog 13 | 14 | class CAllScan : public CDialog 15 | { 16 | // Construction 17 | public: 18 | CString strReportContent; 19 | CAllScan(CWnd* pParent = NULL); // standard constructor 20 | 21 | // Dialog Data 22 | //{{AFX_DATA(CAllScan) 23 | enum { IDD = IDD_DIALOGALLSCAN }; 24 | CIPAddressCtrl m_ctlTargetIP; 25 | int m_iRadioReportType; 26 | BOOL m_bCheckDDOSScan; 27 | BOOL m_bCheckHostScan; 28 | BOOL m_bCheckNetBIOSScan; 29 | BOOL m_bCheckPortScan; 30 | BOOL m_bCheckSnifferScan; 31 | BOOL m_bCheckSNMPScan; 32 | BOOL m_bCheckWeakKeyScan; 33 | BOOL m_bCheckSQLScan; 34 | //}}AFX_DATA 35 | 36 | 37 | // Overrides 38 | // ClassWizard generated virtual function overrides 39 | //{{AFX_VIRTUAL(CAllScan) 40 | protected: 41 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 42 | //}}AFX_VIRTUAL 43 | 44 | // Implementation 45 | protected: 46 | 47 | // Generated message map functions 48 | //{{AFX_MSG(CAllScan) 49 | afx_msg void OnBUTTONStart(); 50 | virtual BOOL OnInitDialog(); 51 | afx_msg void OnRADIOHtml(); 52 | afx_msg void OnRADIOTxt(); 53 | afx_msg void OnRADIOXml(); 54 | //}}AFX_MSG 55 | DECLARE_MESSAGE_MAP() 56 | }; 57 | 58 | //{{AFX_INSERT_LOCATION}} 59 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 60 | 61 | #endif // !defined(AFX_ALLSCAN_H__A9D89B2D_AA2C_4126_B461_50D331B02EE0__INCLUDED_) 62 | -------------------------------------------------------------------------------- /sources/CmdDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/CmdDlg.cpp -------------------------------------------------------------------------------- /sources/CmdDlg.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_CMDDLG_H__513D6AEC_4C33_4CE1_8BC0_AA3119F5DCE3__INCLUDED_) 2 | #define AFX_CMDDLG_H__513D6AEC_4C33_4CE1_8BC0_AA3119F5DCE3__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // CmdDlg.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CCmdDlg dialog 12 | 13 | class CCmdDlg : public CDialog 14 | { 15 | // Construction 16 | public: 17 | CCmdDlg(CWnd* pParent = NULL); // standard constructor 18 | ~CCmdDlg(); 19 | // Dialog Data 20 | //{{AFX_DATA(CCmdDlg) 21 | enum { IDD = IDD_DIALOGCMD }; 22 | CString m_strCommand; 23 | CString m_strResult; 24 | //}}AFX_DATA 25 | 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CCmdDlg) 30 | protected: 31 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | protected: 36 | 37 | // Generated message map functions 38 | //{{AFX_MSG(CCmdDlg) 39 | afx_msg void OnBUTTONExecute(); 40 | //}}AFX_MSG 41 | DECLARE_MESSAGE_MAP() 42 | }; 43 | 44 | //{{AFX_INSERT_LOCATION}} 45 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 46 | 47 | #endif // !defined(AFX_CMDDLG_H__513D6AEC_4C33_4CE1_8BC0_AA3119F5DCE3__INCLUDED_) 48 | -------------------------------------------------------------------------------- /sources/Debug/Scanner.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Debug/Scanner.ilk -------------------------------------------------------------------------------- /sources/Debug/Scanner.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Debug/Scanner.pdb -------------------------------------------------------------------------------- /sources/Debug/Scanner.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Debug/Scanner.res -------------------------------------------------------------------------------- /sources/Debug/rebort.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Debug/rebort.html -------------------------------------------------------------------------------- /sources/Debug/vc60.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Debug/vc60.idb -------------------------------------------------------------------------------- /sources/Debug/vc60.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Debug/vc60.pdb -------------------------------------------------------------------------------- /sources/DosScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/DosScan.cpp -------------------------------------------------------------------------------- /sources/DosScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_DOSSCAN_H__A971E49A_AEE7_446B_B5D5_AF415EED0359__INCLUDED_) 2 | #define AFX_DOSSCAN_H__A971E49A_AEE7_446B_B5D5_AF415EED0359__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // DosScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CDosScan dialog 12 | 13 | class CDosScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | CDosScan(CWnd* pParent = NULL); // standard constructor 18 | 19 | // Dialog Data 20 | //{{AFX_DATA(CDosScan) 21 | enum { IDD = IDD_DIALOGDOSSCAN }; 22 | CIPAddressCtrl m_ctlTargetIP; 23 | UINT m_uTargetPort; 24 | UINT m_uThreadCount; 25 | CString m_strComment; 26 | //}}AFX_DATA 27 | 28 | 29 | // Overrides 30 | // ClassWizard generated virtual function overrides 31 | //{{AFX_VIRTUAL(CDosScan) 32 | protected: 33 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 34 | //}}AFX_VIRTUAL 35 | 36 | // Implementation 37 | protected: 38 | 39 | // Generated message map functions 40 | //{{AFX_MSG(CDosScan) 41 | virtual BOOL OnInitDialog(); 42 | afx_msg void OnBUTTONStart(); 43 | afx_msg void OnBUTTONStop(); 44 | afx_msg void OnTimer(UINT nIDEvent); 45 | //}}AFX_MSG 46 | DECLARE_MESSAGE_MAP() 47 | }; 48 | 49 | //{{AFX_INSERT_LOCATION}} 50 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 51 | 52 | #endif // !defined(AFX_DOSSCAN_H__A971E49A_AEE7_446B_B5D5_AF415EED0359__INCLUDED_) 53 | -------------------------------------------------------------------------------- /sources/HostScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/HostScan.cpp -------------------------------------------------------------------------------- /sources/HostScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_HOSTSCAN_H__A1CDF239_64D6_4ADB_A082_4716DB2FC2DB__INCLUDED_) 2 | #define AFX_HOSTSCAN_H__A1CDF239_64D6_4ADB_A082_4716DB2FC2DB__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // HostScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CHostScan dialog 12 | 13 | class CHostScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | USHORT Checksum(USHORT *buffer,int size); 18 | CString m_strLocalIP; 19 | CHostScan(CWnd* pParent = NULL); // standard constructor 20 | 21 | // Dialog Data 22 | //{{AFX_DATA(CHostScan) 23 | enum { IDD = IDD_DIALOGHOSTSCAN }; 24 | CListCtrl m_ctlListResult; 25 | CIPAddressCtrl m_ctlEndIP; 26 | CIPAddressCtrl m_ctlBeginIP; 27 | //CString m_strStartIP; 28 | //}}AFX_DATA 29 | 30 | 31 | // Overrides 32 | // ClassWizard generated virtual function overrides 33 | //{{AFX_VIRTUAL(CHostScan) 34 | protected: 35 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 36 | //}}AFX_VIRTUAL 37 | 38 | // Implementation 39 | protected: 40 | 41 | // Generated message map functions 42 | //{{AFX_MSG(CHostScan) 43 | virtual BOOL OnInitDialog(); 44 | afx_msg void OnBUTTONStartScan(); 45 | afx_msg void OnBUTTONStopScan(); 46 | afx_msg void OnBUTTONCmd(); 47 | //}}AFX_MSG 48 | DECLARE_MESSAGE_MAP() 49 | }; 50 | 51 | //{{AFX_INSERT_LOCATION}} 52 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 53 | 54 | #endif // !defined(AFX_HOSTSCAN_H__A1CDF239_64D6_4ADB_A082_4716DB2FC2DB__INCLUDED_) 55 | -------------------------------------------------------------------------------- /sources/IPEXPORT.H: -------------------------------------------------------------------------------- 1 | /********************************************************************/ 2 | /** Microsoft LAN Manager **/ 3 | /** Copyright (c) Microsoft Corporation. All rights reserved. **/ 4 | /********************************************************************/ 5 | /* :ts=4 */ 6 | 7 | //** IPEXPORT.H - IP public definitions. 8 | // 9 | // This file contains public definitions exported to transport layer and 10 | // application software. 11 | // 12 | 13 | #ifndef IP_EXPORT_INCLUDED 14 | #define IP_EXPORT_INCLUDED 1 15 | 16 | #if _MSC_VER > 1000 17 | #pragma once 18 | #endif 19 | 20 | // 21 | // IP type definitions. 22 | // 23 | typedef ULONG IPAddr; // An IP address. 24 | typedef ULONG IPMask; // An IP subnet mask. 25 | typedef ULONG IP_STATUS; // Status code returned from IP APIs. 26 | 27 | #ifndef s6_addr 28 | // 29 | // Duplicate these definitions here so that this file can be included by 30 | // kernel-mode components which cannot include ws2tcpip.h, as well as 31 | // by user-mode components which do. 32 | // 33 | 34 | typedef struct in6_addr { 35 | union { 36 | UCHAR Byte[16]; 37 | USHORT Word[8]; 38 | } u; 39 | } IN6_ADDR; 40 | 41 | #define in_addr6 in6_addr 42 | 43 | // 44 | // Defines to match RFC 2553. 45 | // 46 | #define _S6_un u 47 | #define _S6_u8 Byte 48 | #define s6_addr _S6_un._S6_u8 49 | 50 | // 51 | // Defines for our implementation. 52 | // 53 | #define s6_bytes u.Byte 54 | #define s6_words u.Word 55 | 56 | #endif 57 | 58 | typedef struct in6_addr IPv6Addr; 59 | 60 | /*INC*/ 61 | 62 | // 63 | // The ip_option_information structure describes the options to be 64 | // included in the header of an IP packet. The TTL, TOS, and Flags 65 | // values are carried in specific fields in the header. The OptionsData 66 | // bytes are carried in the options area following the standard IP header. 67 | // With the exception of source route options, this data must be in the 68 | // format to be transmitted on the wire as specified in RFC 791. A source 69 | // route option should contain the full route - first hop thru final 70 | // destination - in the route data. The first hop will be pulled out of the 71 | // data and the option will be reformatted accordingly. Otherwise, the route 72 | // option should be formatted as specified in RFC 791. 73 | // 74 | 75 | typedef struct ip_option_information { 76 | UCHAR Ttl; // Time To Live 77 | UCHAR Tos; // Type Of Service 78 | UCHAR Flags; // IP header flags 79 | UCHAR OptionsSize; // Size in bytes of options data 80 | PUCHAR OptionsData; // Pointer to options data 81 | } IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION; 82 | 83 | #if defined(_WIN64) 84 | 85 | typedef struct ip_option_information32 { 86 | UCHAR Ttl; 87 | UCHAR Tos; 88 | UCHAR Flags; 89 | UCHAR OptionsSize; 90 | UCHAR * POINTER_32 OptionsData; 91 | } IP_OPTION_INFORMATION32, *PIP_OPTION_INFORMATION32; 92 | 93 | #endif // _WIN64 94 | 95 | // 96 | // The icmp_echo_reply structure describes the data returned in response 97 | // to an echo request. 98 | // 99 | 100 | typedef struct icmp_echo_reply { 101 | IPAddr Address; // Replying address 102 | ULONG Status; // Reply IP_STATUS 103 | ULONG RoundTripTime; // RTT in milliseconds 104 | USHORT DataSize; // Reply data size in bytes 105 | USHORT Reserved; // Reserved for system use 106 | PVOID Data; // Pointer to the reply data 107 | struct ip_option_information Options; // Reply options 108 | } ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY; 109 | 110 | #if defined(_WIN64) 111 | 112 | typedef struct icmp_echo_reply32 { 113 | IPAddr Address; 114 | ULONG Status; 115 | ULONG RoundTripTime; 116 | USHORT DataSize; 117 | USHORT Reserved; 118 | VOID * POINTER_32 Data; 119 | struct ip_option_information32 Options; 120 | } ICMP_ECHO_REPLY32, *PICMP_ECHO_REPLY32; 121 | 122 | #endif // _WIN64 123 | 124 | typedef struct arp_send_reply { 125 | IPAddr DestAddress; 126 | IPAddr SrcAddress; 127 | } ARP_SEND_REPLY, *PARP_SEND_REPLY; 128 | 129 | typedef struct tcp_reserve_port_range { 130 | USHORT UpperRange; 131 | USHORT LowerRange; 132 | } TCP_RESERVE_PORT_RANGE, *PTCP_RESERVE_PORT_RANGE; 133 | 134 | #define MAX_ADAPTER_NAME 128 135 | 136 | typedef struct _IP_ADAPTER_INDEX_MAP { 137 | ULONG Index; 138 | WCHAR Name[MAX_ADAPTER_NAME]; 139 | } IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP; 140 | 141 | typedef struct _IP_INTERFACE_INFO { 142 | LONG NumAdapters; 143 | IP_ADAPTER_INDEX_MAP Adapter[1]; 144 | } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO; 145 | 146 | typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS { 147 | ULONG NumAdapters; 148 | IPAddr Address[1]; 149 | } IP_UNIDIRECTIONAL_ADAPTER_ADDRESS, *PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS; 150 | 151 | typedef struct _IP_ADAPTER_ORDER_MAP { 152 | ULONG NumAdapters; 153 | ULONG AdapterOrder[1]; 154 | } IP_ADAPTER_ORDER_MAP, *PIP_ADAPTER_ORDER_MAP; 155 | 156 | typedef struct _IP_MCAST_COUNTER_INFO { 157 | ULONG64 InMcastOctets; 158 | ULONG64 OutMcastOctets; 159 | ULONG64 InMcastPkts; 160 | ULONG64 OutMcastPkts; 161 | } IP_MCAST_COUNTER_INFO, *PIP_MCAST_COUNTER_INFO; 162 | 163 | // 164 | // IP_STATUS codes returned from IP APIs 165 | // 166 | 167 | #define IP_STATUS_BASE 11000 168 | 169 | #define IP_SUCCESS 0 170 | #define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1) 171 | #define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2) 172 | #define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3) 173 | #define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4) 174 | #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5) 175 | #define IP_NO_RESOURCES (IP_STATUS_BASE + 6) 176 | #define IP_BAD_OPTION (IP_STATUS_BASE + 7) 177 | #define IP_HW_ERROR (IP_STATUS_BASE + 8) 178 | #define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9) 179 | #define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10) 180 | #define IP_BAD_REQ (IP_STATUS_BASE + 11) 181 | #define IP_BAD_ROUTE (IP_STATUS_BASE + 12) 182 | #define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13) 183 | #define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14) 184 | #define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15) 185 | #define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16) 186 | #define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17) 187 | #define IP_BAD_DESTINATION (IP_STATUS_BASE + 18) 188 | 189 | // 190 | // Variants of the above using IPv6 terminology, where different 191 | // 192 | 193 | #define IP_DEST_NO_ROUTE (IP_STATUS_BASE + 2) 194 | #define IP_DEST_ADDR_UNREACHABLE (IP_STATUS_BASE + 3) 195 | #define IP_DEST_PROHIBITED (IP_STATUS_BASE + 4) 196 | #define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5) 197 | #define IP_HOP_LIMIT_EXCEEDED (IP_STATUS_BASE + 13) 198 | #define IP_REASSEMBLY_TIME_EXCEEDED (IP_STATUS_BASE + 14) 199 | #define IP_PARAMETER_PROBLEM (IP_STATUS_BASE + 15) 200 | 201 | // 202 | // IPv6-only status codes 203 | // 204 | 205 | #define IP_DEST_UNREACHABLE (IP_STATUS_BASE + 40) 206 | #define IP_TIME_EXCEEDED (IP_STATUS_BASE + 41) 207 | #define IP_BAD_HEADER (IP_STATUS_BASE + 42) 208 | #define IP_UNRECOGNIZED_NEXT_HEADER (IP_STATUS_BASE + 43) 209 | #define IP_ICMP_ERROR (IP_STATUS_BASE + 44) 210 | #define IP_DEST_SCOPE_MISMATCH (IP_STATUS_BASE + 45) 211 | 212 | // 213 | // The next group are status codes passed up on status indications to 214 | // transport layer protocols. 215 | // 216 | #define IP_ADDR_DELETED (IP_STATUS_BASE + 19) 217 | #define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20) 218 | #define IP_MTU_CHANGE (IP_STATUS_BASE + 21) 219 | #define IP_UNLOAD (IP_STATUS_BASE + 22) 220 | #define IP_ADDR_ADDED (IP_STATUS_BASE + 23) 221 | #define IP_MEDIA_CONNECT (IP_STATUS_BASE + 24) 222 | #define IP_MEDIA_DISCONNECT (IP_STATUS_BASE + 25) 223 | #define IP_BIND_ADAPTER (IP_STATUS_BASE + 26) 224 | #define IP_UNBIND_ADAPTER (IP_STATUS_BASE + 27) 225 | #define IP_DEVICE_DOES_NOT_EXIST (IP_STATUS_BASE + 28) 226 | #define IP_DUPLICATE_ADDRESS (IP_STATUS_BASE + 29) 227 | #define IP_INTERFACE_METRIC_CHANGE (IP_STATUS_BASE + 30) 228 | #define IP_RECONFIG_SECFLTR (IP_STATUS_BASE + 31) 229 | #define IP_NEGOTIATING_IPSEC (IP_STATUS_BASE + 32) 230 | #define IP_INTERFACE_WOL_CAPABILITY_CHANGE (IP_STATUS_BASE + 33) 231 | #define IP_DUPLICATE_IPADD (IP_STATUS_BASE + 34) 232 | 233 | #define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50) 234 | #define MAX_IP_STATUS IP_GENERAL_FAILURE 235 | #define IP_PENDING (IP_STATUS_BASE + 255) 236 | 237 | 238 | // 239 | // Values used in the IP header Flags field. 240 | // 241 | #define IP_FLAG_DF 0x2 // Don't fragment this packet. 242 | 243 | // 244 | // Supported IP Option Types. 245 | // 246 | // These types define the options which may be used in the OptionsData field 247 | // of the ip_option_information structure. See RFC 791 for a complete 248 | // description of each. 249 | // 250 | #define IP_OPT_EOL 0 // End of list option 251 | #define IP_OPT_NOP 1 // No operation 252 | #define IP_OPT_SECURITY 0x82 // Security option 253 | #define IP_OPT_LSRR 0x83 // Loose source route 254 | #define IP_OPT_SSRR 0x89 // Strict source route 255 | #define IP_OPT_RR 0x7 // Record route 256 | #define IP_OPT_TS 0x44 // Timestamp 257 | #define IP_OPT_SID 0x88 // Stream ID (obsolete) 258 | #define IP_OPT_ROUTER_ALERT 0x94 // Router Alert Option 259 | 260 | #define MAX_OPT_SIZE 40 // Maximum length of IP options in bytes 261 | 262 | #ifdef CHICAGO 263 | 264 | // Ioctls code exposed by Memphis tcpip stack. 265 | // For NT these ioctls are define in ntddip.h (private\inc) 266 | 267 | #define IOCTL_IP_RTCHANGE_NOTIFY_REQUEST 101 268 | #define IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST 102 269 | #define IOCTL_ARP_SEND_REQUEST 103 270 | #define IOCTL_IP_INTERFACE_INFO 104 271 | #define IOCTL_IP_GET_BEST_INTERFACE 105 272 | #define IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS 106 273 | 274 | #endif 275 | 276 | 277 | #endif // IP_EXPORT_INCLUDED 278 | 279 | -------------------------------------------------------------------------------- /sources/IPHLPAPI.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/IPHLPAPI.LIB -------------------------------------------------------------------------------- /sources/IPTYPES.H: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Module Name: 6 | 7 | iptypes.h 8 | 9 | --*/ 10 | 11 | #ifndef IP_TYPES_INCLUDED 12 | #define IP_TYPES_INCLUDED 13 | 14 | #if _MSC_VER > 1000 15 | #pragma once 16 | #endif 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #pragma warning(disable:4201) 23 | 24 | #include 25 | 26 | // Definitions and structures used by getnetworkparams and getadaptersinfo apis 27 | 28 | #define MAX_ADAPTER_DESCRIPTION_LENGTH 128 // arb. 29 | #define MAX_ADAPTER_NAME_LENGTH 256 // arb. 30 | #define MAX_ADAPTER_ADDRESS_LENGTH 8 // arb. 31 | #define DEFAULT_MINIMUM_ENTITIES 32 // arb. 32 | #define MAX_HOSTNAME_LEN 128 // arb. 33 | #define MAX_DOMAIN_NAME_LEN 128 // arb. 34 | #define MAX_SCOPE_ID_LEN 256 // arb. 35 | 36 | // 37 | // types 38 | // 39 | 40 | // Node Type 41 | 42 | #define BROADCAST_NODETYPE 1 43 | #define PEER_TO_PEER_NODETYPE 2 44 | #define MIXED_NODETYPE 4 45 | #define HYBRID_NODETYPE 8 46 | 47 | // 48 | // IP_ADDRESS_STRING - store an IP address as a dotted decimal string 49 | // 50 | 51 | typedef struct { 52 | char String[4 * 4]; 53 | } IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING; 54 | 55 | // 56 | // IP_ADDR_STRING - store an IP address with its corresponding subnet mask, 57 | // both as dotted decimal strings 58 | // 59 | 60 | typedef struct _IP_ADDR_STRING { 61 | struct _IP_ADDR_STRING* Next; 62 | IP_ADDRESS_STRING IpAddress; 63 | IP_MASK_STRING IpMask; 64 | DWORD Context; 65 | } IP_ADDR_STRING, *PIP_ADDR_STRING; 66 | 67 | // 68 | // ADAPTER_INFO - per-adapter information. All IP addresses are stored as 69 | // strings 70 | // 71 | 72 | typedef struct _IP_ADAPTER_INFO { 73 | struct _IP_ADAPTER_INFO* Next; 74 | DWORD ComboIndex; 75 | char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4]; 76 | char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4]; 77 | UINT AddressLength; 78 | BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]; 79 | DWORD Index; 80 | UINT Type; 81 | UINT DhcpEnabled; 82 | PIP_ADDR_STRING CurrentIpAddress; 83 | IP_ADDR_STRING IpAddressList; 84 | IP_ADDR_STRING GatewayList; 85 | IP_ADDR_STRING DhcpServer; 86 | BOOL HaveWins; 87 | IP_ADDR_STRING PrimaryWinsServer; 88 | IP_ADDR_STRING SecondaryWinsServer; 89 | time_t LeaseObtained; 90 | time_t LeaseExpires; 91 | } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; 92 | 93 | #ifdef _WINSOCK2API_ 94 | 95 | // 96 | // The following types require Winsock2. 97 | // 98 | 99 | typedef enum { 100 | IpPrefixOriginOther = 0, 101 | IpPrefixOriginManual, 102 | IpPrefixOriginWellKnown, 103 | IpPrefixOriginDhcp, 104 | IpPrefixOriginRouterAdvertisement, 105 | } IP_PREFIX_ORIGIN; 106 | 107 | typedef enum { 108 | IpSuffixOriginOther = 0, 109 | IpSuffixOriginManual, 110 | IpSuffixOriginWellKnown, 111 | IpSuffixOriginDhcp, 112 | IpSuffixOriginLinkLayerAddress, 113 | IpSuffixOriginRandom, 114 | } IP_SUFFIX_ORIGIN; 115 | 116 | typedef enum { 117 | IpDadStateInvalid = 0, 118 | IpDadStateTentative, 119 | IpDadStateDuplicate, 120 | IpDadStateDeprecated, 121 | IpDadStatePreferred, 122 | } IP_DAD_STATE; 123 | 124 | typedef struct _IP_ADAPTER_UNICAST_ADDRESS { 125 | union { 126 | ULONGLONG Alignment; 127 | struct { 128 | ULONG Length; 129 | DWORD Flags; 130 | }; 131 | }; 132 | struct _IP_ADAPTER_UNICAST_ADDRESS *Next; 133 | SOCKET_ADDRESS Address; 134 | 135 | IP_PREFIX_ORIGIN PrefixOrigin; 136 | IP_SUFFIX_ORIGIN SuffixOrigin; 137 | IP_DAD_STATE DadState; 138 | 139 | ULONG ValidLifetime; 140 | ULONG PreferredLifetime; 141 | ULONG LeaseLifetime; 142 | } IP_ADAPTER_UNICAST_ADDRESS, *PIP_ADAPTER_UNICAST_ADDRESS; 143 | 144 | typedef struct _IP_ADAPTER_ANYCAST_ADDRESS { 145 | union { 146 | ULONGLONG Alignment; 147 | struct { 148 | ULONG Length; 149 | DWORD Flags; 150 | }; 151 | }; 152 | struct _IP_ADAPTER_ANYCAST_ADDRESS *Next; 153 | SOCKET_ADDRESS Address; 154 | } IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS; 155 | 156 | typedef struct _IP_ADAPTER_MULTICAST_ADDRESS { 157 | union { 158 | ULONGLONG Alignment; 159 | struct { 160 | ULONG Length; 161 | DWORD Flags; 162 | }; 163 | }; 164 | struct _IP_ADAPTER_MULTICAST_ADDRESS *Next; 165 | SOCKET_ADDRESS Address; 166 | } IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS; 167 | 168 | // 169 | // Per-address Flags 170 | // 171 | #define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x01 172 | #define IP_ADAPTER_ADDRESS_TRANSIENT 0x02 173 | 174 | typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS { 175 | union { 176 | ULONGLONG Alignment; 177 | struct { 178 | ULONG Length; 179 | DWORD Reserved; 180 | }; 181 | }; 182 | struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next; 183 | SOCKET_ADDRESS Address; 184 | } IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS; 185 | 186 | // 187 | // Per-adapter Flags 188 | // 189 | #define IP_ADAPTER_DDNS_ENABLED 0x01 190 | #define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x02 191 | #define IP_ADAPTER_DHCP_ENABLED 0x04 192 | 193 | // 194 | // OperStatus values from RFC 2863 195 | // 196 | typedef enum { 197 | IfOperStatusUp = 1, 198 | IfOperStatusDown, 199 | IfOperStatusTesting, 200 | IfOperStatusUnknown, 201 | IfOperStatusDormant, 202 | IfOperStatusNotPresent, 203 | IfOperStatusLowerLayerDown 204 | } IF_OPER_STATUS; 205 | 206 | typedef struct _IP_ADAPTER_ADDRESSES { 207 | union { 208 | ULONGLONG Alignment; 209 | struct { 210 | ULONG Length; 211 | DWORD IfIndex; 212 | }; 213 | }; 214 | struct _IP_ADAPTER_ADDRESSES *Next; 215 | PCHAR AdapterName; 216 | PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress; 217 | PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress; 218 | PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress; 219 | PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress; 220 | PWCHAR DnsSuffix; 221 | PWCHAR Description; 222 | PWCHAR FriendlyName; 223 | BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH]; 224 | DWORD PhysicalAddressLength; 225 | DWORD Flags; 226 | DWORD Mtu; 227 | DWORD IfType; 228 | IF_OPER_STATUS OperStatus; 229 | } IP_ADAPTER_ADDRESSES, *PIP_ADAPTER_ADDRESSES; 230 | 231 | // 232 | // Flags used as argument to GetAdaptersAddresses() 233 | // 234 | #define GAA_FLAG_SKIP_UNICAST 0x0001 235 | #define GAA_FLAG_SKIP_ANYCAST 0x0002 236 | #define GAA_FLAG_SKIP_MULTICAST 0x0004 237 | #define GAA_FLAG_SKIP_DNS_SERVER 0x0008 238 | 239 | #endif /* _WINSOCK2API_ */ 240 | 241 | // 242 | // IP_PER_ADAPTER_INFO - per-adapter IP information such as DNS server list. 243 | // 244 | 245 | typedef struct _IP_PER_ADAPTER_INFO { 246 | UINT AutoconfigEnabled; 247 | UINT AutoconfigActive; 248 | PIP_ADDR_STRING CurrentDnsServer; 249 | IP_ADDR_STRING DnsServerList; 250 | } IP_PER_ADAPTER_INFO, *PIP_PER_ADAPTER_INFO; 251 | 252 | // 253 | // FIXED_INFO - the set of IP-related information which does not depend on DHCP 254 | // 255 | 256 | typedef struct { 257 | char HostName[MAX_HOSTNAME_LEN + 4] ; 258 | char DomainName[MAX_DOMAIN_NAME_LEN + 4]; 259 | PIP_ADDR_STRING CurrentDnsServer; 260 | IP_ADDR_STRING DnsServerList; 261 | UINT NodeType; 262 | char ScopeId[MAX_SCOPE_ID_LEN + 4]; 263 | UINT EnableRouting; 264 | UINT EnableProxy; 265 | UINT EnableDns; 266 | } FIXED_INFO, *PFIXED_INFO; 267 | 268 | #pragma warning(default:4201) 269 | 270 | #ifdef __cplusplus 271 | } 272 | #endif 273 | 274 | #endif 275 | -------------------------------------------------------------------------------- /sources/Iphlpapi.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Module Name: 6 | 7 | iphlpapi.h 8 | 9 | Abstract: 10 | Header file for functions to interact with the IP Stack for MIB-II and 11 | related functionality 12 | 13 | --*/ 14 | 15 | #ifndef __IPHLPAPI_H__ 16 | #define __IPHLPAPI_H__ 17 | 18 | #if _MSC_VER > 1000 19 | #pragma once 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | ////////////////////////////////////////////////////////////////////////////// 27 | // // 28 | // IPRTRMIB.H has the definitions of the strcutures used to set and get // 29 | // information // 30 | // // 31 | ////////////////////////////////////////////////////////////////////////////// 32 | 33 | #include "iprtrmib.h" 34 | #include "ipexport.h" 35 | #include "iptypes.h" 36 | 37 | ////////////////////////////////////////////////////////////////////////////// 38 | // // 39 | // The GetXXXTable APIs take a buffer and a size of buffer. If the buffer // 40 | // is not large enough, the APIs return ERROR_INSUFFICIENT_BUFFER and // 41 | // *pdwSize is the required buffer size // 42 | // The bOrder is a BOOLEAN, which if TRUE sorts the table according to // 43 | // MIB-II (RFC XXXX) // 44 | // // 45 | ////////////////////////////////////////////////////////////////////////////// 46 | 47 | 48 | ////////////////////////////////////////////////////////////////////////////// 49 | // // 50 | // Retrieves the number of interfaces in the system. These include LAN and // 51 | // WAN interfaces // 52 | // // 53 | ////////////////////////////////////////////////////////////////////////////// 54 | 55 | 56 | DWORD 57 | WINAPI 58 | GetNumberOfInterfaces( 59 | OUT PDWORD pdwNumIf 60 | ); 61 | 62 | ////////////////////////////////////////////////////////////////////////////// 63 | // // 64 | // Gets the MIB-II ifEntry // 65 | // The dwIndex field of the MIB_IFROW should be set to the index of the // 66 | // interface being queried // 67 | // // 68 | ////////////////////////////////////////////////////////////////////////////// 69 | 70 | DWORD 71 | WINAPI 72 | GetIfEntry( 73 | IN OUT PMIB_IFROW pIfRow 74 | ); 75 | 76 | ////////////////////////////////////////////////////////////////////////////// 77 | // // 78 | // Gets the MIB-II IfTable // 79 | // // 80 | ////////////////////////////////////////////////////////////////////////////// 81 | 82 | DWORD 83 | WINAPI 84 | GetIfTable( 85 | OUT PMIB_IFTABLE pIfTable, 86 | IN OUT PULONG pdwSize, 87 | IN BOOL bOrder 88 | ); 89 | 90 | ////////////////////////////////////////////////////////////////////////////// 91 | // // 92 | // Gets the Interface to IP Address mapping // 93 | // // 94 | ////////////////////////////////////////////////////////////////////////////// 95 | 96 | DWORD 97 | WINAPI 98 | GetIpAddrTable( 99 | OUT PMIB_IPADDRTABLE pIpAddrTable, 100 | IN OUT PULONG pdwSize, 101 | IN BOOL bOrder 102 | ); 103 | 104 | ////////////////////////////////////////////////////////////////////////////// 105 | // // 106 | // Gets the current IP Address to Physical Address (ARP) mapping // 107 | // // 108 | ////////////////////////////////////////////////////////////////////////////// 109 | 110 | DWORD 111 | WINAPI 112 | GetIpNetTable( 113 | OUT PMIB_IPNETTABLE pIpNetTable, 114 | IN OUT PULONG pdwSize, 115 | IN BOOL bOrder 116 | ); 117 | 118 | ////////////////////////////////////////////////////////////////////////////// 119 | // // 120 | // Gets the IP Routing Table (RFX XXXX) // 121 | // // 122 | ////////////////////////////////////////////////////////////////////////////// 123 | 124 | DWORD 125 | WINAPI 126 | GetIpForwardTable( 127 | OUT PMIB_IPFORWARDTABLE pIpForwardTable, 128 | IN OUT PULONG pdwSize, 129 | IN BOOL bOrder 130 | ); 131 | 132 | ////////////////////////////////////////////////////////////////////////////// 133 | // // 134 | // Gets TCP Connection/UDP Listener Table // 135 | // // 136 | ////////////////////////////////////////////////////////////////////////////// 137 | 138 | DWORD 139 | WINAPI 140 | GetTcpTable( 141 | OUT PMIB_TCPTABLE pTcpTable, 142 | IN OUT PDWORD pdwSize, 143 | IN BOOL bOrder 144 | ); 145 | 146 | DWORD 147 | WINAPI 148 | GetUdpTable( 149 | OUT PMIB_UDPTABLE pUdpTable, 150 | IN OUT PDWORD pdwSize, 151 | IN BOOL bOrder 152 | ); 153 | 154 | 155 | ////////////////////////////////////////////////////////////////////////////// 156 | // // 157 | // Gets IP/ICMP/TCP/UDP Statistics // 158 | // // 159 | ////////////////////////////////////////////////////////////////////////////// 160 | 161 | DWORD 162 | WINAPI 163 | GetIpStatistics( 164 | OUT PMIB_IPSTATS pStats 165 | ); 166 | 167 | DWORD 168 | WINAPI 169 | GetIpStatisticsEx( 170 | OUT PMIB_IPSTATS pStats, 171 | IN DWORD dwFamily 172 | ); 173 | 174 | DWORD 175 | WINAPI 176 | GetIcmpStatistics( 177 | OUT PMIB_ICMP pStats 178 | ); 179 | 180 | 181 | DWORD 182 | WINAPI 183 | GetTcpStatistics( 184 | OUT PMIB_TCPSTATS pStats 185 | ); 186 | 187 | DWORD 188 | WINAPI 189 | GetTcpStatisticsEx( 190 | OUT PMIB_TCPSTATS pStats, 191 | IN DWORD dwFamily 192 | ); 193 | 194 | DWORD 195 | WINAPI 196 | GetUdpStatistics( 197 | OUT PMIB_UDPSTATS pStats 198 | ); 199 | 200 | DWORD 201 | WINAPI 202 | GetUdpStatisticsEx( 203 | OUT PMIB_UDPSTATS pStats, 204 | IN DWORD dwFamily 205 | ); 206 | 207 | ////////////////////////////////////////////////////////////////////////////// 208 | // // 209 | // Used to set the ifAdminStatus on an interface. The only fields of the // 210 | // MIB_IFROW that are relevant are the dwIndex (index of the interface // 211 | // whose status needs to be set) and the dwAdminStatus which can be either // 212 | // MIB_IF_ADMIN_STATUS_UP or MIB_IF_ADMIN_STATUS_DOWN // 213 | // // 214 | ////////////////////////////////////////////////////////////////////////////// 215 | 216 | DWORD 217 | WINAPI 218 | SetIfEntry( 219 | IN PMIB_IFROW pIfRow 220 | ); 221 | 222 | ////////////////////////////////////////////////////////////////////////////// 223 | // // 224 | // Used to create, modify or delete a route. In all cases the // 225 | // dwForwardIfIndex, dwForwardDest, dwForwardMask, dwForwardNextHop and // 226 | // dwForwardPolicy MUST BE SPECIFIED. Currently dwForwardPolicy is unused // 227 | // and MUST BE 0. // 228 | // For a set, the complete MIB_IPFORWARDROW structure must be specified // 229 | // // 230 | ////////////////////////////////////////////////////////////////////////////// 231 | 232 | DWORD 233 | WINAPI 234 | CreateIpForwardEntry( 235 | IN PMIB_IPFORWARDROW pRoute 236 | ); 237 | 238 | DWORD 239 | WINAPI 240 | SetIpForwardEntry( 241 | IN PMIB_IPFORWARDROW pRoute 242 | ); 243 | 244 | DWORD 245 | WINAPI 246 | DeleteIpForwardEntry( 247 | IN PMIB_IPFORWARDROW pRoute 248 | ); 249 | 250 | ////////////////////////////////////////////////////////////////////////////// 251 | // // 252 | // Used to set the ipForwarding to ON or OFF (currently only ON->OFF is // 253 | // allowed) and to set the defaultTTL. If only one of the fields needs to // 254 | // be modified and the other needs to be the same as before the other field // 255 | // needs to be set to MIB_USE_CURRENT_TTL or MIB_USE_CURRENT_FORWARDING as // 256 | // the case may be // 257 | // // 258 | ////////////////////////////////////////////////////////////////////////////// 259 | 260 | 261 | DWORD 262 | WINAPI 263 | SetIpStatistics( 264 | IN PMIB_IPSTATS pIpStats 265 | ); 266 | 267 | ////////////////////////////////////////////////////////////////////////////// 268 | // // 269 | // Used to set the defaultTTL. // 270 | // // 271 | ////////////////////////////////////////////////////////////////////////////// 272 | 273 | DWORD 274 | WINAPI 275 | SetIpTTL( 276 | UINT nTTL 277 | ); 278 | 279 | ////////////////////////////////////////////////////////////////////////////// 280 | // // 281 | // Used to create, modify or delete an ARP entry. In all cases the dwIndex // 282 | // dwAddr field MUST BE SPECIFIED. // 283 | // For a set, the complete MIB_IPNETROW structure must be specified // 284 | // // 285 | ////////////////////////////////////////////////////////////////////////////// 286 | 287 | DWORD 288 | WINAPI 289 | CreateIpNetEntry( 290 | IN PMIB_IPNETROW pArpEntry 291 | ); 292 | 293 | DWORD 294 | WINAPI 295 | SetIpNetEntry( 296 | IN PMIB_IPNETROW pArpEntry 297 | ); 298 | 299 | DWORD 300 | WINAPI 301 | DeleteIpNetEntry( 302 | IN PMIB_IPNETROW pArpEntry 303 | ); 304 | 305 | DWORD 306 | WINAPI 307 | FlushIpNetTable( 308 | IN DWORD dwIfIndex 309 | ); 310 | 311 | 312 | ////////////////////////////////////////////////////////////////////////////// 313 | // // 314 | // Used to create or delete a Proxy ARP entry. The dwIndex is the index of // 315 | // the interface on which to PARP for the dwAddress. If the interface is // 316 | // of a type that doesnt support ARP, e.g. PPP, then the call will fail // 317 | // // 318 | ////////////////////////////////////////////////////////////////////////////// 319 | 320 | DWORD 321 | WINAPI 322 | CreateProxyArpEntry( 323 | IN DWORD dwAddress, 324 | IN DWORD dwMask, 325 | IN DWORD dwIfIndex 326 | ); 327 | 328 | DWORD 329 | WINAPI 330 | DeleteProxyArpEntry( 331 | IN DWORD dwAddress, 332 | IN DWORD dwMask, 333 | IN DWORD dwIfIndex 334 | ); 335 | 336 | ////////////////////////////////////////////////////////////////////////////// 337 | // // 338 | // Used to set the state of a TCP Connection. The only state that it can be // 339 | // set to is MIB_TCP_STATE_DELETE_TCB. The complete MIB_TCPROW structure // 340 | // MUST BE SPECIFIED // 341 | // // 342 | ////////////////////////////////////////////////////////////////////////////// 343 | 344 | DWORD 345 | WINAPI 346 | SetTcpEntry( 347 | IN PMIB_TCPROW pTcpRow 348 | ); 349 | 350 | 351 | DWORD 352 | WINAPI 353 | GetInterfaceInfo( 354 | IN PIP_INTERFACE_INFO pIfTable, 355 | OUT PULONG dwOutBufLen 356 | ); 357 | 358 | DWORD 359 | WINAPI 360 | GetUniDirectionalAdapterInfo(OUT PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS pIPIfInfo, 361 | OUT PULONG dwOutBufLen 362 | ); 363 | 364 | ////////////////////////////////////////////////////////////////////////////// 365 | // // 366 | // Gets the "best" outgoing interface for the specified destination address // 367 | // // 368 | ////////////////////////////////////////////////////////////////////////////// 369 | 370 | DWORD 371 | WINAPI 372 | GetBestInterface( 373 | IN IPAddr dwDestAddr, 374 | OUT PDWORD pdwBestIfIndex 375 | ); 376 | 377 | ////////////////////////////////////////////////////////////////////////////// 378 | // // 379 | // Gets the best (longest matching prefix) route for the given destination // 380 | // If the source address is also specified (i.e. is not 0x00000000), and // 381 | // there are multiple "best" routes to the given destination, the returned // 382 | // route will be one that goes out over the interface which has an address // 383 | // that matches the source address // 384 | // // 385 | ////////////////////////////////////////////////////////////////////////////// 386 | 387 | DWORD 388 | WINAPI 389 | GetBestRoute( 390 | IN DWORD dwDestAddr, 391 | IN DWORD dwSourceAddr, OPTIONAL 392 | OUT PMIB_IPFORWARDROW pBestRoute 393 | ); 394 | 395 | DWORD 396 | WINAPI 397 | NotifyAddrChange( 398 | OUT PHANDLE Handle, 399 | IN LPOVERLAPPED overlapped 400 | ); 401 | 402 | 403 | DWORD 404 | WINAPI 405 | NotifyRouteChange( 406 | OUT PHANDLE Handle, 407 | IN LPOVERLAPPED overlapped 408 | ); 409 | 410 | 411 | DWORD 412 | WINAPI 413 | GetAdapterIndex( 414 | IN LPWSTR AdapterName, 415 | OUT PULONG IfIndex 416 | ); 417 | 418 | DWORD 419 | WINAPI 420 | AddIPAddress( 421 | IPAddr Address, 422 | IPMask IpMask, 423 | DWORD IfIndex, 424 | PULONG NTEContext, 425 | PULONG NTEInstance 426 | ); 427 | 428 | DWORD 429 | WINAPI 430 | DeleteIPAddress( 431 | ULONG NTEContext 432 | ); 433 | 434 | DWORD 435 | WINAPI 436 | GetNetworkParams( 437 | PFIXED_INFO pFixedInfo, PULONG pOutBufLen 438 | ); 439 | 440 | DWORD 441 | WINAPI 442 | GetAdaptersInfo( 443 | PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen 444 | ); 445 | 446 | #ifdef _WINSOCK2API_ 447 | 448 | // 449 | // The following functions require Winsock2. 450 | // 451 | 452 | DWORD 453 | WINAPI 454 | GetAdaptersAddresses( 455 | ULONG Family, 456 | DWORD Flags, 457 | PVOID Reserved, 458 | PIP_ADAPTER_ADDRESSES pAdapterAddresses, 459 | PULONG pOutBufLen 460 | ); 461 | 462 | #endif 463 | 464 | DWORD 465 | WINAPI 466 | GetPerAdapterInfo( 467 | ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen 468 | ); 469 | 470 | DWORD 471 | WINAPI 472 | IpReleaseAddress( 473 | PIP_ADAPTER_INDEX_MAP AdapterInfo 474 | ); 475 | 476 | 477 | DWORD 478 | WINAPI 479 | IpRenewAddress( 480 | PIP_ADAPTER_INDEX_MAP AdapterInfo 481 | ); 482 | 483 | DWORD 484 | WINAPI 485 | SendARP( 486 | IPAddr DestIP, 487 | IPAddr SrcIP, 488 | PULONG pMacAddr, 489 | PULONG PhyAddrLen 490 | ); 491 | 492 | BOOL 493 | WINAPI 494 | GetRTTAndHopCount( 495 | IPAddr DestIpAddress, 496 | PULONG HopCount, 497 | ULONG MaxHops, 498 | PULONG RTT 499 | ); 500 | 501 | DWORD 502 | WINAPI 503 | GetFriendlyIfIndex( 504 | DWORD IfIndex 505 | ); 506 | 507 | DWORD 508 | WINAPI 509 | EnableRouter( 510 | HANDLE* pHandle, 511 | OVERLAPPED* pOverlapped 512 | ); 513 | 514 | DWORD 515 | WINAPI 516 | UnenableRouter( 517 | OVERLAPPED* pOverlapped, 518 | LPDWORD lpdwEnableCount OPTIONAL 519 | ); 520 | DWORD 521 | WINAPI 522 | DisableMediaSense( 523 | HANDLE *pHandle, 524 | OVERLAPPED *pOverLapped 525 | ); 526 | 527 | DWORD 528 | WINAPI 529 | RestoreMediaSense( 530 | OVERLAPPED* pOverlapped, 531 | LPDWORD lpdwEnableCount OPTIONAL 532 | ); 533 | 534 | DWORD 535 | WINAPI 536 | GetIpErrorString( 537 | IN IP_STATUS ErrorCode, 538 | OUT PWCHAR Buffer, 539 | IN OUT PDWORD Size 540 | ); 541 | 542 | #ifdef __cplusplus 543 | } 544 | #endif 545 | 546 | #endif //__IPHLPAPI_H__ 547 | 548 | -------------------------------------------------------------------------------- /sources/NetBIOSScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/NetBIOSScan.cpp -------------------------------------------------------------------------------- /sources/NetBIOSScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_NETBIOSSCAN_H__219A28C1_7285_4EDC_BFCF_8C8F774F0472__INCLUDED_) 2 | #define AFX_NETBIOSSCAN_H__219A28C1_7285_4EDC_BFCF_8C8F774F0472__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | #pragma comment(lib,"netapi32.lib") 9 | #include "IPHlpApi.h" 10 | #pragma comment(lib,"IPHlpApi.lib") 11 | #include 12 | #include 13 | #pragma comment(lib,"Mpr.lib") 14 | #define SV_TYPE_TERMINALSERVER 0x2000000 15 | #define LIST_IP_INDEX 0 16 | #define LIST_IP_IP 1 17 | #define LIST_IP_HOSTNAME 2 18 | #define LIST_IP_ALIASES 3 19 | 20 | 21 | // NetBIOSScan.h : header file 22 | // 23 | 24 | ///////////////////////////////////////////////////////////////////////////// 25 | // CNetBIOSScan dialog 26 | 27 | class CNetBIOSScan : public CDialog 28 | { 29 | // Construction 30 | public: 31 | BOOL ReadTransport(USHORT *strIP,HTREEITEM rtItem); 32 | BOOL ReadSession(USHORT *strIP,HTREEITEM rtItem); 33 | BOOL ReadUser(USHORT *strIP,HTREEITEM rtItem); 34 | BOOL ReadProtocol(USHORT *strIP,HTREEITEM rtItem); 35 | BOOL ReadOS(USHORT *strIP,HTREEITEM rtItem); 36 | BOOL ReadLocalGroup(USHORT *strIP,HTREEITEM rtItem); 37 | BOOL ReadGroup(USHORT *strIP,HTREEITEM rtItem); 38 | BOOL ReadShareDirectory(USHORT *strIP,HTREEITEM rtItem); 39 | BOOL ReadTime(USHORT *strIP,HTREEITEM rtItem); 40 | BOOL ReadMAC(CString strIP,HTREEITEM rtItem); 41 | BOOL ReadHostName(CString strIP,HTREEITEM rtItem); 42 | BOOL ConnectServer(CString strIP,BOOL bConnect,HTREEITEM rtItem); 43 | CNetBIOSScan(CWnd* pParent = NULL); // standard constructor 44 | 45 | // Dialog Data 46 | //{{AFX_DATA(CNetBIOSScan) 47 | enum { IDD = IDD_DIALOGNETBIOSSCAN }; 48 | CTreeCtrl m_ctlTreeResult; 49 | CIPAddressCtrl m_ctlIP; 50 | //}}AFX_DATA 51 | 52 | 53 | // Overrides 54 | // ClassWizard generated virtual function overrides 55 | //{{AFX_VIRTUAL(CNetBIOSScan) 56 | protected: 57 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 58 | //}}AFX_VIRTUAL 59 | 60 | // Implementation 61 | protected: 62 | 63 | // Generated message map functions 64 | //{{AFX_MSG(CNetBIOSScan) 65 | virtual BOOL OnInitDialog(); 66 | afx_msg void OnBUTTONStart(); 67 | //}}AFX_MSG 68 | DECLARE_MESSAGE_MAP() 69 | }; 70 | 71 | //{{AFX_INSERT_LOCATION}} 72 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 73 | 74 | #endif // !defined(AFX_NETBIOSSCAN_H__219A28C1_7285_4EDC_BFCF_8C8F774F0472__INCLUDED_) 75 | -------------------------------------------------------------------------------- /sources/PortScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/PortScan.cpp -------------------------------------------------------------------------------- /sources/PortScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_PORTSCAN_H__FE155BE3_D1B2_4A89_A8E1_D0D661C4ED0F__INCLUDED_) 2 | #define AFX_PORTSCAN_H__FE155BE3_D1B2_4A89_A8E1_D0D661C4ED0F__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // PortScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CPortScan dialog 12 | 13 | class CPortScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | CString GetPortName(UINT uPort); 18 | CPortScan(CWnd* pParent = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CPortScan) 22 | enum { IDD = IDD_DIALOGPORTSCAN }; 23 | CTreeCtrl m_ctlTreeResult; 24 | CIPAddressCtrl m_ctlEndIP; 25 | CIPAddressCtrl m_ctlBeginIP; 26 | UINT m_uBeginPort; 27 | UINT m_uEndPort; 28 | //}}AFX_DATA 29 | 30 | 31 | // Overrides 32 | // ClassWizard generated virtual function overrides 33 | //{{AFX_VIRTUAL(CPortScan) 34 | protected: 35 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 36 | //}}AFX_VIRTUAL 37 | 38 | // Implementation 39 | protected: 40 | 41 | // Generated message map functions 42 | //{{AFX_MSG(CPortScan) 43 | virtual BOOL OnInitDialog(); 44 | afx_msg void OnBUTTONStart(); 45 | afx_msg void OnBUTTONStop(); 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | }; 49 | 50 | //{{AFX_INSERT_LOCATION}} 51 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 52 | 53 | #endif // !defined(AFX_PORTSCAN_H__FE155BE3_D1B2_4A89_A8E1_D0D661C4ED0F__INCLUDED_) 54 | -------------------------------------------------------------------------------- /sources/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | MICROSOFT FOUNDATION CLASS LIBRARY : Scanner 3 | ======================================================================== 4 | 5 | 6 | AppWizard has created this Scanner application for you. This application 7 | not only demonstrates the basics of using the Microsoft Foundation classes 8 | but is also a starting point for writing your application. 9 | 10 | This file contains a summary of what you will find in each of the files that 11 | make up your Scanner application. 12 | 13 | Scanner.dsp 14 | This file (the project file) contains information at the project level and 15 | is used to build a single project or subproject. Other users can share the 16 | project (.dsp) file, but they should export the makefiles locally. 17 | 18 | Scanner.h 19 | This is the main header file for the application. It includes other 20 | project specific headers (including Resource.h) and declares the 21 | CScannerApp application class. 22 | 23 | Scanner.cpp 24 | This is the main application source file that contains the application 25 | class CScannerApp. 26 | 27 | Scanner.rc 28 | This is a listing of all of the Microsoft Windows resources that the 29 | program uses. It includes the icons, bitmaps, and cursors that are stored 30 | in the RES subdirectory. This file can be directly edited in Microsoft 31 | Visual C++. 32 | 33 | Scanner.clw 34 | This file contains information used by ClassWizard to edit existing 35 | classes or add new classes. ClassWizard also uses this file to store 36 | information needed to create and edit message maps and dialog data 37 | maps and to create prototype member functions. 38 | 39 | res\Scanner.ico 40 | This is an icon file, which is used as the application's icon. This 41 | icon is included by the main resource file Scanner.rc. 42 | 43 | res\Scanner.rc2 44 | This file contains resources that are not edited by Microsoft 45 | Visual C++. You should place all resources not editable by 46 | the resource editor in this file. 47 | 48 | 49 | 50 | 51 | ///////////////////////////////////////////////////////////////////////////// 52 | 53 | AppWizard creates one dialog class: 54 | 55 | ScannerDlg.h, ScannerDlg.cpp - the dialog 56 | These files contain your CScannerDlg class. This class defines 57 | the behavior of your application's main dialog. The dialog's 58 | template is in Scanner.rc, which can be edited in Microsoft 59 | Visual C++. 60 | 61 | 62 | ///////////////////////////////////////////////////////////////////////////// 63 | Other standard files: 64 | 65 | StdAfx.h, StdAfx.cpp 66 | These files are used to build a precompiled header (PCH) file 67 | named Scanner.pch and a precompiled types file named StdAfx.obj. 68 | 69 | Resource.h 70 | This is the standard header file, which defines new resource IDs. 71 | Microsoft Visual C++ reads and updates this file. 72 | 73 | ///////////////////////////////////////////////////////////////////////////// 74 | Other notes: 75 | 76 | AppWizard uses "TODO:" to indicate parts of the source code you 77 | should add to or customize. 78 | 79 | If your application uses MFC in a shared DLL, and your application is 80 | in a language other than the operating system's current language, you 81 | will need to copy the corresponding localized resources MFC42XXX.DLL 82 | from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, 83 | and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. 84 | For example, MFC42DEU.DLL contains resources translated to German.) If you 85 | don't do this, some of the UI elements of your application will remain in the 86 | language of the operating system. 87 | 88 | ///////////////////////////////////////////////////////////////////////////// 89 | -------------------------------------------------------------------------------- /sources/Release/Scanner.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Release/Scanner.res -------------------------------------------------------------------------------- /sources/Release/rebort.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Release/rebort.html -------------------------------------------------------------------------------- /sources/Release/vc60.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Release/vc60.idb -------------------------------------------------------------------------------- /sources/SNMPScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/SNMPScan.cpp -------------------------------------------------------------------------------- /sources/SNMPScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SNMPSCAN_H__19DC7824_C561_4798_B952_01EF4A5AC24F__INCLUDED_) 2 | #define AFX_SNMPSCAN_H__19DC7824_C561_4798_B952_01EF4A5AC24F__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SNMPScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CSNMPScan dialog 12 | 13 | class CSNMPScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | CString GetValue(CString strIP,CString &strOid,UCHAR ucType); 18 | CSNMPScan(CWnd* pParent = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CSNMPScan) 22 | enum { IDD = IDD_DIALOGSNMPSCAN }; 23 | CIPAddressCtrl m_ctlIP; 24 | CTreeCtrl m_ctlTreeResult; 25 | //}}AFX_DATA 26 | 27 | 28 | // Overrides 29 | // ClassWizard generated virtual function overrides 30 | //{{AFX_VIRTUAL(CSNMPScan) 31 | protected: 32 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 33 | //}}AFX_VIRTUAL 34 | 35 | // Implementation 36 | protected: 37 | 38 | // Generated message map functions 39 | //{{AFX_MSG(CSNMPScan) 40 | virtual BOOL OnInitDialog(); 41 | afx_msg void OnBUTTONStart(); 42 | //}}AFX_MSG 43 | DECLARE_MESSAGE_MAP() 44 | }; 45 | 46 | //{{AFX_INSERT_LOCATION}} 47 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 48 | 49 | #endif // !defined(AFX_SNMPSCAN_H__19DC7824_C561_4798_B952_01EF4A5AC24F__INCLUDED_) 50 | -------------------------------------------------------------------------------- /sources/SQLScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/SQLScan.cpp -------------------------------------------------------------------------------- /sources/SQLScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SQLSCAN_H__F0FF8CB9_25FF_4FC8_8596_3ADA52B99E77__INCLUDED_) 2 | #define AFX_SQLSCAN_H__F0FF8CB9_25FF_4FC8_8596_3ADA52B99E77__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SQLScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CSQLScan dialog 12 | 13 | class CSQLScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | void ShowSendAndReceive(CString strSend,CString strReceive,CString strResult); 18 | CSQLScan(CWnd* pParent = NULL); // standard constructor 19 | 20 | // Dialog Data 21 | //{{AFX_DATA(CSQLScan) 22 | enum { IDD = IDD_DIALOGSQLSCAN }; 23 | CString m_strReceivePack; 24 | CString m_strSendPack; 25 | CString m_strSQLSign; 26 | CString m_strURL; 27 | CString m_strURLParam; 28 | CString m_strResult; 29 | //}}AFX_DATA 30 | 31 | 32 | // Overrides 33 | // ClassWizard generated virtual function overrides 34 | //{{AFX_VIRTUAL(CSQLScan) 35 | protected: 36 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 37 | //}}AFX_VIRTUAL 38 | 39 | // Implementation 40 | protected: 41 | 42 | // Generated message map functions 43 | //{{AFX_MSG(CSQLScan) 44 | virtual BOOL OnInitDialog(); 45 | afx_msg void OnBUTTONStart(); 46 | //}}AFX_MSG 47 | DECLARE_MESSAGE_MAP() 48 | }; 49 | 50 | //{{AFX_INSERT_LOCATION}} 51 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 52 | 53 | #endif // !defined(AFX_SQLSCAN_H__F0FF8CB9_25FF_4FC8_8596_3ADA52B99E77__INCLUDED_) 54 | -------------------------------------------------------------------------------- /sources/SSSelectIP.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/SSSelectIP.cpp -------------------------------------------------------------------------------- /sources/SSSelectIP.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SSSELECTIP_H__D4F17F5C_B082_488D_8506_EB785A12D767__INCLUDED_) 2 | #define AFX_SSSELECTIP_H__D4F17F5C_B082_488D_8506_EB785A12D767__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SSSelectIP.h : header file 8 | // 9 | 10 | #define MAXIP 20 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | // CSSSelectIP dialog 14 | 15 | class CSSSelectIP : public CDialog 16 | { 17 | // Construction 18 | public: 19 | int iTotalIP; 20 | int iCurSel; 21 | CString strIP[MAXIP]; 22 | CSSSelectIP(CWnd* pParent = NULL); // standard constructor 23 | 24 | // Dialog Data 25 | //{{AFX_DATA(CSSSelectIP) 26 | enum { IDD = IDD_DIALOGSSSelectIP }; 27 | CListBox m_ctlListIP; 28 | //}}AFX_DATA 29 | 30 | 31 | // Overrides 32 | // ClassWizard generated virtual function overrides 33 | //{{AFX_VIRTUAL(CSSSelectIP) 34 | protected: 35 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 36 | //}}AFX_VIRTUAL 37 | 38 | // Implementation 39 | protected: 40 | 41 | // Generated message map functions 42 | //{{AFX_MSG(CSSSelectIP) 43 | virtual BOOL OnInitDialog(); 44 | virtual void OnOK(); 45 | //}}AFX_MSG 46 | DECLARE_MESSAGE_MAP() 47 | }; 48 | 49 | //{{AFX_INSERT_LOCATION}} 50 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 51 | 52 | #endif // !defined(AFX_SSSELECTIP_H__D4F17F5C_B082_488D_8506_EB785A12D767__INCLUDED_) 53 | -------------------------------------------------------------------------------- /sources/Scanner.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.aps -------------------------------------------------------------------------------- /sources/Scanner.clw: -------------------------------------------------------------------------------- 1 | ; CLW file contains information for the MFC ClassWizard 2 | 3 | [General Info] 4 | Version=1 5 | LastClass=CSQLScan 6 | LastTemplate=CDialog 7 | NewFileInclude1=#include "stdafx.h" 8 | NewFileInclude2=#include "Scanner.h" 9 | 10 | ClassCount=14 11 | Class1=CScannerApp 12 | Class2=CScannerDlg 13 | Class3=CAboutDlg 14 | 15 | ResourceCount=14 16 | Resource1=IDD_DIALOGNETBIOSSCAN 17 | Resource2=IDR_MAINFRAME 18 | Resource3=IDD_ABOUTBOX 19 | Resource4=IDD_DIALOGDOSSCAN 20 | Class4=CHostScan 21 | Class5=CPortScan 22 | Resource5=IDD_DIALOGSQLSCAN 23 | Class6=CWeakKeyScan 24 | Resource6=IDD_DIALOGSSSelectIP 25 | Class7=CDosScan 26 | Resource7=IDD_DIALOGALLSCAN 27 | Class8=CSnifferScan 28 | Resource8=IDD_DIALOGHOSTSCAN 29 | Class9=CSSSelectIP 30 | Resource9=IDD_DIALOGSNIFFERSCAN 31 | Class10=CSQLScan 32 | Resource10=IDD_DIALOGWEAKKEYSCAN 33 | Class11=CNetBIOSScan 34 | Resource11=IDD_DIALOGSNMPSCAN 35 | Class12=CSNMPScan 36 | Resource12=IDD_DIALOGPORTSCAN 37 | Class13=CAllScan 38 | Resource13=IDD_SCANNER_DIALOG 39 | Class14=CCmdDlg 40 | Resource14=IDD_DIALOGCMD 41 | 42 | [CLS:CScannerApp] 43 | Type=0 44 | HeaderFile=Scanner.h 45 | ImplementationFile=Scanner.cpp 46 | Filter=N 47 | 48 | [CLS:CScannerDlg] 49 | Type=0 50 | HeaderFile=ScannerDlg.h 51 | ImplementationFile=ScannerDlg.cpp 52 | Filter=D 53 | BaseClass=CDialog 54 | VirtualFilter=dWC 55 | LastObject=IDC_EDITTest 56 | 57 | [CLS:CAboutDlg] 58 | Type=0 59 | HeaderFile=ScannerDlg.h 60 | ImplementationFile=ScannerDlg.cpp 61 | Filter=D 62 | 63 | [DLG:IDD_ABOUTBOX] 64 | Type=1 65 | Class=CAboutDlg 66 | ControlCount=4 67 | Control1=IDC_STATIC,static,1342177283 68 | Control2=IDC_STATIC,static,1342308480 69 | Control3=IDC_STATIC,static,1342308352 70 | Control4=IDOK,button,1342373889 71 | 72 | [DLG:IDD_SCANNER_DIALOG] 73 | Type=1 74 | Class=CScannerDlg 75 | ControlCount=1 76 | Control1=IDC_TABMAIN,SysTabControl32,1342177280 77 | 78 | [DLG:IDD_DIALOGHOSTSCAN] 79 | Type=1 80 | Class=CHostScan 81 | ControlCount=8 82 | Control1=IDC_STATIC,static,1342308352 83 | Control2=IDC_STATIC,static,1342308352 84 | Control3=IDC_BUTTONStartScan,button,1342242816 85 | Control4=IDC_LISTResult,SysListView32,1350631429 86 | Control5=IDC_IPADDRESSBegin,SysIPAddress32,1342242816 87 | Control6=IDC_IPADDRESSEnd,SysIPAddress32,1342242816 88 | Control7=IDC_BUTTONStopScan,button,1342242816 89 | Control8=IDC_BUTTONCmd,button,1342242816 90 | 91 | [DLG:IDD_DIALOGPORTSCAN] 92 | Type=1 93 | Class=CPortScan 94 | ControlCount=11 95 | Control1=IDC_STATIC,static,1342308352 96 | Control2=IDC_IPADDRESSBgeinIP,SysIPAddress32,1342242816 97 | Control3=IDC_STATIC,static,1342308352 98 | Control4=IDC_IPADDRESSEndIP,SysIPAddress32,1342242816 99 | Control5=IDC_STATIC,static,1342308352 100 | Control6=IDC_EDITBeginPort,edit,1350631552 101 | Control7=IDC_STATIC,static,1342308352 102 | Control8=IDC_EDITEndPort,edit,1350631552 103 | Control9=IDC_BUTTONStart,button,1342242816 104 | Control10=IDC_TREEResult,SysTreeView32,1350631431 105 | Control11=IDC_BUTTONStop,button,1342242816 106 | 107 | [CLS:CHostScan] 108 | Type=0 109 | HeaderFile=HostScan.h 110 | ImplementationFile=HostScan.cpp 111 | BaseClass=CDialog 112 | Filter=D 113 | VirtualFilter=dWC 114 | LastObject=IDC_BUTTONStartScan 115 | 116 | [CLS:CPortScan] 117 | Type=0 118 | HeaderFile=PortScan.h 119 | ImplementationFile=PortScan.cpp 120 | BaseClass=CDialog 121 | Filter=D 122 | LastObject=CPortScan 123 | VirtualFilter=dWC 124 | 125 | [DLG:IDD_DIALOGWEAKKEYSCAN] 126 | Type=1 127 | Class=CWeakKeyScan 128 | ControlCount=23 129 | Control1=IDC_STATIC,static,1342308352 130 | Control2=IDC_IPADDRESSIP,SysIPAddress32,1342242816 131 | Control3=IDC_BUTTONStart,button,1342242816 132 | Control4=IDC_EDITUSERNAME,edit,1350631552 133 | Control5=IDC_STATIC,static,1342308353 134 | Control6=IDC_EDITPrefix,edit,1350631552 135 | Control7=IDC_STATIC,static,1342308353 136 | Control8=IDC_EDITPostfix,edit,1350631552 137 | Control9=IDC_STATIC,static,1342308352 138 | Control10=IDC_COMBOLENGTH,combobox,1344340226 139 | Control11=IDC_CHECKCAPITAL,button,1342373891 140 | Control12=IDC_CHECKLOWER,button,1342242819 141 | Control13=IDC_CHECKNUMBER,button,1342242819 142 | Control14=IDC_CHECKSPECIAL,button,1342242819 143 | Control15=IDC_EDITWEAKKEYRESULT,edit,1350631552 144 | Control16=IDC_CHECKSelfDefine,button,1342242819 145 | Control17=IDC_EDITSelfDefine,edit,1350631552 146 | Control18=IDC_STATIC,button,1342177287 147 | Control19=IDC_STATIC,button,1342177287 148 | Control20=IDC_BUTTONStop,button,1342242816 149 | Control21=IDC_COMBOPwType,combobox,1344340226 150 | Control22=IDC_EDITPwType,edit,1350633600 151 | Control23=IDC_COMBOUsername,combobox,1344340226 152 | 153 | [CLS:CWeakKeyScan] 154 | Type=0 155 | HeaderFile=WeakKeyScan.h 156 | ImplementationFile=WeakKeyScan.cpp 157 | BaseClass=CDialog 158 | Filter=D 159 | LastObject=CWeakKeyScan 160 | VirtualFilter=dWC 161 | 162 | [DLG:IDD_DIALOGDOSSCAN] 163 | Type=1 164 | Class=CDosScan 165 | ControlCount=9 166 | Control1=IDC_STATIC,static,1342308352 167 | Control2=IDC_IPADDRESSTARGETIP,SysIPAddress32,1342242816 168 | Control3=IDC_STATIC,static,1342308352 169 | Control4=IDC_EDITTARGETPORT,edit,1350631552 170 | Control5=IDC_STATIC,static,1342308352 171 | Control6=IDC_EDITTHREADCOUNT,edit,1350631552 172 | Control7=IDC_BUTTONStart,button,1342242816 173 | Control8=IDC_BUTTONStop,button,1342242816 174 | Control9=IDC_EDITComment,edit,1350631552 175 | 176 | [CLS:CDosScan] 177 | Type=0 178 | HeaderFile=DosScan.h 179 | ImplementationFile=DosScan.cpp 180 | BaseClass=CDialog 181 | Filter=D 182 | LastObject=IDC_EDIT1 183 | VirtualFilter=dWC 184 | 185 | [DLG:IDD_DIALOGSNIFFERSCAN] 186 | Type=1 187 | Class=CSnifferScan 188 | ControlCount=11 189 | Control1=IDC_LISTReceive,SysListView32,1350631429 190 | Control2=IDC_LISTKeyword,listbox,1352728835 191 | Control3=IDC_BUTTONStart,button,1342242816 192 | Control4=IDC_BUTTONStop,button,1342242816 193 | Control5=IDC_EDITComment,edit,1350631552 194 | Control6=IDC_BUTTONClear,button,1342242816 195 | Control7=IDC_BUTTONAddKW,button,1342242816 196 | Control8=IDC_EDITKeyword,edit,1350631552 197 | Control9=IDC_BUTTONDeleteKW,button,1342242816 198 | Control10=IDC_EDITContent,edit,1353777284 199 | Control11=IDC_STATIC,button,1342177287 200 | 201 | [CLS:CSnifferScan] 202 | Type=0 203 | HeaderFile=SnifferScan.h 204 | ImplementationFile=SnifferScan.cpp 205 | BaseClass=CDialog 206 | Filter=D 207 | VirtualFilter=dWC 208 | LastObject=IDC_BUTTONClear 209 | 210 | [DLG:IDD_DIALOGSSSelectIP] 211 | Type=1 212 | Class=CSSSelectIP 213 | ControlCount=3 214 | Control1=IDOK,button,1342242817 215 | Control2=IDCANCEL,button,1342242816 216 | Control3=IDC_LISTIP,listbox,1352728835 217 | 218 | [CLS:CSSSelectIP] 219 | Type=0 220 | HeaderFile=SSSelectIP.h 221 | ImplementationFile=SSSelectIP.cpp 222 | BaseClass=CDialog 223 | Filter=D 224 | VirtualFilter=dWC 225 | 226 | [DLG:IDD_DIALOGSQLSCAN] 227 | Type=1 228 | Class=CSQLScan 229 | ControlCount=12 230 | Control1=IDC_STATIC,static,1342308352 231 | Control2=IDC_EDITURL,edit,1350631552 232 | Control3=IDC_STATIC,static,1342308352 233 | Control4=IDC_EDITURLParam,edit,1350631552 234 | Control5=IDC_STATIC,static,1342308352 235 | Control6=IDC_EDITSQLSign,edit,1350631552 236 | Control7=IDC_STATIC,button,1342177287 237 | Control8=IDC_EDITSendPack,edit,1352728708 238 | Control9=IDC_STATIC,button,1342177287 239 | Control10=IDC_EDITReveivePack,edit,1352728708 240 | Control11=IDC_BUTTONStart,button,1342242816 241 | Control12=IDC_EDITResult,edit,1350631552 242 | 243 | [CLS:CSQLScan] 244 | Type=0 245 | HeaderFile=SQLScan.h 246 | ImplementationFile=SQLScan.cpp 247 | BaseClass=CDialog 248 | Filter=D 249 | VirtualFilter=dWC 250 | LastObject=CSQLScan 251 | 252 | [DLG:IDD_DIALOGNETBIOSSCAN] 253 | Type=1 254 | Class=CNetBIOSScan 255 | ControlCount=4 256 | Control1=IDC_IPADDRESSIP,SysIPAddress32,1342242816 257 | Control2=IDC_STATIC,static,1342308352 258 | Control3=IDC_BUTTONStart,button,1342242816 259 | Control4=IDC_TREEResult,SysTreeView32,1350631431 260 | 261 | [CLS:CNetBIOSScan] 262 | Type=0 263 | HeaderFile=NetBIOSScan.h 264 | ImplementationFile=NetBIOSScan.cpp 265 | BaseClass=CDialog 266 | Filter=D 267 | LastObject=CNetBIOSScan 268 | VirtualFilter=dWC 269 | 270 | [DLG:IDD_DIALOGSNMPSCAN] 271 | Type=1 272 | Class=CSNMPScan 273 | ControlCount=4 274 | Control1=IDC_STATIC,static,1342308352 275 | Control2=IDC_IPADDRESSTarget,SysIPAddress32,1342242816 276 | Control3=IDC_BUTTONStart,button,1342242816 277 | Control4=IDC_TREEResult,SysTreeView32,1350631431 278 | 279 | [CLS:CSNMPScan] 280 | Type=0 281 | HeaderFile=SNMPScan.h 282 | ImplementationFile=SNMPScan.cpp 283 | BaseClass=CDialog 284 | Filter=D 285 | VirtualFilter=dWC 286 | LastObject=CSNMPScan 287 | 288 | [DLG:IDD_DIALOGALLSCAN] 289 | Type=1 290 | Class=CAllScan 291 | ControlCount=16 292 | Control1=IDC_BUTTONStart,button,1342242816 293 | Control2=IDC_STATIC,button,1342177287 294 | Control3=IDC_CHECKHostScan,button,1342242819 295 | Control4=IDC_CHECKPortScan,button,1342242819 296 | Control5=IDC_CHECKWeakKeyScan,button,1342242819 297 | Control6=IDC_CHECKDDOSScan,button,1342242819 298 | Control7=IDC_CHECKSnifferScan,button,1342242819 299 | Control8=IDC_CHECKSQLScan,button,1342242819 300 | Control9=IDC_CHECKNetBIOSScan,button,1342242819 301 | Control10=IDC_CHECKSNMPScan,button,1342242819 302 | Control11=IDC_STATIC,button,1342177287 303 | Control12=IDC_RADIOHtml,button,1342308361 304 | Control13=IDC_RADIOTxt,button,1342177289 305 | Control14=IDC_RADIOXml,button,1342177289 306 | Control15=IDC_STATIC,static,1342308352 307 | Control16=IDC_IPADDRESSTarget,SysIPAddress32,1342242816 308 | 309 | [CLS:CAllScan] 310 | Type=0 311 | HeaderFile=AllScan.h 312 | ImplementationFile=AllScan.cpp 313 | BaseClass=CDialog 314 | Filter=D 315 | LastObject=IDC_EDIT1 316 | VirtualFilter=dWC 317 | 318 | [DLG:IDD_DIALOGCMD] 319 | Type=1 320 | Class=CCmdDlg 321 | ControlCount=4 322 | Control1=IDC_STATIC,static,1342308865 323 | Control2=IDC_EDITCommand,edit,1350631552 324 | Control3=IDC_BUTTONExecute,button,1342242816 325 | Control4=IDC_EDITResult,edit,1352728708 326 | 327 | [CLS:CCmdDlg] 328 | Type=0 329 | HeaderFile=CmdDlg.h 330 | ImplementationFile=CmdDlg.cpp 331 | BaseClass=CDialog 332 | Filter=D 333 | VirtualFilter=dWC 334 | LastObject=CCmdDlg 335 | 336 | 337 | 338 | -------------------------------------------------------------------------------- /sources/Scanner.cpp: -------------------------------------------------------------------------------- 1 | // Scanner.cpp : Defines the class behaviors for the application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "Scanner.h" 6 | #include "ScannerDlg.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // CScannerApp 16 | 17 | BEGIN_MESSAGE_MAP(CScannerApp, CWinApp) 18 | //{{AFX_MSG_MAP(CScannerApp) 19 | // NOTE - the ClassWizard will add and remove mapping macros here. 20 | // DO NOT EDIT what you see in these blocks of generated code! 21 | //}}AFX_MSG16 22 | ON_COMMAND(ID_HELP, CWinApp::OnHelp) 23 | END_MESSAGE_MAP() 24 | 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // CScannerApp construction 27 | 28 | CScannerApp::CScannerApp() 29 | { 30 | // TODO: add construction code here, 31 | // Place all significant initialization in InitInstance 32 | } 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | // The one and only CScannerApp object 36 | 37 | CScannerApp theApp; 38 | 39 | ///////////////////////////////////////////////////////////////////////////// 40 | // CScannerApp initialization 41 | 42 | BOOL CScannerApp::InitInstance() 43 | { 44 | AfxEnableControlContainer(); 45 | 46 | // Standard initialization 47 | // If you are not using these features and wish to reduce the size 48 | // of your final executable, you should remove from the following 49 | // the specific initialization routines you do not need. 50 | 51 | #ifdef _AFXDLL 52 | Enable3dControls(); // Call this when using MFC in a shared DLL 53 | #else 54 | Enable3dControlsStatic(); // Call this when linking to MFC statically 55 | #endif 56 | 57 | CScannerDlg dlg; 58 | m_pMainWnd = &dlg; 59 | int nResponse = dlg.DoModal(); 60 | if (nResponse == IDOK) 61 | { 62 | // TODO: Place code here to handle when the dialog is 63 | // dismissed with OK 64 | } 65 | else if (nResponse == IDCANCEL) 66 | { 67 | // TODO: Place code here to handle when the dialog is 68 | // dismissed with Cancel 69 | } 70 | 71 | // Since the dialog has been closed, return FALSE so that we exit the 72 | // application, rather than start the application's message pump. 73 | return FALSE; 74 | } 75 | -------------------------------------------------------------------------------- /sources/Scanner.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Scanner" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=Scanner - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Scanner.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Scanner.mak" CFG="Scanner - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Scanner - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "Scanner - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "Scanner - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 2 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "Release" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /YX /FD /c 46 | # ADD BASE RSC /l 0x804 /d "NDEBUG" 47 | # ADD RSC /l 0x804 /d "NDEBUG" /d "_AFXDLL" 48 | BSC32=bscmake.exe 49 | # ADD BASE BSC32 /nologo 50 | # ADD BSC32 /nologo 51 | LINK32=link.exe 52 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | # ADD LINK32 /nologo /subsystem:windows /machine:I386 54 | # SUBTRACT LINK32 /pdb:none 55 | 56 | !ELSEIF "$(CFG)" == "Scanner - Win32 Debug" 57 | 58 | # PROP BASE Use_MFC 0 59 | # PROP BASE Use_Debug_Libraries 1 60 | # PROP BASE Output_Dir "Debug" 61 | # PROP BASE Intermediate_Dir "Debug" 62 | # PROP BASE Target_Dir "" 63 | # PROP Use_MFC 2 64 | # PROP Use_Debug_Libraries 1 65 | # PROP Output_Dir "Debug" 66 | # PROP Intermediate_Dir "Debug" 67 | # PROP Ignore_Export_Lib 0 68 | # PROP Target_Dir "" 69 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 70 | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /YX /FD /GZ /c 71 | # ADD BASE RSC /l 0x804 /d "_DEBUG" 72 | # ADD RSC /l 0x804 /d "_DEBUG" /d "_AFXDLL" 73 | BSC32=bscmake.exe 74 | # ADD BASE BSC32 /nologo 75 | # ADD BSC32 /nologo 76 | LINK32=link.exe 77 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | # ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 79 | # SUBTRACT LINK32 /pdb:none 80 | 81 | !ENDIF 82 | 83 | # Begin Target 84 | 85 | # Name "Scanner - Win32 Release" 86 | # Name "Scanner - Win32 Debug" 87 | # Begin Source File 88 | 89 | SOURCE=.\AllScan.cpp 90 | # End Source File 91 | # Begin Source File 92 | 93 | SOURCE=.\AllScan.h 94 | # End Source File 95 | # Begin Source File 96 | 97 | SOURCE=.\CmdDlg.cpp 98 | # End Source File 99 | # Begin Source File 100 | 101 | SOURCE=.\CmdDlg.h 102 | # End Source File 103 | # Begin Source File 104 | 105 | SOURCE=.\DosScan.cpp 106 | # End Source File 107 | # Begin Source File 108 | 109 | SOURCE=.\DosScan.h 110 | # End Source File 111 | # Begin Source File 112 | 113 | SOURCE=.\HostScan.cpp 114 | # End Source File 115 | # Begin Source File 116 | 117 | SOURCE=.\HostScan.h 118 | # End Source File 119 | # Begin Source File 120 | 121 | SOURCE=.\IPEXPORT.H 122 | # End Source File 123 | # Begin Source File 124 | 125 | SOURCE=.\Iphlpapi.h 126 | # End Source File 127 | # Begin Source File 128 | 129 | SOURCE=.\IPTYPES.H 130 | # End Source File 131 | # Begin Source File 132 | 133 | SOURCE=.\NetBIOSScan.cpp 134 | # End Source File 135 | # Begin Source File 136 | 137 | SOURCE=.\NetBIOSScan.h 138 | # End Source File 139 | # Begin Source File 140 | 141 | SOURCE=.\PortScan.cpp 142 | # End Source File 143 | # Begin Source File 144 | 145 | SOURCE=.\PortScan.h 146 | # End Source File 147 | # Begin Source File 148 | 149 | SOURCE=.\resource.h 150 | # End Source File 151 | # Begin Source File 152 | 153 | SOURCE=.\Scanner.cpp 154 | # End Source File 155 | # Begin Source File 156 | 157 | SOURCE=.\Scanner.h 158 | # End Source File 159 | # Begin Source File 160 | 161 | SOURCE=.\Scanner.rc 162 | # End Source File 163 | # Begin Source File 164 | 165 | SOURCE=.\ScannerDlg.cpp 166 | # End Source File 167 | # Begin Source File 168 | 169 | SOURCE=.\ScannerDlg.h 170 | # End Source File 171 | # Begin Source File 172 | 173 | SOURCE=.\SnifferScan.cpp 174 | # End Source File 175 | # Begin Source File 176 | 177 | SOURCE=.\SnifferScan.h 178 | # End Source File 179 | # Begin Source File 180 | 181 | SOURCE=.\SNMPScan.cpp 182 | # End Source File 183 | # Begin Source File 184 | 185 | SOURCE=.\SNMPScan.h 186 | # End Source File 187 | # Begin Source File 188 | 189 | SOURCE=.\SQLScan.cpp 190 | # End Source File 191 | # Begin Source File 192 | 193 | SOURCE=.\SQLScan.h 194 | # End Source File 195 | # Begin Source File 196 | 197 | SOURCE=.\SSSelectIP.cpp 198 | # End Source File 199 | # Begin Source File 200 | 201 | SOURCE=.\SSSelectIP.h 202 | # End Source File 203 | # Begin Source File 204 | 205 | SOURCE=.\StdAfx.cpp 206 | # End Source File 207 | # Begin Source File 208 | 209 | SOURCE=.\StdAfx.h 210 | # End Source File 211 | # Begin Source File 212 | 213 | SOURCE=.\WeakKeyScan.cpp 214 | # End Source File 215 | # Begin Source File 216 | 217 | SOURCE=.\WeakKeyScan.h 218 | # End Source File 219 | # End Target 220 | # End Project 221 | -------------------------------------------------------------------------------- /sources/Scanner.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.dsw -------------------------------------------------------------------------------- /sources/Scanner.h: -------------------------------------------------------------------------------- 1 | // Scanner.h : main header file for the SCANNER application 2 | // 3 | 4 | #if !defined(AFX_SCANNER_H__26439124_DB22_4E95_80BC_CED310590F9E__INCLUDED_) 5 | #define AFX_SCANNER_H__26439124_DB22_4E95_80BC_CED310590F9E__INCLUDED_ 6 | 7 | #if _MSC_VER > 1000 8 | #pragma once 9 | #endif // _MSC_VER > 1000 10 | 11 | #ifndef __AFXWIN_H__ 12 | #error include 'stdafx.h' before including this file for PCH 13 | #endif 14 | 15 | #include "resource.h" // main symbols 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // CScannerApp: 19 | // See Scanner.cpp for the implementation of this class 20 | // 21 | 22 | class CScannerApp : public CWinApp 23 | { 24 | public: 25 | CScannerApp(); 26 | 27 | // Overrides 28 | // ClassWizard generated virtual function overrides 29 | //{{AFX_VIRTUAL(CScannerApp) 30 | public: 31 | virtual BOOL InitInstance(); 32 | //}}AFX_VIRTUAL 33 | 34 | // Implementation 35 | 36 | //{{AFX_MSG(CScannerApp) 37 | // NOTE - the ClassWizard will add and remove member functions here. 38 | // DO NOT EDIT what you see in these blocks of generated code ! 39 | //}}AFX_MSG 40 | DECLARE_MESSAGE_MAP() 41 | }; 42 | 43 | 44 | ///////////////////////////////////////////////////////////////////////////// 45 | 46 | //{{AFX_INSERT_LOCATION}} 47 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 48 | 49 | #endif // !defined(AFX_SCANNER_H__26439124_DB22_4E95_80BC_CED310590F9E__INCLUDED_) 50 | -------------------------------------------------------------------------------- /sources/Scanner.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.ncb -------------------------------------------------------------------------------- /sources/Scanner.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.opt -------------------------------------------------------------------------------- /sources/Scanner.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: Scanner - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\Users\ADMINI~1\AppData\Local\Temp\RSP6751.tmp" with contents 10 | [ 11 | /nologo /subsystem:windows /incremental:yes /pdb:"Debug/Scanner.pdb" /debug /machine:I386 /out:"Debug/Scanner.exe" /pdbtype:sept 12 | ".\Debug\AllScan.obj" 13 | ".\Debug\CmdDlg.obj" 14 | ".\Debug\DosScan.obj" 15 | ".\Debug\HostScan.obj" 16 | ".\Debug\NetBIOSScan.obj" 17 | ".\Debug\PortScan.obj" 18 | ".\Debug\Scanner.obj" 19 | ".\Debug\ScannerDlg.obj" 20 | ".\Debug\SnifferScan.obj" 21 | ".\Debug\SNMPScan.obj" 22 | ".\Debug\SQLScan.obj" 23 | ".\Debug\SSSelectIP.obj" 24 | ".\Debug\StdAfx.obj" 25 | ".\Debug\WeakKeyScan.obj" 26 | ".\Debug\Scanner.res" 27 | ] 28 | Creating command line "link.exe @C:\Users\ADMINI~1\AppData\Local\Temp\RSP6751.tmp" 29 |

Output Window

30 | Linking... 31 | 32 | 33 | 34 |

Results

35 | Scanner.exe - 0 error(s), 0 warning(s) 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /sources/Scanner.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.rc -------------------------------------------------------------------------------- /sources/Scanner.rc.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.rc.bak -------------------------------------------------------------------------------- /sources/Scanner.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scanner", "Scanner.vcproj", "{B2A0BB4F-2B73-43D1-B232-EA7006AC2045}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {B2A0BB4F-2B73-43D1-B232-EA7006AC2045}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {B2A0BB4F-2B73-43D1-B232-EA7006AC2045}.Debug|Win32.Build.0 = Debug|Win32 14 | {B2A0BB4F-2B73-43D1-B232-EA7006AC2045}.Release|Win32.ActiveCfg = Release|Win32 15 | {B2A0BB4F-2B73-43D1-B232-EA7006AC2045}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /sources/Scanner.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/Scanner.suo -------------------------------------------------------------------------------- /sources/Scanner.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 28 | 31 | 34 | 37 | 40 | 49 | 67 | 70 | 75 | 78 | 90 | 93 | 96 | 99 | 104 | 107 | 110 | 113 | 114 | 124 | 127 | 130 | 133 | 136 | 145 | 162 | 165 | 170 | 173 | 184 | 187 | 190 | 193 | 198 | 201 | 204 | 207 | 208 | 209 | 210 | 211 | 212 | 216 | 219 | 222 | 226 | 227 | 230 | 234 | 235 | 236 | 239 | 242 | 246 | 247 | 250 | 254 | 255 | 256 | 259 | 262 | 266 | 267 | 270 | 274 | 275 | 276 | 279 | 282 | 286 | 287 | 290 | 294 | 295 | 296 | 299 | 302 | 306 | 307 | 310 | 314 | 315 | 316 | 319 | 322 | 326 | 327 | 330 | 334 | 335 | 336 | 339 | 342 | 346 | 347 | 350 | 354 | 355 | 356 | 359 | 362 | 366 | 367 | 370 | 374 | 375 | 376 | 379 | 382 | 386 | 387 | 390 | 394 | 395 | 396 | 399 | 402 | 406 | 407 | 410 | 414 | 415 | 416 | 419 | 422 | 426 | 427 | 430 | 434 | 435 | 436 | 439 | 442 | 446 | 447 | 450 | 454 | 455 | 456 | 459 | 462 | 466 | 467 | 470 | 474 | 475 | 476 | 479 | 482 | 487 | 488 | 491 | 496 | 497 | 498 | 501 | 504 | 508 | 509 | 512 | 516 | 517 | 518 | 519 | 523 | 526 | 527 | 530 | 531 | 534 | 535 | 538 | 539 | 542 | 543 | 546 | 547 | 550 | 551 | 554 | 555 | 558 | 559 | 562 | 563 | 566 | 567 | 570 | 571 | 574 | 575 | 578 | 579 | 582 | 583 | 584 | 588 | 591 | 592 | 595 | 596 | 597 | 600 | 601 | 602 | 603 | 604 | 605 | -------------------------------------------------------------------------------- /sources/Scanner.vcproj.HYT-PC1.ls.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /sources/ScannerDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/ScannerDlg.cpp -------------------------------------------------------------------------------- /sources/ScannerDlg.h: -------------------------------------------------------------------------------- 1 | // ScannerDlg.h : header file 2 | // 3 | 4 | #if !defined(AFX_SCANNERDLG_H__89652A0B_2938_4B76_AD85_069C53C61EFC__INCLUDED_) 5 | #define AFX_SCANNERDLG_H__89652A0B_2938_4B76_AD85_069C53C61EFC__INCLUDED_ 6 | 7 | #include "DosScan.h" // Added by ClassView 8 | #include "HostScan.h" // Added by ClassView 9 | #include "PortScan.h" 10 | #include "WeakKeyScan.h" // Added by ClassView 11 | #include "SnifferScan.h" 12 | #include "SQLScan.h" 13 | #include "NetBIOSScan.h" 14 | #include "SNMPScan.h" 15 | #include "AllScan.h" 16 | #if _MSC_VER > 1000 17 | #pragma once 18 | #endif // _MSC_VER > 1000 19 | 20 | 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // CScannerDlg dialog 24 | 25 | class CScannerDlg : public CDialog 26 | { 27 | // Construction 28 | public: 29 | CAllScan m_AllScanTab; 30 | CSNMPScan m_SNMPScanTap; 31 | CNetBIOSScan m_NetBIOSScanTab; 32 | CSQLScan m_SQLScanTab; 33 | CSnifferScan m_SnifferScanTab; 34 | CDosScan m_DosScanTab; 35 | CWeakKeyScan m_WeakKeyScanTab; 36 | CPortScan m_PortScanTab; 37 | CHostScan m_HostScanTab; 38 | CScannerDlg(CWnd* pParent = NULL); // standard constructor 39 | 40 | // Dialog Data 41 | //{{AFX_DATA(CScannerDlg) 42 | enum { IDD = IDD_SCANNER_DIALOG }; 43 | CTabCtrl m_TabMain; 44 | //}}AFX_DATA 45 | 46 | // ClassWizard generated virtual function overrides 47 | //{{AFX_VIRTUAL(CScannerDlg) 48 | protected: 49 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 50 | //}}AFX_VIRTUAL 51 | 52 | // Implementation 53 | protected: 54 | HICON m_hIcon; 55 | 56 | // Generated message map functions 57 | //{{AFX_MSG(CScannerDlg) 58 | virtual BOOL OnInitDialog(); 59 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 60 | afx_msg void OnPaint(); 61 | afx_msg HCURSOR OnQueryDragIcon(); 62 | afx_msg void OnSelchangeTabmain(NMHDR* pNMHDR, LRESULT* pResult); 63 | afx_msg void OnClose(); 64 | //}}AFX_MSG 65 | DECLARE_MESSAGE_MAP() 66 | }; 67 | 68 | //{{AFX_INSERT_LOCATION}} 69 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 70 | 71 | #endif // !defined(AFX_SCANNERDLG_H__89652A0B_2938_4B76_AD85_069C53C61EFC__INCLUDED_) 72 | 73 | -------------------------------------------------------------------------------- /sources/SnifferScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/SnifferScan.cpp -------------------------------------------------------------------------------- /sources/SnifferScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_SNIFFERSCAN_H__3387FED3_B80D_452E_9194_4E80D493004E__INCLUDED_) 2 | #define AFX_SNIFFERSCAN_H__3387FED3_B80D_452E_9194_4E80D493004E__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // SnifferScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CSnifferScan dialog 12 | 13 | class CSnifferScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | CSnifferScan(CWnd* pParent = NULL); // standard constructor 18 | 19 | // Dialog Data 20 | //{{AFX_DATA(CSnifferScan) 21 | enum { IDD = IDD_DIALOGSNIFFERSCAN }; 22 | CListBox m_ctlListKeyword; 23 | CListCtrl m_ctlListReceive; 24 | CString m_strComment; 25 | CString m_strKeyword; 26 | CString m_strContent; 27 | //}}AFX_DATA 28 | 29 | 30 | // Overrides 31 | // ClassWizard generated virtual function overrides 32 | //{{AFX_VIRTUAL(CSnifferScan) 33 | protected: 34 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 35 | //}}AFX_VIRTUAL 36 | 37 | // Implementation 38 | protected: 39 | 40 | // Generated message map functions 41 | //{{AFX_MSG(CSnifferScan) 42 | virtual BOOL OnInitDialog(); 43 | afx_msg void OnBUTTONStart(); 44 | afx_msg void OnBUTTONStop(); 45 | afx_msg void OnClickLISTReceive(NMHDR* pNMHDR, LRESULT* pResult); 46 | afx_msg void OnDblclkLISTReceive(NMHDR* pNMHDR, LRESULT* pResult); 47 | afx_msg void OnBUTTONClear(); 48 | afx_msg void OnBUTTONAddKW(); 49 | afx_msg void OnBUTTONDeleteKW(); 50 | //}}AFX_MSG 51 | DECLARE_MESSAGE_MAP() 52 | }; 53 | 54 | //{{AFX_INSERT_LOCATION}} 55 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 56 | 57 | #endif // !defined(AFX_SNIFFERSCAN_H__3387FED3_B80D_452E_9194_4E80D493004E__INCLUDED_) 58 | -------------------------------------------------------------------------------- /sources/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Scanner.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | CString IPIntToStr(UINT IPInt) 8 | { 9 | UNIONIP IP; 10 | CString IPStr; 11 | 12 | IP.uInt=IPInt; 13 | IPStr.Format("%d.%d.%d.%d",IP.ucByte[0],IP.ucByte[1],IP.ucByte[2],IP.ucByte[3]); 14 | return IPStr; 15 | } 16 | 17 | UINT IPStrToInt(CString IPStr) 18 | { 19 | UNIONIP IP; 20 | 21 | int i,j=0; 22 | IPStr.TrimLeft(" "); 23 | IPStr.TrimRight(" "); 24 | for (i=0;i'9') 27 | if (IPStr.GetAt(i) == '.') 28 | j++; 29 | else 30 | return 0; 31 | } 32 | if (j!=3) 33 | return 0; 34 | i=0; 35 | IPStr+="."; 36 | CString temp; 37 | for (int m=0;m<4;m++) 38 | { 39 | temp=""; 40 | while (IPStr.GetAt(i) != '.') 41 | { 42 | temp+=IPStr.GetAt(i); 43 | i++; 44 | } 45 | i++; 46 | if (temp=="" || atoi(temp) > 0xFF) 47 | return 0; 48 | else 49 | IP.ucByte[m]=atoi(temp); 50 | } 51 | return IP.uInt; 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /sources/StdAfx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/StdAfx.h -------------------------------------------------------------------------------- /sources/WeakKeyScan.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/WeakKeyScan.cpp -------------------------------------------------------------------------------- /sources/WeakKeyScan.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_WEAKKEYSCAN_H__0DA228BA_8050_4876_B23F_214F60010029__INCLUDED_) 2 | #define AFX_WEAKKEYSCAN_H__0DA228BA_8050_4876_B23F_214F60010029__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // WeakKeyScan.h : header file 8 | // 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // CWeakKeyScan dialog 12 | 13 | class CWeakKeyScan : public CDialog 14 | { 15 | // Construction 16 | public: 17 | void BruteForceScan(CString strUsername); 18 | BOOL ConnectServer(CString strPass,CString strUser); 19 | CWeakKeyScan(CWnd* pParent = NULL); // standard constructor 20 | 21 | // Dialog Data 22 | //{{AFX_DATA(CWeakKeyScan) 23 | enum { IDD = IDD_DIALOGWEAKKEYSCAN }; 24 | CComboBox m_ctlUsername; 25 | CComboBox m_ctlPwType; 26 | CComboBox m_ctlPWLength; 27 | CIPAddressCtrl m_ctlIP; 28 | CString m_strResult; 29 | BOOL m_bCharCapital; 30 | BOOL m_bCharLower; 31 | BOOL m_bCharNumber; 32 | BOOL m_bCharSpecial; 33 | CString m_strUsername; 34 | CString m_strSelfDefine; 35 | BOOL m_bCharSelfDefine; 36 | CString m_strPrefix; 37 | CString m_strPostfix; 38 | CString m_strPassword; 39 | //}}AFX_DATA 40 | int l1,l2,l3,l4,l5,l6,l7,l8; 41 | 42 | // Overrides 43 | // ClassWizard generated virtual function overrides 44 | //{{AFX_VIRTUAL(CWeakKeyScan) 45 | protected: 46 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 47 | //}}AFX_VIRTUAL 48 | 49 | // Implementation 50 | protected: 51 | 52 | // Generated message map functions 53 | //{{AFX_MSG(CWeakKeyScan) 54 | virtual BOOL OnInitDialog(); 55 | afx_msg void OnCHECKSelfDefine(); 56 | afx_msg void OnBUTTONStart(); 57 | afx_msg void OnBUTTONStop(); 58 | afx_msg void OnSelchangeCOMBOPwType(); 59 | afx_msg void OnSelchangeCOMBOUsername(); 60 | //}}AFX_MSG 61 | DECLARE_MESSAGE_MAP() 62 | }; 63 | 64 | //{{AFX_INSERT_LOCATION}} 65 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 66 | 67 | #endif // !defined(AFX_WEAKKEYSCAN_H__0DA228BA_8050_4876_B23F_214F60010029__INCLUDED_) 68 | -------------------------------------------------------------------------------- /sources/etwet-cppcheck-build-dir/files.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/etwet-cppcheck-build-dir/files.txt -------------------------------------------------------------------------------- /sources/etwet-cppcheck-build-dir/lastResults.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sources/etwet-cppcheck-build-dir/statistics.txt: -------------------------------------------------------------------------------- 1 | [11.12.2018] 2 | 1544495568830 3 | -------------------------------------------------------------------------------- /sources/etwet.cppcheck: -------------------------------------------------------------------------------- 1 | 2 | 3 | etwet-cppcheck-build-dir 4 | Unspecified 5 | Scanner.sln 6 | true 7 | 8 | -------------------------------------------------------------------------------- /sources/faceShoot/1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/1.PNG -------------------------------------------------------------------------------- /sources/faceShoot/11.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/11.PNG -------------------------------------------------------------------------------- /sources/faceShoot/12.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/12.PNG -------------------------------------------------------------------------------- /sources/faceShoot/13.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/13.PNG -------------------------------------------------------------------------------- /sources/faceShoot/14.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/14.PNG -------------------------------------------------------------------------------- /sources/faceShoot/15.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/15.PNG -------------------------------------------------------------------------------- /sources/faceShoot/16.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/16.PNG -------------------------------------------------------------------------------- /sources/faceShoot/2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/2.PNG -------------------------------------------------------------------------------- /sources/faceShoot/3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/3.PNG -------------------------------------------------------------------------------- /sources/faceShoot/4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/4.PNG -------------------------------------------------------------------------------- /sources/faceShoot/5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/5.PNG -------------------------------------------------------------------------------- /sources/faceShoot/6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/6.PNG -------------------------------------------------------------------------------- /sources/faceShoot/7.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/7.PNG -------------------------------------------------------------------------------- /sources/faceShoot/8.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/8.PNG -------------------------------------------------------------------------------- /sources/faceShoot/9.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/faceShoot/9.PNG -------------------------------------------------------------------------------- /sources/faceShoot/password.dic: -------------------------------------------------------------------------------- 1 | admin 2 | web 3 | Administrator -------------------------------------------------------------------------------- /sources/faceShoot/username.dic: -------------------------------------------------------------------------------- 1 | admin 2 | web 3 | Administrator -------------------------------------------------------------------------------- /sources/rebort.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/rebort.html -------------------------------------------------------------------------------- /sources/res/Scanner.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AngelKitty/Network_Scanner/4851c3b0edd8c7661f8eb1b61d098f2e08233b68/sources/res/Scanner.ico -------------------------------------------------------------------------------- /sources/res/Scanner.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // SCANNER.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /sources/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Scanner.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_SCANNER_DIALOG 102 9 | #define IDR_MAINFRAME 128 10 | #define IDD_DIALOGHOSTSCAN 129 11 | #define IDD_DIALOGPORTSCAN 130 12 | #define IDD_DIALOGWEAKKEYSCAN 131 13 | #define IDD_DIALOGDOSSCAN 133 14 | #define IDD_DIALOGSNIFFERSCAN 134 15 | #define IDD_DIALOGSSSelectIP 135 16 | #define IDD_DIALOGSQLSCAN 136 17 | #define IDD_DIALOGNETBIOSSCAN 137 18 | #define IDD_DIALOGSNMPSCAN 138 19 | #define IDD_DIALOGALLSCAN 139 20 | #define IDD_DIALOGCMD 141 21 | #define IDC_TABMAIN 1000 22 | #define IDC_BUTTONStartScan 1003 23 | #define IDC_LISTResult 1008 24 | #define IDC_IPADDRESSBegin 1009 25 | #define IDC_IPADDRESSEnd 1010 26 | #define IDC_IPADDRESSBgeinIP 1011 27 | #define IDC_IPADDRESSEndIP 1012 28 | #define IDC_EDITBeginPort 1013 29 | #define IDC_EDITEndPort 1014 30 | #define IDC_BUTTONStart 1015 31 | #define IDC_TREEResult 1016 32 | #define IDC_IPADDRESSIP 1017 33 | #define IDC_EDITUSERNAME 1019 34 | #define IDC_EDITPrefix 1020 35 | #define IDC_EDITPostfix 1021 36 | #define IDC_COMBOLENGTH 1022 37 | #define IDC_CHECKCAPITAL 1023 38 | #define IDC_CHECKLOWER 1024 39 | #define IDC_CHECKNUMBER 1025 40 | #define IDC_CHECKSPECIAL 1026 41 | #define IDC_EDITWEAKKEYRESULT 1027 42 | #define IDC_CHECKSelfDefine 1028 43 | #define IDC_EDITSelfDefine 1029 44 | #define IDC_IPADDRESSTARGETIP 1030 45 | #define IDC_EDITTARGETPORT 1031 46 | #define IDC_EDITTHREADCOUNT 1032 47 | #define IDC_BUTTONStop 1034 48 | #define IDC_LISTReceive 1036 49 | #define IDC_LISTKeyword 1037 50 | #define IDC_LISTIP 1040 51 | #define IDC_EDITComment 1041 52 | #define IDC_BUTTONClear 1042 53 | #define IDC_BUTTONAddKW 1043 54 | #define IDC_EDITKeyword 1044 55 | #define IDC_BUTTONDeleteKW 1045 56 | #define IDC_EDITContent 1047 57 | #define IDC_EDITURL 1048 58 | #define IDC_EDITURLParam 1049 59 | #define IDC_EDITSQLSign 1050 60 | #define IDC_EDITSendPack 1052 61 | #define IDC_EDITReveivePack 1053 62 | #define IDC_EDITResult 1055 63 | #define IDC_IPADDRESSTarget 1059 64 | #define IDC_EDIT1 1063 65 | #define IDC_EDITCommand 1063 66 | #define IDC_EDITPwType 1063 67 | #define IDC_CHECKHostScan 1067 68 | #define IDC_CHECKPortScan 1068 69 | #define IDC_CHECKWeakKeyScan 1069 70 | #define IDC_CHECKDDOSScan 1070 71 | #define IDC_CHECKSnifferScan 1071 72 | #define IDC_CHECKSQLScan 1072 73 | #define IDC_CHECKNetBIOSScan 1073 74 | #define IDC_CHECKSNMPScan 1074 75 | #define IDC_RADIOHtml 1075 76 | #define IDC_RADIOTxt 1076 77 | #define IDC_RADIOXml 1077 78 | #define IDC_BUTTONStopScan 1079 79 | #define IDC_BUTTONExecute 1084 80 | #define IDC_BUTTONCmd 1086 81 | #define IDC_COMBOPwType 1087 82 | #define IDC_COMBOUsername 1088 83 | 84 | // Next default values for new objects 85 | // 86 | #ifdef APSTUDIO_INVOKED 87 | #ifndef APSTUDIO_READONLY_SYMBOLS 88 | #define _APS_NEXT_RESOURCE_VALUE 143 89 | #define _APS_NEXT_COMMAND_VALUE 32771 90 | #define _APS_NEXT_CONTROL_VALUE 1091 91 | #define _APS_NEXT_SYMED_VALUE 101 92 | #endif 93 | #endif 94 | --------------------------------------------------------------------------------