Showing
2 changed files
with
33 additions
and
2 deletions
... | @@ -8,14 +8,45 @@ using System.Text; | ... | @@ -8,14 +8,45 @@ using System.Text; |
8 | using System.Text.RegularExpressions; | 8 | using System.Text.RegularExpressions; |
9 | using System.Threading.Tasks; | 9 | using System.Threading.Tasks; |
10 | 10 | ||
11 | +using MySql.Data.MySqlClient; | ||
11 | namespace VulnCrawler | 12 | namespace VulnCrawler |
12 | { | 13 | { |
13 | class Program | 14 | class Program |
14 | { | 15 | { |
15 | static void Main(string[] args) { | 16 | static void Main(string[] args) { |
16 | 17 | ||
18 | + string accountInfo = File.ReadAllText(@"c:\account.txt"); | ||
19 | + string id = accountInfo.Split(',')[0]; | ||
20 | + string pw = accountInfo.Split(',')[1]; | ||
21 | + | ||
22 | + MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder { | ||
23 | + Server = "", | ||
24 | + UserID = id, | ||
25 | + Password = pw, | ||
26 | + Database = "vuln", | ||
27 | + Port = 3306 | ||
28 | + }; | ||
29 | + | ||
30 | + string strConn = builder.ToString(); | ||
31 | + builder = null; | ||
32 | + MySqlConnection conn = new MySqlConnection(strConn); | ||
33 | + | ||
34 | + try { | ||
35 | + | ||
36 | + String sql = "INSERT INTO members (id, pwd, name) " + | ||
37 | + "VALUES ('gon', '111', '김삿갓')"; | ||
38 | + | ||
39 | + MySqlCommand cmd = new MySqlCommand(sql, conn); | ||
17 | 40 | ||
18 | - Run(); | 41 | + conn.Open(); |
42 | + | ||
43 | + cmd.ExecuteNonQuery(); | ||
44 | + conn.Close(); | ||
45 | + } catch (Exception e) { | ||
46 | + Console.WriteLine(e.ToString()); | ||
47 | + } | ||
48 | + | ||
49 | +// Run(); | ||
19 | 50 | ||
20 | } | 51 | } |
21 | 52 | ... | ... |
... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
38 | <Reference Include="LibGit2Sharp, Version=0.25.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL"> | 38 | <Reference Include="LibGit2Sharp, Version=0.25.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL"> |
39 | <HintPath>..\packages\LibGit2Sharp.0.25.0\lib\netstandard2.0\LibGit2Sharp.dll</HintPath> | 39 | <HintPath>..\packages\LibGit2Sharp.0.25.0\lib\netstandard2.0\LibGit2Sharp.dll</HintPath> |
40 | </Reference> | 40 | </Reference> |
41 | - <Reference Include="MySql.Data, Version=8.0.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" /> | 41 | + <Reference Include="MySql.Data, Version=6.10.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" /> |
42 | <Reference Include="System" /> | 42 | <Reference Include="System" /> |
43 | <Reference Include="System.Core" /> | 43 | <Reference Include="System.Core" /> |
44 | <Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | 44 | <Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> | ... | ... |
-
Please register or login to post a comment