├── .gitattributes
├── .gitignore
├── ExploitDBHelper.sln
├── ExploitDBHelper
├── App.xaml
├── App.xaml.cs
├── ExploitDBHelper.csproj
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Tools
│ ├── ExploitManager.cs
│ └── ScriptMake.cs
└── exploit-db.ico
├── README.md
└── screenshots
├── 01.png
├── 02.png
└── 03.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | build/
21 | bld/
22 | [Bb]in/
23 | [Oo]bj/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 |
28 | # MSTest test Results
29 | [Tt]est[Rr]esult*/
30 | [Bb]uild[Ll]og.*
31 |
32 | # NUNIT
33 | *.VisualState.xml
34 | TestResult.xml
35 |
36 | # Build Results of an ATL Project
37 | [Dd]ebugPS/
38 | [Rr]eleasePS/
39 | dlldata.c
40 |
41 | # DNX
42 | project.lock.json
43 | artifacts/
44 |
45 | *_i.c
46 | *_p.c
47 | *_i.h
48 | *.ilk
49 | *.meta
50 | *.obj
51 | *.pch
52 | *.pdb
53 | *.pgc
54 | *.pgd
55 | *.rsp
56 | *.sbr
57 | *.tlb
58 | *.tli
59 | *.tlh
60 | *.tmp
61 | *.tmp_proj
62 | *.log
63 | *.vspscc
64 | *.vssscc
65 | .builds
66 | *.pidb
67 | *.svclog
68 | *.scc
69 |
70 | # Chutzpah Test files
71 | _Chutzpah*
72 |
73 | # Visual C++ cache files
74 | ipch/
75 | *.aps
76 | *.ncb
77 | *.opensdf
78 | *.sdf
79 | *.cachefile
80 |
81 | # Visual Studio profiler
82 | *.psess
83 | *.vsp
84 | *.vspx
85 |
86 | # TFS 2012 Local Workspace
87 | $tf/
88 |
89 | # Guidance Automation Toolkit
90 | *.gpState
91 |
92 | # ReSharper is a .NET coding add-in
93 | _ReSharper*/
94 | *.[Rr]e[Ss]harper
95 | *.DotSettings.user
96 |
97 | # JustCode is a .NET coding add-in
98 | .JustCode
99 |
100 | # TeamCity is a build add-in
101 | _TeamCity*
102 |
103 | # DotCover is a Code Coverage Tool
104 | *.dotCover
105 |
106 | # NCrunch
107 | _NCrunch_*
108 | .*crunch*.local.xml
109 |
110 | # MightyMoose
111 | *.mm.*
112 | AutoTest.Net/
113 |
114 | # Web workbench (sass)
115 | .sass-cache/
116 |
117 | # Installshield output folder
118 | [Ee]xpress/
119 |
120 | # DocProject is a documentation generator add-in
121 | DocProject/buildhelp/
122 | DocProject/Help/*.HxT
123 | DocProject/Help/*.HxC
124 | DocProject/Help/*.hhc
125 | DocProject/Help/*.hhk
126 | DocProject/Help/*.hhp
127 | DocProject/Help/Html2
128 | DocProject/Help/html
129 |
130 | # Click-Once directory
131 | publish/
132 |
133 | # Publish Web Output
134 | *.[Pp]ublish.xml
135 | *.azurePubxml
136 | ## TODO: Comment the next line if you want to checkin your
137 | ## web deploy settings but do note that will include unencrypted
138 | ## passwords
139 | #*.pubxml
140 |
141 | *.publishproj
142 |
143 | # NuGet Packages
144 | *.nupkg
145 | # The packages folder can be ignored because of Package Restore
146 | **/packages/*
147 | # except build/, which is used as an MSBuild target.
148 | !**/packages/build/
149 | # Uncomment if necessary however generally it will be regenerated when needed
150 | #!**/packages/repositories.config
151 |
152 | # Windows Azure Build Output
153 | csx/
154 | *.build.csdef
155 |
156 | # Windows Store app package directory
157 | AppPackages/
158 |
159 | # Visual Studio cache files
160 | # files ending in .cache can be ignored
161 | *.[Cc]ache
162 | # but keep track of directories ending in .cache
163 | !*.[Cc]ache/
164 |
165 | # Others
166 | ClientBin/
167 | [Ss]tyle[Cc]op.*
168 | ~$*
169 | *~
170 | *.dbmdl
171 | *.dbproj.schemaview
172 | *.pfx
173 | *.publishsettings
174 | node_modules/
175 | orleans.codegen.cs
176 |
177 | # RIA/Silverlight projects
178 | Generated_Code/
179 |
180 | # Backup & report files from converting an old project file
181 | # to a newer Visual Studio version. Backup files are not needed,
182 | # because we have git ;-)
183 | _UpgradeReport_Files/
184 | Backup*/
185 | UpgradeLog*.XML
186 | UpgradeLog*.htm
187 |
188 | # SQL Server files
189 | *.mdf
190 | *.ldf
191 |
192 | # Business Intelligence projects
193 | *.rdl.data
194 | *.bim.layout
195 | *.bim_*.settings
196 |
197 | # Microsoft Fakes
198 | FakesAssemblies/
199 |
200 | # Node.js Tools for Visual Studio
201 | .ntvs_analysis.dat
202 |
203 | # Visual Studio 6 build log
204 | *.plg
205 |
206 | # Visual Studio 6 workspace options file
207 | *.opt
208 |
209 | # LightSwitch generated files
210 | GeneratedArtifacts/
211 | _Pvt_Extensions/
212 | ModelManifest.xml
213 |
--------------------------------------------------------------------------------
/ExploitDBHelper.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExploitDBHelper", "ExploitDBHelper\ExploitDBHelper.csproj", "{A6407955-2773-457E-B5C3-90B9F0FCD991}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {A6407955-2773-457E-B5C3-90B9F0FCD991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {A6407955-2773-457E-B5C3-90B9F0FCD991}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {A6407955-2773-457E-B5C3-90B9F0FCD991}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {A6407955-2773-457E-B5C3-90B9F0FCD991}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/ExploitDBHelper/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ExploitDBHelper/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Windows;
7 | using ExploitDBHelper.Tools;
8 | namespace ExploitDBHelper
9 | {
10 | ///
11 | /// App.xaml 的交互逻辑
12 | ///
13 | public partial class App : Application
14 | {
15 | public App()
16 | {
17 | ExploitManager.Init();
18 | Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
19 |
20 | }
21 |
22 | private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
23 | {
24 | e.Handled = true;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/ExploitDBHelper/ExploitDBHelper.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {A6407955-2773-457E-B5C3-90B9F0FCD991}
8 | WinExe
9 | Properties
10 | ExploitDBHelper
11 | ExploitDBHelper
12 | v4.0
13 | 512
14 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15 | 4
16 |
17 |
18 | x86
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | x86
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 | exploit-db.ico
38 |
39 |
40 | true
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | MSBuild:Compile
56 | Designer
57 |
58 |
59 |
60 |
61 | MSBuild:Compile
62 | Designer
63 |
64 |
65 | App.xaml
66 | Code
67 |
68 |
69 | MainWindow.xaml
70 | Code
71 |
72 |
73 |
74 |
75 | Code
76 |
77 |
78 | True
79 | True
80 | Resources.resx
81 |
82 |
83 | True
84 | Settings.settings
85 | True
86 |
87 |
88 | ResXFileCodeGenerator
89 | Resources.Designer.cs
90 |
91 |
92 | SettingsSingleFileGenerator
93 | Settings.Designer.cs
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
108 |
--------------------------------------------------------------------------------
/ExploitDBHelper/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/ExploitDBHelper/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using ExploitDBHelper.Tools;
2 | using System;
3 | using System.IO;
4 | using System.Collections.ObjectModel;
5 | using System.ComponentModel;
6 | using System.Windows;
7 | using System.Windows.Input;
8 | using System.Data;
9 | using System.Diagnostics;
10 |
11 | namespace ExploitDBHelper
12 | {
13 | ///
14 | /// MainWindow.xaml 的交互逻辑
15 | ///
16 | public partial class MainWindow : Window
17 | {
18 | ObservableCollection Exploits = new ObservableCollection();
19 |
20 | public MainWindow()
21 | {
22 | InitializeComponent();
23 | ExploitManager.CSVChange += ExploitManager_CSVChange;
24 | ExploitManager.DownloadProgressChanged += ExploitManager_DownloadProgressChanged;
25 | result_view.DataContext = Exploits;
26 | InitUi();
27 | search_text.Focus();
28 | }
29 |
30 | private void ExploitManager_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e)
31 | {
32 | f_prog.Value = e.ProgressPercentage;
33 | status_txt.Text = string.Format("Downloading: {0}%", e.ProgressPercentage);
34 | f_prog.Visibility = e.ProgressPercentage != 100 ? Visibility.Visible : Visibility.Hidden;
35 | }
36 |
37 | private void ExploitManager_CSVChange(object sender, EventArgs e)
38 | {
39 | InitUi();
40 | }
41 |
42 | public void InitUi()
43 | {
44 | platform_box.Items.Clear();
45 | platform_box.Items.Add("All");
46 | foreach (var item in ExploitManager.Platforms)
47 | platform_box.Items.Add(item);
48 | platform_box.SelectedIndex = 0;
49 |
50 | type_box.Items.Clear();
51 | type_box.Items.Add("All");
52 | foreach (var item in ExploitManager.Types)
53 | type_box.Items.Add(item);
54 | type_box.SelectedIndex = 0;
55 |
56 | update_btn.Content = "Update";
57 | update_btn.IsEnabled = true;
58 | last_update_label.Content = string.Format("Last Update:{0}", ExploitManager.LastChange);
59 | status_txt.Text = "Loading completed.";
60 | }
61 |
62 | private void update_btn_Click(object sender, RoutedEventArgs e)
63 | {
64 | ExploitManager.FlushCache();
65 | update_btn.Content = "Updateing...";
66 | update_btn.IsEnabled = false;
67 | }
68 |
69 | private void search_btn_Click(object sender, RoutedEventArgs e)
70 | {
71 | search_btn.IsEnabled = false;
72 | result_view.Items.Clear();
73 | string sql_where = string.Format("description like '%{0}%'", search_text.Text);
74 | string platform_str = platform_box.SelectedItem.ToString();
75 | if (platform_str != "All") sql_where += string.Format(" and platform='{0}'", platform_str);
76 | string type_str = type_box.SelectedItem.ToString();
77 | if (type_str != "All") sql_where += string.Format(" and type='{0}'", type_str);
78 | DataRow[] result = ExploitManager.ExploitTable.Select(sql_where, "date desc");
79 | if (result.Length == 0) MessageBox.Show("Not found.");
80 | foreach (var item in result)
81 | {
82 | Exploit exp = new Exploit();
83 | exp.Name = item["description"].ToString();
84 | exp.Date = string.Format("{0:d}", item["date"]);
85 | exp.PlatformType = string.Format("{0},{1}", item["platform"], item["type"]);
86 | exp.Port = Convert.ToInt32(string.IsNullOrEmpty(item["port"].ToString()) ? 0 : item["port"]);
87 | exp.ID = Convert.ToInt32(item["id"]);
88 | exp.Path = Convert.ToString(item["file"]);
89 | result_view.Items.Add(exp);
90 | }
91 | status_txt.Text = string.Format("Results: {0}", result.Length);
92 | search_btn.IsEnabled = true;
93 | }
94 |
95 | private void search_text_KeyDown(object sender, KeyEventArgs e)
96 | {
97 | if (e.Key == Key.Return)
98 | search_btn_Click(null, null);
99 | }
100 |
101 | private void result_view_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
102 | {
103 | if (result_view.SelectedItem == null) return;
104 | Exploit exp = result_view.SelectedItem as Exploit;
105 | Process.Start(string.Format("http://www.exploit-db.com/exploits/{0}", exp.ID));
106 | }
107 |
108 | private void script_make_Click(object sender, RoutedEventArgs e)
109 | {
110 | if (exploit_id_text.Text == string.Empty) return;
111 | if (exploit_id_text.Tag == null)
112 | {
113 | DataRow[] result = ExploitManager.ExploitTable.Select(string.Format("id = {0}", exploit_id_text.Text));
114 | if (result.Length > 0) exploit_id_text.Tag = result[0]["file"];
115 | else
116 | {
117 | script_box.Text = "It does not support the production of this exploit.";
118 | return;
119 | }
120 | }
121 | var path = exploit_id_text.Tag.ToString();
122 | var expid = Convert.ToInt32(exploit_id_text.Text);
123 | var ext = Path.GetExtension(path).ToLower();
124 | switch (ext)
125 | {
126 | case ".sh":
127 | script_box.Text = ScriptMake.SH(expid);
128 | break;
129 | case ".py":
130 | script_box.Text = ScriptMake.Python(expid);
131 | break;
132 | case ".pl":
133 | script_box.Text = ScriptMake.Perl(expid);
134 | break;
135 | case ".c":
136 | script_box.Text = ScriptMake.CLang(expid);
137 | break;
138 | default:
139 | script_box.Text = "It does not support the production of this exploit.";
140 | break;
141 | }
142 | }
143 |
144 | private void MenuItem_Click(object sender, RoutedEventArgs e)
145 | {
146 | if (result_view.SelectedItem == null) return;
147 | Exploit exp = result_view.SelectedItem as Exploit;
148 | exploit_id_text.Text = exp.ID.ToString();
149 | exploit_id_text.Tag = exp.Path;
150 | tabControl.SelectedItem = tabControl.Items[1];
151 | script_make_Click(null, null);
152 | }
153 | }
154 | public class Exploit : INotifyPropertyChanged
155 | {
156 | private string _name = string.Empty;
157 | public string Name
158 | {
159 | get { return _name; }
160 | set { _name = value; NotifyPropertyChange("Name"); }
161 | }
162 | private string _platformType = string.Empty;
163 | public string PlatformType
164 | {
165 | get { return _platformType; }
166 | set { _platformType = value; NotifyPropertyChange("PlatformType"); }
167 | }
168 | private string _date = string.Empty;
169 | public string Date
170 | {
171 | get { return _date; }
172 | set { _date = value; NotifyPropertyChange("Date"); }
173 | }
174 | private int _id = 0;
175 | public int ID
176 | {
177 | get { return _id; }
178 | set { _id = value; NotifyPropertyChange("ID"); }
179 | }
180 | private int _port = 0;
181 | public int Port
182 | {
183 | get { return _port; }
184 | set { _port = value; NotifyPropertyChange("Port"); }
185 | }
186 | public string Path = string.Empty;
187 | public event PropertyChangedEventHandler PropertyChanged;
188 | private void NotifyPropertyChange(string propertyName)
189 | {
190 | if (PropertyChanged != null)
191 | {
192 | PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
193 | }
194 | }
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // 有关程序集的一般信息由以下
8 | // 控制。更改这些特性值可修改
9 | // 与程序集关联的信息。
10 | [assembly: AssemblyTitle("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("")]
15 | [assembly: AssemblyCopyright("")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | //将 ComVisible 设置为 false 将使此程序集中的类型
20 | //对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
21 | //请将此类型的 ComVisible 特性设置为 true。
22 | [assembly: ComVisible(false)]
23 |
24 | //若要开始生成可本地化的应用程序,请
25 | // 中的 .csproj 文件中
26 | //例如,如果您在源文件中使用的是美国英语,
27 | //使用的是美国英语,请将 设置为 en-US。 然后取消
28 | //对以下 NeutralResourceLanguage 特性的注释。 更新
29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
36 | //(当资源未在页面
37 | //或应用程序资源字典中找到时使用)
38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
39 | //(当资源未在页面
40 | //、应用程序或任何主题专用资源字典中找到时使用)
41 | )]
42 |
43 |
44 | // 程序集的版本信息由下列四个值组成:
45 | //
46 | // 主版本
47 | // 次版本
48 | // 生成号
49 | // 修订号
50 | //
51 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
52 | // 方法是按如下所示使用“*”: :
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("0.0.0.0")]
55 | [assembly: AssemblyFileVersion("0.0.0.0")]
56 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ExploitDBHelper.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExploitDBHelper.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ExploitDBHelper.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Tools/ExploitManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Net;
5 | using System.Data;
6 | using System.Data.OleDb;
7 | using System.ComponentModel;
8 | using System.Windows;
9 |
10 | namespace ExploitDBHelper.Tools
11 | {
12 |
13 | internal class ExploitManager
14 | {
15 | internal const string CSVUrl = "https://raw.githubusercontent.com/offensive-security/exploit-database/master/files_exploits.csv";
16 | internal const string CSVFileName = "exploit.csv";
17 | public static DateTime LastChange = DateTime.MinValue;
18 | public static DataTable ExploitTable = null;
19 | public static event EventHandler CSVChange;
20 | public static event DownloadProgressChangedEventHandler DownloadProgressChanged;
21 | public static List Platforms = new List(), Types = new List();
22 | public static void Init()
23 | {
24 | if (File.Exists(CSVFileName))
25 | {
26 | ExploitTable = CSVToTable(CSVFileName);
27 | LastChange = File.GetLastWriteTime(CSVFileName);
28 | LoadPT();
29 | }
30 | }
31 | public static void LoadPT()
32 | {
33 | Platforms.Clear();Types.Clear();
34 | DataRow[] dr = ExploitTable.Select();
35 | foreach (var dri in dr)
36 | {
37 | string pl = dri["platform"].ToString();
38 | string ty = dri["type"].ToString();
39 | if (!Platforms.Contains(pl)) Platforms.Add(pl);
40 | if (!Types.Contains(ty)) Types.Add(ty);
41 | }
42 | Platforms.Sort();
43 | Types.Sort();
44 | }
45 | public static void FlushCache()
46 | {
47 | File.Delete(CSVFileName);
48 | WebClient wc = new WebClient();
49 | wc.DownloadFileCompleted += Wc_DownloadFileCompleted;
50 | wc.DownloadFileAsync(new Uri(CSVUrl), CSVFileName);
51 | wc.DownloadProgressChanged += Wc_DownloadProgressChanged;
52 | }
53 |
54 | private static void Wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
55 | {
56 | DownloadProgressChanged?.Invoke(sender, e);
57 | }
58 |
59 | private static void Wc_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
60 | {
61 | ExploitTable = CSVToTable(CSVFileName);
62 | LastChange = File.GetLastWriteTime(CSVFileName);
63 | LoadPT();
64 | CSVChange?.Invoke(ExploitTable, null);
65 | }
66 |
67 | private static DataTable CSVToTable(string fullPath)
68 | {
69 | string fileName = Path.GetFileName(fullPath);
70 | string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
71 | + Environment.CurrentDirectory + ";Extended Properties='Text;HDR=YES;FMT=Delimited;IMEX=1;'";
72 | string cmdStr = "select * from [" + fileName + "]";
73 | var conn = new OleDbConnection(connStr);
74 | var retData = new DataTable();
75 | try
76 | {
77 | conn.Open();
78 | var adapter = new OleDbDataAdapter(cmdStr, conn);
79 | adapter.Fill(retData);
80 | }
81 | catch (Exception ex) { Console.Write(ex); }
82 | finally
83 | {
84 | if (conn.State == ConnectionState.Open)
85 | conn.Close();
86 | }
87 | return retData;
88 | }
89 |
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/ExploitDBHelper/Tools/ScriptMake.cs:
--------------------------------------------------------------------------------
1 | namespace ExploitDBHelper.Tools
2 | {
3 | public static class ScriptMake
4 | {
5 | public static string CLang(int id)
6 | {
7 | return string.Format(
8 | "wget https://www.exploit-db.com/download/{0} -O /tmp/{0}.c --no-check-certificate\r\n" +
9 | "gcc /tmp/{0}.c -o /tmp/{0}\r\n" +
10 | "/tmp/{0}\r\n",
11 | id);
12 | }
13 | public static string Python(int id)
14 | {
15 | return string.Format(
16 | "wget https://www.exploit-db.com/download/{0} -O /tmp/{0}.py --no-check-certificate\r\n" +
17 | "python /tmp/{0}.py\r\n",
18 | id);
19 | }
20 | public static string Perl(int id)
21 | {
22 | return string.Format(
23 | "wget https://www.exploit-db.com/download/{0} -O /tmp/{0}.pl --no-check-certificate\r\n" +
24 | "perl /tmp/{0}.pl\r\n",
25 | id);
26 | }
27 | public static string SH(int id)
28 | {
29 | return string.Format(
30 | "wget https://www.exploit-db.com/download/{0} -O /tmp/{0}.sh --no-check-certificate\r\n" +
31 | "sh /tmp/{0}.sh\r\n",
32 | id);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/ExploitDBHelper/exploit-db.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whwlsfb/ExploitDBHelper/9ef116c30908ccaaf112007996e7418b917cee1a/ExploitDBHelper/exploit-db.ico
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ExploitDBHelper
2 | A simple exploitdb toolkit using the WPF framework.
3 |
4 | 一个简单的Exploit-DB的本地数据库检索工具。
5 |
6 |
7 |
8 | ## Screenshots
9 |
10 | 漏洞检索:
11 |
12 | 
13 |
14 | POC生成:
15 |
16 | 
17 |
18 | 漏洞库更新:
19 |
20 | 
21 |
22 |
--------------------------------------------------------------------------------
/screenshots/01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whwlsfb/ExploitDBHelper/9ef116c30908ccaaf112007996e7418b917cee1a/screenshots/01.png
--------------------------------------------------------------------------------
/screenshots/02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whwlsfb/ExploitDBHelper/9ef116c30908ccaaf112007996e7418b917cee1a/screenshots/02.png
--------------------------------------------------------------------------------
/screenshots/03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whwlsfb/ExploitDBHelper/9ef116c30908ccaaf112007996e7418b917cee1a/screenshots/03.png
--------------------------------------------------------------------------------