├── media └── 1.jpg ├── git-leaker ├── App.config ├── Properties │ ├── Settings.settings │ ├── AssemblyInfo.cs │ ├── Settings.Designer.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── packages.config ├── Program.cs ├── ProxyHttpClientFactory.cs ├── QuickType │ ├── Commits.cs │ └── SearchResult.cs ├── git-leaker.csproj ├── Main.cs ├── Main.resx └── Main.Designer.cs ├── README.md ├── GithubLeaker.sln └── .gitignore /media/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Slzdude/GithubLeaker/HEAD/media/1.jpg -------------------------------------------------------------------------------- /git-leaker/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /git-leaker/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Github Leaker 2 | 3 | 现在各式各样的Github信息泄露扫描工具很多,但是有时候过于重量级,需要配合扫描器一起使用,但是很多时候我们只是想验证一下某个Repo的信息,或者想手动进行参数的调整,这时候只能使用Github原生的搜索,比较麻烦,所以就开发了这个小工具 4 | 5 | 6 | 7 | 如果有对本工具有意见或建议,欢迎提issus 8 | 9 | ## 已实现功能 10 | 11 | - 使用Github API Token增加调用次数 12 | - 单查项目的提交历史 13 | - 基于关键词进行搜索 14 | - 查看命中内容 15 | 16 | ## 使用截图 17 | 18 | ![1](media/1.jpg) 19 | 20 | ## TODO 21 | 22 | - [ ] 增加右键菜单 23 | - [ ] 增加搜索内容高亮 24 | - [ ] 可以选择项目的Branch进行查询 25 | - [ ] 高级搜索辅助工具 26 | - [ ] 结果导出 -------------------------------------------------------------------------------- /git-leaker/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /git-leaker/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace git_leaker 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// 应用程序的主入口点。 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Main()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /git-leaker/ProxyHttpClientFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | using System.Net.Http; 3 | 4 | using Flurl.Http.Configuration; 5 | 6 | namespace git_leaker 7 | { 8 | public class ProxyHttpClientFactory : DefaultHttpClientFactory 9 | { 10 | private string _address; 11 | 12 | public ProxyHttpClientFactory(string address) 13 | { 14 | _address = address; 15 | } 16 | 17 | public override HttpMessageHandler CreateMessageHandler() 18 | { 19 | return new HttpClientHandler 20 | { 21 | Proxy = new WebProxy(_address), 22 | UseProxy = true 23 | }; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /git-leaker/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("git-leaker")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("git-leaker")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("66036f69-7493-4701-be1e-293b9ca02dd0")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /GithubLeaker.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29519.87 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "git-leaker", "git-leaker\git-leaker.csproj", "{66036F69-7493-4701-BE1E-293B9CA02DD0}" 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 | {66036F69-7493-4701-BE1E-293B9CA02DD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {66036F69-7493-4701-BE1E-293B9CA02DD0}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {66036F69-7493-4701-BE1E-293B9CA02DD0}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {66036F69-7493-4701-BE1E-293B9CA02DD0}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {AE60826D-13A7-4C10-AED7-AF68FFEF4598} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /git-leaker/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 git_leaker.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 | -------------------------------------------------------------------------------- /git-leaker/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本: 4.0.30319.42000 5 | // 6 | // 对此文件的更改可能导致不正确的行为,如果 7 | // 重新生成代码,则所做更改将丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace git_leaker.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("git_leaker.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 | -------------------------------------------------------------------------------- /git-leaker/QuickType/Commits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | public class Author 5 | { 6 | public string name { get; set; } 7 | public string email { get; set; } 8 | public DateTime date { get; set; } 9 | } 10 | 11 | public class Committer 12 | { 13 | public string name { get; set; } 14 | public string email { get; set; } 15 | public DateTime date { get; set; } 16 | } 17 | 18 | public class Tree 19 | { 20 | public string sha { get; set; } 21 | public string url { get; set; } 22 | } 23 | 24 | public class Verification 25 | { 26 | public bool verified { get; set; } 27 | public string reason { get; set; } 28 | public object signature { get; set; } 29 | public object payload { get; set; } 30 | } 31 | 32 | public class Commit 33 | { 34 | public Author author { get; set; } 35 | public Committer committer { get; set; } 36 | public string message { get; set; } 37 | public Tree tree { get; set; } 38 | public string url { get; set; } 39 | public int comment_count { get; set; } 40 | public Verification verification { get; set; } 41 | } 42 | 43 | public class Author2 44 | { 45 | public string login { get; set; } 46 | public int id { get; set; } 47 | public string node_id { get; set; } 48 | public string avatar_url { get; set; } 49 | public string gravatar_id { get; set; } 50 | public string url { get; set; } 51 | public string html_url { get; set; } 52 | public string followers_url { get; set; } 53 | public string following_url { get; set; } 54 | public string gists_url { get; set; } 55 | public string starred_url { get; set; } 56 | public string subscriptions_url { get; set; } 57 | public string organizations_url { get; set; } 58 | public string repos_url { get; set; } 59 | public string events_url { get; set; } 60 | public string received_events_url { get; set; } 61 | public string type { get; set; } 62 | public bool site_admin { get; set; } 63 | } 64 | 65 | public class Committer2 66 | { 67 | public string login { get; set; } 68 | public int id { get; set; } 69 | public string node_id { get; set; } 70 | public string avatar_url { get; set; } 71 | public string gravatar_id { get; set; } 72 | public string url { get; set; } 73 | public string html_url { get; set; } 74 | public string followers_url { get; set; } 75 | public string following_url { get; set; } 76 | public string gists_url { get; set; } 77 | public string starred_url { get; set; } 78 | public string subscriptions_url { get; set; } 79 | public string organizations_url { get; set; } 80 | public string repos_url { get; set; } 81 | public string events_url { get; set; } 82 | public string received_events_url { get; set; } 83 | public string type { get; set; } 84 | public bool site_admin { get; set; } 85 | } 86 | 87 | public class Commits 88 | { 89 | public string sha { get; set; } 90 | public string node_id { get; set; } 91 | public Commit commit { get; set; } 92 | public string url { get; set; } 93 | public string html_url { get; set; } 94 | public string comments_url { get; set; } 95 | public Author2 author { get; set; } 96 | public Committer2 committer { get; set; } 97 | public List parents { get; set; } 98 | } -------------------------------------------------------------------------------- /git-leaker/QuickType/SearchResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace QuickType 8 | { 9 | public class Owner 10 | { 11 | public string login { get; set; } 12 | public int id { get; set; } 13 | public string node_id { get; set; } 14 | public string avatar_url { get; set; } 15 | public string gravatar_id { get; set; } 16 | public string url { get; set; } 17 | public string html_url { get; set; } 18 | public string followers_url { get; set; } 19 | public string following_url { get; set; } 20 | public string gists_url { get; set; } 21 | public string starred_url { get; set; } 22 | public string subscriptions_url { get; set; } 23 | public string organizations_url { get; set; } 24 | public string repos_url { get; set; } 25 | public string events_url { get; set; } 26 | public string received_events_url { get; set; } 27 | public string type { get; set; } 28 | public bool site_admin { get; set; } 29 | } 30 | 31 | public class Repository 32 | { 33 | public int id { get; set; } 34 | public string node_id { get; set; } 35 | public string name { get; set; } 36 | public string full_name { get; set; } 37 | public bool @private { get; set; } 38 | public Owner owner { get; set; } 39 | public string html_url { get; set; } 40 | public string description { get; set; } 41 | public bool fork { get; set; } 42 | public string url { get; set; } 43 | public string forks_url { get; set; } 44 | public string keys_url { get; set; } 45 | public string collaborators_url { get; set; } 46 | public string teams_url { get; set; } 47 | public string hooks_url { get; set; } 48 | public string issue_events_url { get; set; } 49 | public string events_url { get; set; } 50 | public string assignees_url { get; set; } 51 | public string branches_url { get; set; } 52 | public string tags_url { get; set; } 53 | public string blobs_url { get; set; } 54 | public string git_tags_url { get; set; } 55 | public string git_refs_url { get; set; } 56 | public string trees_url { get; set; } 57 | public string statuses_url { get; set; } 58 | public string languages_url { get; set; } 59 | public string stargazers_url { get; set; } 60 | public string contributors_url { get; set; } 61 | public string subscribers_url { get; set; } 62 | public string subscription_url { get; set; } 63 | public string commits_url { get; set; } 64 | public string git_commits_url { get; set; } 65 | public string comments_url { get; set; } 66 | public string issue_comment_url { get; set; } 67 | public string contents_url { get; set; } 68 | public string compare_url { get; set; } 69 | public string merges_url { get; set; } 70 | public string archive_url { get; set; } 71 | public string downloads_url { get; set; } 72 | public string issues_url { get; set; } 73 | public string pulls_url { get; set; } 74 | public string milestones_url { get; set; } 75 | public string notifications_url { get; set; } 76 | public string labels_url { get; set; } 77 | public string releases_url { get; set; } 78 | public string deployments_url { get; set; } 79 | } 80 | 81 | public class Match 82 | { 83 | public string text { get; set; } 84 | public List indices { get; set; } 85 | } 86 | 87 | public class TextMatch 88 | { 89 | public string object_url { get; set; } 90 | public string object_type { get; set; } 91 | public string property { get; set; } 92 | public string fragment { get; set; } 93 | public List matches { get; set; } 94 | } 95 | 96 | public class Item 97 | { 98 | public string name { get; set; } 99 | public string path { get; set; } 100 | public string sha { get; set; } 101 | public string url { get; set; } 102 | public string git_url { get; set; } 103 | public string html_url { get; set; } 104 | public Repository repository { get; set; } 105 | public double score { get; set; } 106 | public List text_matches { get; set; } 107 | } 108 | 109 | public class SearchCodeResultWitchTextMatch 110 | { 111 | public int total_count { get; set; } 112 | public bool incomplete_results { get; set; } 113 | public List items { get; set; } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /git-leaker/git-leaker.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {66036F69-7493-4701-BE1E-293B9CA02DD0} 8 | WinExe 9 | git_leaker 10 | git-leaker 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\packages\FCTB.2.16.24\lib\FastColoredTextBox.dll 38 | 39 | 40 | ..\packages\Flurl.2.8.2\lib\net40\Flurl.dll 41 | 42 | 43 | ..\packages\Flurl.Http.2.4.2\lib\net46\Flurl.Http.dll 44 | 45 | 46 | ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll 47 | 48 | 49 | ..\packages\Octokit.0.36.0\lib\net46\Octokit.dll 50 | 51 | 52 | ..\packages\RestSharp.106.6.10\lib\net452\RestSharp.dll 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | Form 70 | 71 | 72 | Main.cs 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | Main.cs 81 | 82 | 83 | ResXFileCodeGenerator 84 | Resources.Designer.cs 85 | Designer 86 | 87 | 88 | True 89 | Resources.resx 90 | 91 | 92 | 93 | SettingsSingleFileGenerator 94 | Settings.Designer.cs 95 | 96 | 97 | True 98 | Settings.settings 99 | True 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /git-leaker/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 | -------------------------------------------------------------------------------- /git-leaker/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using System.Text.RegularExpressions; 4 | using Newtonsoft.Json; 5 | using System.Collections.Generic; 6 | using Flurl; 7 | using Flurl.Http; 8 | using Newtonsoft.Json.Linq; 9 | using Octokit; 10 | using FastColoredTextBoxNS; 11 | using System.Drawing; 12 | 13 | namespace git_leaker 14 | { 15 | public partial class Main : Form 16 | { 17 | private FlurlClient client = new FlurlClient("https://api.github.com/"); 18 | private Dictionary headers = new Dictionary { { "Accept", "*/*" }, { "User-Agent", "Flurl" } }; 19 | private int hightLightStyleIndex = 0; 20 | public Main() 21 | { 22 | InitializeComponent(); 23 | FlurlHttp.Configure(settings => 24 | { 25 | settings.HttpClientFactory = new ProxyHttpClientFactory("http://127.0.0.1:8080"); 26 | }); 27 | hightLightStyleIndex = tbLog.AddStyle(new TextStyle(Brushes.White, Brushes.Green, FontStyle.Bold)); 28 | } 29 | 30 | public static void RunAsync(Action action) 31 | { 32 | ((Action)(delegate () 33 | { 34 | action.Invoke(); 35 | })).BeginInvoke(null, null); 36 | } 37 | 38 | public void RunInMainthread(Action action) 39 | { 40 | this.BeginInvoke((Action)(delegate () 41 | { 42 | action.Invoke(); 43 | })); 44 | } 45 | 46 | private void btnConnect_Click(object sender, EventArgs e) 47 | { 48 | headers["Authorization"] = "token " + tbAPIToken.Text; 49 | RunAsync(() => 50 | { 51 | RunInMainthread(async () => 52 | { 53 | var result = await client.WithHeaders(headers).Request("rate_limit").GetStringAsync(); 54 | JToken parsedJson = JToken.Parse(result); 55 | tbLog.Text = parsedJson.ToString(Formatting.Indented); 56 | }); 57 | }); 58 | } 59 | 60 | private void fetchCommitters(string url) 61 | { 62 | var regex = new Regex(@"^https://github.com/([^/]+)/([^/]+)"); 63 | var match = regex.Match(url); 64 | if (!match.Success) 65 | { 66 | MessageBox.Show("无法识别的Github Repo URL", "处理失败", MessageBoxButtons.OK, MessageBoxIcon.Error); 67 | return; 68 | } 69 | var user = match.Groups[1].Value; 70 | var repo = match.Groups[2].Value; 71 | RunAsync(() => 72 | { 73 | var request = client.WithHeaders(headers).Request(string.Format("repos/{0}/{1}/commits", user, repo)); 74 | RunInMainthread(async () => 75 | { 76 | var response = await request.GetJsonAsync>(); 77 | tbLog.Text = "Name\tEmail\tDate\r\n"; 78 | foreach (var commit in response) 79 | { 80 | var committer = commit.commit.committer; 81 | tbLog.AppendText(string.Format("{0}\t{1}\t{2}\r\n", committer.name, committer.email, committer.date)); 82 | } 83 | }); 84 | }); 85 | } 86 | 87 | private void btnScan_Click(object sender, EventArgs e) 88 | { 89 | fetchCommitters(tbRepoURL.Text); 90 | } 91 | 92 | private void btnSearch_Click(object sender, EventArgs e) 93 | { 94 | RunAsync(() => 95 | { 96 | RunInMainthread(async () => 97 | { 98 | var response = await client 99 | .WithHeaders(headers) 100 | .Request("search/code") 101 | .SetQueryParam("q", tbSearchValue.Text) 102 | .SetQueryParam("per_page", "100") 103 | .WithHeader("Accept", "application/vnd.github.v3.text-match+json") 104 | .GetJsonAsync(); 105 | lvSearchResult.Clear(); 106 | lvSearchResult.Columns.Add("ID", 40, HorizontalAlignment.Center); 107 | lvSearchResult.Columns.Add("Name", 100, HorizontalAlignment.Center); 108 | lvSearchResult.Columns.Add("Path", 200, HorizontalAlignment.Center); 109 | lvSearchResult.Columns.Add("Repo", 100, HorizontalAlignment.Center); 110 | lvSearchResult.Columns.Add("Score", 80, HorizontalAlignment.Center); 111 | int i = 0; 112 | foreach (var item in response.items) 113 | { 114 | i += 1; 115 | var listViewItem = new ListViewItem(new string[] 116 | { 117 | i.ToString(), item.name, item.path, item.repository.html_url,item.score.ToString() 118 | }); 119 | listViewItem.Tag = item.text_matches; 120 | lvSearchResult.Items.Add(listViewItem); 121 | } 122 | }); 123 | }); 124 | } 125 | 126 | private void lvSearchResult_MouseDoubleClick(object sender, MouseEventArgs e) 127 | { 128 | if (lvSearchResult.SelectedItems.Count > 0) 129 | { 130 | fetchCommitters(lvSearchResult.SelectedItems[0].SubItems[3].Text); 131 | } 132 | } 133 | 134 | private void lvSearchResult_SelectedIndexChanged(object sender, EventArgs e) 135 | { 136 | if (lvSearchResult.SelectedItems.Count > 0) 137 | { 138 | var text_matches = (List)lvSearchResult.SelectedItems[0].Tag; 139 | tbLog.Text = ""; 140 | foreach (var text_match in text_matches) 141 | { 142 | var startLine = tbLog.Text.Split('\n').Length; 143 | tbLog.AppendText(text_match.fragment + "\r\n"); 144 | foreach (var match in text_match.matches) 145 | { 146 | var range = new FastColoredTextBoxNS.Range(tbLog, new Place(match.indices[0], startLine - 1), new Place(match.indices[1], startLine - 1)); 147 | range.SetStyle(tbLog.Styles[hightLightStyleIndex]); 148 | } 149 | } 150 | } 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /git-leaker/Main.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 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 125 | AAEAAAD/////AQAAAAAAAAAMAgAAAFdGYXN0Q29sb3JlZFRleHRCb3gsIFZlcnNpb249Mi4xNi4yNC4w 126 | LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWZiOGFhMTJiOTk0ZWY2MWIMAwAAAFFTeXN0 127 | ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu 128 | PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACJGYXN0Q29sb3JlZFRleHRCb3hOUy5TZXJ2aWNlQ29sb3JzBgAA 129 | ACg8Q29sbGFwc2VNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxDb2xsYXBzZU1hcmtlckJh 130 | Y2tDb2xvcj5rX19CYWNraW5nRmllbGQqPENvbGxhcHNlTWFya2VyQm9yZGVyQ29sb3I+a19fQmFja2lu 131 | Z0ZpZWxkJjxFeHBhbmRNYXJrZXJGb3JlQ29sb3I+a19fQmFja2luZ0ZpZWxkJjxFeHBhbmRNYXJrZXJC 132 | YWNrQ29sb3I+a19fQmFja2luZ0ZpZWxkKDxFeHBhbmRNYXJrZXJCb3JkZXJDb2xvcj5rX19CYWNraW5n 133 | RmllbGQEBAQEBAQUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAA 134 | ABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAFFN5c3RlbS5E 135 | cmF3aW5nLkNvbG9yAwAAABRTeXN0ZW0uRHJhd2luZy5Db2xvcgMAAAACAAAABfz///8UU3lzdGVtLkRy 136 | YXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAACgAAAAAA 137 | AAAAlgABAAH7/////P///woAAAAAAAAAAKQAAQAB+v////z///8KAAAAAAAAAACWAAEAAfn////8//// 138 | CgAAAAAAAAAAjQABAAH4/////P///woAAAAAAAAAAKQAAQAB9/////z///8KAAAAAAAAAACWAAEACw== 139 | 140 | 141 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/csharp 3 | # Edit at https://www.gitignore.io/?templates=csharp 4 | 5 | ### Csharp ### 6 | ## Ignore Visual Studio temporary files, build results, and 7 | ## files generated by popular Visual Studio add-ons. 8 | ## 9 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 10 | 11 | # User-specific files 12 | *.rsuser 13 | *.suo 14 | *.user 15 | *.userosscache 16 | *.sln.docstates 17 | 18 | # User-specific files (MonoDevelop/Xamarin Studio) 19 | *.userprefs 20 | 21 | # Mono auto generated files 22 | mono_crash.* 23 | 24 | # Build results 25 | [Dd]ebug/ 26 | [Dd]ebugPublic/ 27 | [Rr]elease/ 28 | [Rr]eleases/ 29 | x64/ 30 | x86/ 31 | [Aa][Rr][Mm]/ 32 | [Aa][Rr][Mm]64/ 33 | bld/ 34 | [Bb]in/ 35 | [Oo]bj/ 36 | [Ll]og/ 37 | 38 | # Visual Studio 2015/2017 cache/options directory 39 | .vs/ 40 | # Uncomment if you have tasks that create the project's static files in wwwroot 41 | #wwwroot/ 42 | 43 | # Visual Studio 2017 auto generated files 44 | Generated\ Files/ 45 | 46 | # MSTest test Results 47 | [Tt]est[Rr]esult*/ 48 | [Bb]uild[Ll]og.* 49 | 50 | # NUnit 51 | *.VisualState.xml 52 | TestResult.xml 53 | nunit-*.xml 54 | 55 | # Build Results of an ATL Project 56 | [Dd]ebugPS/ 57 | [Rr]eleasePS/ 58 | dlldata.c 59 | 60 | # Benchmark Results 61 | BenchmarkDotNet.Artifacts/ 62 | 63 | # .NET Core 64 | project.lock.json 65 | project.fragment.lock.json 66 | artifacts/ 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.vspscc 94 | *.vssscc 95 | .builds 96 | *.pidb 97 | *.svclog 98 | *.scc 99 | 100 | # Chutzpah Test files 101 | _Chutzpah* 102 | 103 | # Visual C++ cache files 104 | ipch/ 105 | *.aps 106 | *.ncb 107 | *.opendb 108 | *.opensdf 109 | *.sdf 110 | *.cachefile 111 | *.VC.db 112 | *.VC.VC.opendb 113 | 114 | # Visual Studio profiler 115 | *.psess 116 | *.vsp 117 | *.vspx 118 | *.sap 119 | 120 | # Visual Studio Trace Files 121 | *.e2e 122 | 123 | # TFS 2012 Local Workspace 124 | $tf/ 125 | 126 | # Guidance Automation Toolkit 127 | *.gpState 128 | 129 | # ReSharper is a .NET coding add-in 130 | _ReSharper*/ 131 | *.[Rr]e[Ss]harper 132 | *.DotSettings.user 133 | 134 | # JustCode is a .NET coding add-in 135 | .JustCode 136 | 137 | # TeamCity is a build add-in 138 | _TeamCity* 139 | 140 | # DotCover is a Code Coverage Tool 141 | *.dotCover 142 | 143 | # AxoCover is a Code Coverage Tool 144 | .axoCover/* 145 | !.axoCover/settings.json 146 | 147 | # Visual Studio code coverage results 148 | *.coverage 149 | *.coveragexml 150 | 151 | # NCrunch 152 | _NCrunch_* 153 | .*crunch*.local.xml 154 | nCrunchTemp_* 155 | 156 | # MightyMoose 157 | *.mm.* 158 | AutoTest.Net/ 159 | 160 | # Web workbench (sass) 161 | .sass-cache/ 162 | 163 | # Installshield output folder 164 | [Ee]xpress/ 165 | 166 | # DocProject is a documentation generator add-in 167 | DocProject/buildhelp/ 168 | DocProject/Help/*.HxT 169 | DocProject/Help/*.HxC 170 | DocProject/Help/*.hhc 171 | DocProject/Help/*.hhk 172 | DocProject/Help/*.hhp 173 | DocProject/Help/Html2 174 | DocProject/Help/html 175 | 176 | # Click-Once directory 177 | publish/ 178 | 179 | # Publish Web Output 180 | *.[Pp]ublish.xml 181 | *.azurePubxml 182 | # Note: Comment the next line if you want to checkin your web deploy settings, 183 | # but database connection strings (with potential passwords) will be unencrypted 184 | *.pubxml 185 | *.publishproj 186 | 187 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 188 | # checkin your Azure Web App publish settings, but sensitive information contained 189 | # in these scripts will be unencrypted 190 | PublishScripts/ 191 | 192 | # NuGet Packages 193 | *.nupkg 194 | # NuGet Symbol Packages 195 | *.snupkg 196 | # The packages folder can be ignored because of Package Restore 197 | **/[Pp]ackages/* 198 | # except build/, which is used as an MSBuild target. 199 | !**/[Pp]ackages/build/ 200 | # Uncomment if necessary however generally it will be regenerated when needed 201 | #!**/[Pp]ackages/repositories.config 202 | # NuGet v3's project.json files produces more ignorable files 203 | *.nuget.props 204 | *.nuget.targets 205 | 206 | # Microsoft Azure Build Output 207 | csx/ 208 | *.build.csdef 209 | 210 | # Microsoft Azure Emulator 211 | ecf/ 212 | rcf/ 213 | 214 | # Windows Store app package directories and files 215 | AppPackages/ 216 | BundleArtifacts/ 217 | Package.StoreAssociation.xml 218 | _pkginfo.txt 219 | *.appx 220 | *.appxbundle 221 | *.appxupload 222 | 223 | # Visual Studio cache files 224 | # files ending in .cache can be ignored 225 | *.[Cc]ache 226 | # but keep track of directories ending in .cache 227 | !?*.[Cc]ache/ 228 | 229 | # Others 230 | ClientBin/ 231 | ~$* 232 | *~ 233 | *.dbmdl 234 | *.dbproj.schemaview 235 | *.jfm 236 | *.pfx 237 | *.publishsettings 238 | orleans.codegen.cs 239 | 240 | # Including strong name files can present a security risk 241 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 242 | #*.snk 243 | 244 | # Since there are multiple workflows, uncomment next line to ignore bower_components 245 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 246 | #bower_components/ 247 | 248 | # RIA/Silverlight projects 249 | Generated_Code/ 250 | 251 | # Backup & report files from converting an old project file 252 | # to a newer Visual Studio version. Backup files are not needed, 253 | # because we have git ;-) 254 | _UpgradeReport_Files/ 255 | Backup*/ 256 | UpgradeLog*.XML 257 | UpgradeLog*.htm 258 | ServiceFabricBackup/ 259 | *.rptproj.bak 260 | 261 | # SQL Server files 262 | *.mdf 263 | *.ldf 264 | *.ndf 265 | 266 | # Business Intelligence projects 267 | *.rdl.data 268 | *.bim.layout 269 | *.bim_*.settings 270 | *.rptproj.rsuser 271 | *- [Bb]ackup.rdl 272 | *- [Bb]ackup ([0-9]).rdl 273 | *- [Bb]ackup ([0-9][0-9]).rdl 274 | 275 | # Microsoft Fakes 276 | FakesAssemblies/ 277 | 278 | # GhostDoc plugin setting file 279 | *.GhostDoc.xml 280 | 281 | # Node.js Tools for Visual Studio 282 | .ntvs_analysis.dat 283 | node_modules/ 284 | 285 | # Visual Studio 6 build log 286 | *.plg 287 | 288 | # Visual Studio 6 workspace options file 289 | *.opt 290 | 291 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 292 | *.vbw 293 | 294 | # Visual Studio LightSwitch build output 295 | **/*.HTMLClient/GeneratedArtifacts 296 | **/*.DesktopClient/GeneratedArtifacts 297 | **/*.DesktopClient/ModelManifest.xml 298 | **/*.Server/GeneratedArtifacts 299 | **/*.Server/ModelManifest.xml 300 | _Pvt_Extensions 301 | 302 | # Paket dependency manager 303 | .paket/paket.exe 304 | paket-files/ 305 | 306 | # FAKE - F# Make 307 | .fake/ 308 | 309 | # CodeRush personal settings 310 | .cr/personal 311 | 312 | # Python Tools for Visual Studio (PTVS) 313 | __pycache__/ 314 | *.pyc 315 | 316 | # Cake - Uncomment if you are using it 317 | # tools/** 318 | # !tools/packages.config 319 | 320 | # Tabs Studio 321 | *.tss 322 | 323 | # Telerik's JustMock configuration file 324 | *.jmconfig 325 | 326 | # BizTalk build output 327 | *.btp.cs 328 | *.btm.cs 329 | *.odx.cs 330 | *.xsd.cs 331 | 332 | # OpenCover UI analysis results 333 | OpenCover/ 334 | 335 | # Azure Stream Analytics local run output 336 | ASALocalRun/ 337 | 338 | # MSBuild Binary and Structured Log 339 | *.binlog 340 | 341 | # NVidia Nsight GPU debugger configuration file 342 | *.nvuser 343 | 344 | # MFractors (Xamarin productivity tool) working folder 345 | .mfractor/ 346 | 347 | # Local History for Visual Studio 348 | .localhistory/ 349 | 350 | # BeatPulse healthcheck temp database 351 | healthchecksdb 352 | 353 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 354 | MigrationBackup/ 355 | 356 | # End of https://www.gitignore.io/api/csharp -------------------------------------------------------------------------------- /git-leaker/Main.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace git_leaker 2 | { 3 | partial class Main 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main)); 33 | this.btnConnect = new System.Windows.Forms.Button(); 34 | this.tbAPIToken = new System.Windows.Forms.TextBox(); 35 | this.lbAPIToken = new System.Windows.Forms.Label(); 36 | this.label1 = new System.Windows.Forms.Label(); 37 | this.btnScan = new System.Windows.Forms.Button(); 38 | this.statusStrip1 = new System.Windows.Forms.StatusStrip(); 39 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 40 | this.lvSearchResult = new System.Windows.Forms.ListView(); 41 | this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); 42 | this.tbRepoURL = new System.Windows.Forms.TextBox(); 43 | this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); 44 | this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); 45 | this.lbSearch = new System.Windows.Forms.Label(); 46 | this.tbSearchValue = new System.Windows.Forms.TextBox(); 47 | this.btnSearch = new System.Windows.Forms.Button(); 48 | this.tbLog = new FastColoredTextBoxNS.FastColoredTextBox(); 49 | this.tableLayoutPanel1.SuspendLayout(); 50 | this.flowLayoutPanel2.SuspendLayout(); 51 | this.flowLayoutPanel1.SuspendLayout(); 52 | this.flowLayoutPanel3.SuspendLayout(); 53 | ((System.ComponentModel.ISupportInitialize)(this.tbLog)).BeginInit(); 54 | this.SuspendLayout(); 55 | // 56 | // btnConnect 57 | // 58 | this.btnConnect.Location = new System.Drawing.Point(411, 5); 59 | this.btnConnect.Margin = new System.Windows.Forms.Padding(5); 60 | this.btnConnect.Name = "btnConnect"; 61 | this.btnConnect.Size = new System.Drawing.Size(75, 21); 62 | this.btnConnect.TabIndex = 0; 63 | this.btnConnect.Text = "连接"; 64 | this.btnConnect.UseVisualStyleBackColor = true; 65 | this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click); 66 | // 67 | // tbAPIToken 68 | // 69 | this.tbAPIToken.Location = new System.Drawing.Point(100, 5); 70 | this.tbAPIToken.Margin = new System.Windows.Forms.Padding(5); 71 | this.tbAPIToken.Name = "tbAPIToken"; 72 | this.tbAPIToken.Size = new System.Drawing.Size(301, 21); 73 | this.tbAPIToken.TabIndex = 1; 74 | // 75 | // lbAPIToken 76 | // 77 | this.lbAPIToken.Location = new System.Drawing.Point(5, 5); 78 | this.lbAPIToken.Margin = new System.Windows.Forms.Padding(5); 79 | this.lbAPIToken.Name = "lbAPIToken"; 80 | this.lbAPIToken.Size = new System.Drawing.Size(85, 21); 81 | this.lbAPIToken.TabIndex = 2; 82 | this.lbAPIToken.Text = "API Token:"; 83 | this.lbAPIToken.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 84 | // 85 | // label1 86 | // 87 | this.label1.Location = new System.Drawing.Point(5, 5); 88 | this.label1.Margin = new System.Windows.Forms.Padding(5); 89 | this.label1.Name = "label1"; 90 | this.label1.Size = new System.Drawing.Size(85, 21); 91 | this.label1.TabIndex = 4; 92 | this.label1.Text = "项目地址:"; 93 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 94 | // 95 | // btnScan 96 | // 97 | this.btnScan.Location = new System.Drawing.Point(411, 5); 98 | this.btnScan.Margin = new System.Windows.Forms.Padding(5); 99 | this.btnScan.Name = "btnScan"; 100 | this.btnScan.Size = new System.Drawing.Size(75, 21); 101 | this.btnScan.TabIndex = 5; 102 | this.btnScan.Text = "提交记录"; 103 | this.btnScan.UseVisualStyleBackColor = true; 104 | this.btnScan.Click += new System.EventHandler(this.btnScan_Click); 105 | // 106 | // statusStrip1 107 | // 108 | this.statusStrip1.Location = new System.Drawing.Point(0, 517); 109 | this.statusStrip1.Name = "statusStrip1"; 110 | this.statusStrip1.Size = new System.Drawing.Size(805, 22); 111 | this.statusStrip1.TabIndex = 8; 112 | this.statusStrip1.Text = "statusStrip1"; 113 | // 114 | // tableLayoutPanel1 115 | // 116 | this.tableLayoutPanel1.ColumnCount = 2; 117 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 118 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 119 | this.tableLayoutPanel1.Controls.Add(this.lvSearchResult, 0, 3); 120 | this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 1); 121 | this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 0); 122 | this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel3, 0, 2); 123 | this.tableLayoutPanel1.Controls.Add(this.tbLog, 1, 3); 124 | this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 125 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); 126 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 127 | this.tableLayoutPanel1.RowCount = 4; 128 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); 129 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); 130 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); 131 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 132 | this.tableLayoutPanel1.Size = new System.Drawing.Size(805, 517); 133 | this.tableLayoutPanel1.TabIndex = 9; 134 | // 135 | // lvSearchResult 136 | // 137 | this.lvSearchResult.Dock = System.Windows.Forms.DockStyle.Fill; 138 | this.lvSearchResult.FullRowSelect = true; 139 | this.lvSearchResult.HideSelection = false; 140 | this.lvSearchResult.Location = new System.Drawing.Point(5, 101); 141 | this.lvSearchResult.Margin = new System.Windows.Forms.Padding(5); 142 | this.lvSearchResult.MultiSelect = false; 143 | this.lvSearchResult.Name = "lvSearchResult"; 144 | this.lvSearchResult.Size = new System.Drawing.Size(392, 411); 145 | this.lvSearchResult.TabIndex = 12; 146 | this.lvSearchResult.UseCompatibleStateImageBehavior = false; 147 | this.lvSearchResult.View = System.Windows.Forms.View.Details; 148 | this.lvSearchResult.SelectedIndexChanged += new System.EventHandler(this.lvSearchResult_SelectedIndexChanged); 149 | this.lvSearchResult.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lvSearchResult_MouseDoubleClick); 150 | // 151 | // flowLayoutPanel2 152 | // 153 | this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel2, 2); 154 | this.flowLayoutPanel2.Controls.Add(this.label1); 155 | this.flowLayoutPanel2.Controls.Add(this.tbRepoURL); 156 | this.flowLayoutPanel2.Controls.Add(this.btnScan); 157 | this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; 158 | this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 32); 159 | this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); 160 | this.flowLayoutPanel2.Name = "flowLayoutPanel2"; 161 | this.flowLayoutPanel2.Size = new System.Drawing.Size(805, 32); 162 | this.flowLayoutPanel2.TabIndex = 10; 163 | // 164 | // tbRepoURL 165 | // 166 | this.tbRepoURL.Location = new System.Drawing.Point(100, 5); 167 | this.tbRepoURL.Margin = new System.Windows.Forms.Padding(5); 168 | this.tbRepoURL.Name = "tbRepoURL"; 169 | this.tbRepoURL.Size = new System.Drawing.Size(301, 21); 170 | this.tbRepoURL.TabIndex = 4; 171 | // 172 | // flowLayoutPanel1 173 | // 174 | this.flowLayoutPanel1.AutoScroll = true; 175 | this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 2); 176 | this.flowLayoutPanel1.Controls.Add(this.lbAPIToken); 177 | this.flowLayoutPanel1.Controls.Add(this.tbAPIToken); 178 | this.flowLayoutPanel1.Controls.Add(this.btnConnect); 179 | this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 180 | this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); 181 | this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); 182 | this.flowLayoutPanel1.Name = "flowLayoutPanel1"; 183 | this.flowLayoutPanel1.Size = new System.Drawing.Size(805, 32); 184 | this.flowLayoutPanel1.TabIndex = 10; 185 | // 186 | // flowLayoutPanel3 187 | // 188 | this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel3, 2); 189 | this.flowLayoutPanel3.Controls.Add(this.lbSearch); 190 | this.flowLayoutPanel3.Controls.Add(this.tbSearchValue); 191 | this.flowLayoutPanel3.Controls.Add(this.btnSearch); 192 | this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; 193 | this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 64); 194 | this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); 195 | this.flowLayoutPanel3.Name = "flowLayoutPanel3"; 196 | this.flowLayoutPanel3.Size = new System.Drawing.Size(805, 32); 197 | this.flowLayoutPanel3.TabIndex = 11; 198 | // 199 | // lbSearch 200 | // 201 | this.lbSearch.Location = new System.Drawing.Point(5, 5); 202 | this.lbSearch.Margin = new System.Windows.Forms.Padding(5); 203 | this.lbSearch.Name = "lbSearch"; 204 | this.lbSearch.Size = new System.Drawing.Size(85, 21); 205 | this.lbSearch.TabIndex = 7; 206 | this.lbSearch.Text = "关键词:"; 207 | this.lbSearch.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 208 | // 209 | // tbSearchValue 210 | // 211 | this.tbSearchValue.Location = new System.Drawing.Point(100, 5); 212 | this.tbSearchValue.Margin = new System.Windows.Forms.Padding(5); 213 | this.tbSearchValue.Name = "tbSearchValue"; 214 | this.tbSearchValue.Size = new System.Drawing.Size(301, 21); 215 | this.tbSearchValue.TabIndex = 6; 216 | // 217 | // btnSearch 218 | // 219 | this.btnSearch.Location = new System.Drawing.Point(411, 5); 220 | this.btnSearch.Margin = new System.Windows.Forms.Padding(5); 221 | this.btnSearch.Name = "btnSearch"; 222 | this.btnSearch.Size = new System.Drawing.Size(75, 21); 223 | this.btnSearch.TabIndex = 8; 224 | this.btnSearch.Text = "搜索"; 225 | this.btnSearch.UseVisualStyleBackColor = true; 226 | this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); 227 | // 228 | // tbLog 229 | // 230 | this.tbLog.AutoCompleteBracketsList = new char[] { 231 | '(', 232 | ')', 233 | '{', 234 | '}', 235 | '[', 236 | ']', 237 | '\"', 238 | '\"', 239 | '\'', 240 | '\''}; 241 | this.tbLog.AutoScrollMinSize = new System.Drawing.Size(27, 14); 242 | this.tbLog.BackBrush = null; 243 | this.tbLog.CharHeight = 14; 244 | this.tbLog.CharWidth = 8; 245 | this.tbLog.Cursor = System.Windows.Forms.Cursors.IBeam; 246 | this.tbLog.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))); 247 | this.tbLog.Dock = System.Windows.Forms.DockStyle.Fill; 248 | this.tbLog.IsReplaceMode = false; 249 | this.tbLog.Location = new System.Drawing.Point(405, 99); 250 | this.tbLog.Name = "tbLog"; 251 | this.tbLog.Paddings = new System.Windows.Forms.Padding(0); 252 | this.tbLog.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255))))); 253 | this.tbLog.ServiceColors = ((FastColoredTextBoxNS.ServiceColors)(resources.GetObject("tbLog.ServiceColors"))); 254 | this.tbLog.Size = new System.Drawing.Size(397, 415); 255 | this.tbLog.TabIndex = 13; 256 | this.tbLog.Zoom = 100; 257 | // 258 | // Main 259 | // 260 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 261 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 262 | this.ClientSize = new System.Drawing.Size(805, 539); 263 | this.Controls.Add(this.tableLayoutPanel1); 264 | this.Controls.Add(this.statusStrip1); 265 | this.Name = "Main"; 266 | this.Text = "Github信息泄露辅助工具"; 267 | this.tableLayoutPanel1.ResumeLayout(false); 268 | this.flowLayoutPanel2.ResumeLayout(false); 269 | this.flowLayoutPanel2.PerformLayout(); 270 | this.flowLayoutPanel1.ResumeLayout(false); 271 | this.flowLayoutPanel1.PerformLayout(); 272 | this.flowLayoutPanel3.ResumeLayout(false); 273 | this.flowLayoutPanel3.PerformLayout(); 274 | ((System.ComponentModel.ISupportInitialize)(this.tbLog)).EndInit(); 275 | this.ResumeLayout(false); 276 | this.PerformLayout(); 277 | 278 | } 279 | 280 | #endregion 281 | 282 | private System.Windows.Forms.Button btnConnect; 283 | private System.Windows.Forms.TextBox tbAPIToken; 284 | private System.Windows.Forms.Label lbAPIToken; 285 | private System.Windows.Forms.Label label1; 286 | private System.Windows.Forms.Button btnScan; 287 | private System.Windows.Forms.StatusStrip statusStrip1; 288 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 289 | private System.Windows.Forms.TextBox tbRepoURL; 290 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; 291 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; 292 | private System.Windows.Forms.ListView lvSearchResult; 293 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; 294 | private System.Windows.Forms.Label lbSearch; 295 | private System.Windows.Forms.TextBox tbSearchValue; 296 | private System.Windows.Forms.Button btnSearch; 297 | private FastColoredTextBoxNS.FastColoredTextBox tbLog; 298 | } 299 | } 300 | 301 | --------------------------------------------------------------------------------