Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
astacodes committed Oct 8, 2024
0 parents commit 858faab
Show file tree
Hide file tree
Showing 55 changed files with 1,873 additions and 0 deletions.
25 changes: 25 additions & 0 deletions RBXInjector.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35312.102
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RBXInjector", "RBXInjector\RBXInjector.csproj", "{DF613A6D-94D1-4467-98A5-29A7D16B8D79}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DF613A6D-94D1-4467-98A5-29A7D16B8D79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF613A6D-94D1-4467-98A5-29A7D16B8D79}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF613A6D-94D1-4467-98A5-29A7D16B8D79}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF613A6D-94D1-4467-98A5-29A7D16B8D79}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3D4B2481-8524-4BB8-9CEB-3208827B0E41}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions RBXInjector/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
9 changes: 9 additions & 0 deletions RBXInjector/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="RBXInjector.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:RBXInjector"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions RBXInjector/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace RBXInjector
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
97 changes: 97 additions & 0 deletions RBXInjector/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<Window x:Class="RBXInjector.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:RBXInjector"
mc:Ignorable="d"
Title="RBXInjector"
Height="355"
Width="500"
WindowStyle="SingleBorderWindow"
ResizeMode="CanMinimize"
Background="#1b1b1b">

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="17*"/>
<ColumnDefinition Width="83*"/>
</Grid.ColumnDefinitions>
<TextBlock FontFamily="Montserrat" FontSize="17px" Foreground="White" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="RBXInjector" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
<ComboBox x:Name="comboBox1"
Foreground="White"
BorderBrush="Gray"
HorizontalAlignment="Left"
Margin="38,59,0,0"
VerticalAlignment="Top"
Width="251"
Loaded="ComboBox_Loaded" FontFamily="Montserrat" Padding="10,5" VerticalContentAlignment="Center" SelectionChanged="comboBox1_SelectionChanged" Grid.Column="1" Height="29">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Foreground="White" />
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.ItemContainerStyle>
<Style TargetType="ComboBoxItem">
<Setter Property="Background" Value="#1e1e1e"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="Margin" Value="0,1,0,1"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#3e3e3e"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#2e2e2e"/>
</Trigger>
</Style.Triggers>
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<TextBlock FontFamily="Montserrat" FontSize="12px" Foreground="White" HorizontalAlignment="Left" Margin="39,42,0,0" TextWrapping="Wrap" Text="Select Process" VerticalAlignment="Top" Grid.Column="1"/>
<TextBlock FontFamily="Montserrat" FontSize="12px" Foreground="White" HorizontalAlignment="Left" Margin="17,104,0,0" TextWrapping="Wrap" Text="Select DLL" VerticalAlignment="Top" Grid.ColumnSpan="2"/>
<TextBox x:Name="textBox1" IsReadOnly="True" BorderBrush="Gray" TextAlignment="Left" Padding="10,5" VerticalContentAlignment="Center" FontFamily="Montserrat" Background="#1e1e1e" Foreground="White" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="17,124,0,0" TextWrapping="Wrap" Text="None Selected" VerticalAlignment="Top" Width="158" Height="31"/>
<Button FontFamily="Montserrat" Background="#1e1e1e" Foreground="White" Grid.Column="1" Content="..." HorizontalAlignment="Left" Margin="95,124,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.202,0.553" Height="31" Width="40" Click="Button_Click"/>
<TextBlock FontFamily="Montserrat" FontSize="12px" Foreground="White" HorizontalAlignment="Left" Margin="163,104,0,0" TextWrapping="Wrap" Text="Injection Method" VerticalAlignment="Top" Grid.Column="1"/>
<ComboBox x:Name="comboBox2"
Foreground="White"
BorderBrush="Gray"
HorizontalAlignment="Left"
Margin="165,126,0,0"
VerticalAlignment="Top"
Width="227"
Loaded="ComboBox_Loaded" FontFamily="Montserrat" Padding="10,5" VerticalContentAlignment="Center" Grid.Column="1" Height="29" SelectionChanged="comboBox2_SelectionChanged">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Foreground="White" />
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Background" Value="#1e1e1e"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="Margin" Value="0,1,0,1"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#3e3e3e"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#2e2e2e"/>
</Trigger>
</Style.Triggers>
</Style>
</ComboBox.ItemContainerStyle>
<ComboBoxItem IsSelected="False" Content="WinTrust Patch (SetWindowsHookEx)" Name="Option1">

</ComboBoxItem>
</ComboBox>
<Button x:Name="InjectDLL" FontFamily="Montserrat" Background="#1e1e1e" Foreground="White" Content="Inject" HorizontalAlignment="Left" Margin="17,264,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.202,0.553" Height="31" Width="112" Grid.ColumnSpan="2" Click="InjectDLL_Click"/>
<TextBlock x:Name="winTrustCallbackText" Visibility="Hidden" FontFamily="Montserrat" FontSize="12px" Foreground="White" HorizontalAlignment="Left" Margin="165,167,0,0" TextWrapping="Wrap" Text="Callback Name" VerticalAlignment="Top" Grid.Column="1" Width="92"/>
<TextBox x:Name="winTrustCallback" Visibility="Hidden" BorderBrush="Gray" TextAlignment="Left" Padding="10,5" VerticalContentAlignment="Center" FontFamily="Montserrat" Background="#1e1e1e" Foreground="White" HorizontalAlignment="Left" Margin="165,187,0,0" TextWrapping="Wrap" Text="Callback" VerticalAlignment="Top" Width="227" Height="31" Grid.Column="1"/>
</Grid>
</Window>
172 changes: 172 additions & 0 deletions RBXInjector/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace RBXInjector
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private DispatcherTimer processTimer;
private List<ProcessItem> currentProcessItems = new List<ProcessItem>();
private string selectedDllPath;
private int selectedPID;

public MainWindow()
{
InitializeComponent();

processTimer = new DispatcherTimer();
processTimer.Interval = TimeSpan.FromSeconds(1);
processTimer.Tick += ProcessTimer_Tick;
processTimer.Start();
}

private class ProcessItem
{
public string ProcessName { get; set; }
public int ProcessID { get; set; }

public ProcessItem(string name, int id)
{
ProcessName = name;
ProcessID = id;
}
public override string ToString()
{
return $"{ProcessName}.exe (PID: {ProcessID})";
}
}

private void ProcessTimer_Tick(object sender, EventArgs e)
{
Process[] robloxProcesses = Process.GetProcessesByName("RobloxPlayerBeta");
HashSet<int> existingProcessIds = new HashSet<int>(currentProcessItems.Select(item => item.ProcessID));

foreach (Process proc in robloxProcesses)
{
if (!existingProcessIds.Contains(proc.Id))
{
ProcessItem newItem = new ProcessItem(proc.ProcessName, proc.Id);
comboBox1.Items.Add(newItem);
currentProcessItems.Add(newItem);
}
}

for (int i = currentProcessItems.Count - 1; i >= 0; i--)
{
if (!robloxProcesses.Any(p => p.Id == currentProcessItems[i].ProcessID))
{
comboBox1.Items.Remove(currentProcessItems[i]);
currentProcessItems.RemoveAt(i);
}
}
}

private void ComboBox_Loaded(object sender, RoutedEventArgs e)
{
ComboBox comboBox = (ComboBox)sender;
ToggleButton toggleButton = comboBox.Template.FindName("toggleButton", comboBox) as ToggleButton;
if (toggleButton != null)
{
Border border = toggleButton.Template.FindName("templateRoot", toggleButton) as Border;
if (border != null)
border.Background = (Brush)new BrushConverter().ConvertFromString("#1e1e1e");
}
}

private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (comboBox1.SelectedItem is ProcessItem selectedProcess)
{
selectedPID = selectedProcess.ProcessID;
MessageBox.Show($"Selected Process PID: {selectedPID}");
}
}

private void Button_Click(object sender, RoutedEventArgs e)
{
Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog();
openFileDialog.Filter = "DLL Files (*.dll)|*.dll";
if (openFileDialog.ShowDialog() == true)
{
selectedDllPath = openFileDialog.FileName;
Button button = sender as Button;
if (button != null)
{
textBox1.Text = System.IO.Path.GetFileName(selectedDllPath);
}
}
}

private void comboBox2_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (comboBox2.SelectedItem is ComboBoxItem selectedItem)
{
string itemName = selectedItem.Content.ToString();

if (itemName == "WinTrust Patch (SetWindowsHookEx)")
{
winTrustCallback.Visibility = Visibility.Visible;
winTrustCallbackText.Visibility = Visibility.Visible;
} else
{
winTrustCallback.Visibility = Visibility.Hidden;
winTrustCallbackText.Visibility = Visibility.Hidden;
}
}
}

private void InjectDLL_Click(object sender, RoutedEventArgs e)
{
if (comboBox2.SelectedItem is ComboBoxItem selectedItem)
{
string itemName = selectedItem.Content.ToString();

if (itemName == "WinTrust Patch (SetWindowsHookEx)")
{
string exePath = System.IO.Path.Combine("bin", "WinTrust Patch Injector.exe");

string arg1 = selectedDllPath;
string arg2 = winTrustCallback.Text;
string arguments = $"{arg1} {arg2}";

ProcessStartInfo startInfo = new ProcessStartInfo
{
FileName = exePath,
Arguments = arguments,
UseShellExecute = true
};

try
{
Process.Start(startInfo);
}
catch (Exception ex)
{
MessageBox.Show($"Error starting process: {ex.Message}");
}

return;
}
}
}
}
}
52 changes: 52 additions & 0 deletions RBXInjector/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;

// 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("RBXInjector")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RBXInjector")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[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)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]


// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 858faab

Please sign in to comment.