Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Rearranged window so it look more pretty, added error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pnlt-s committed May 28, 2021
1 parent f63734e commit a0f40d8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
7 changes: 6 additions & 1 deletion Classes/MoonSecNet.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Win32;
using System;
using System.Windows;
using System.Collections.Generic;
using System.IO;
using System.Net;
Expand All @@ -13,7 +14,7 @@ class MoonSecNet
string Platform = "Lua";
string Bytecode = "1";
string Options = "";
public string EndFile = "deobfuscated.lua";
public string EndFile = "obfuscated.lua";

string[] AvOpt = new string[] {
"StringEncryption",
Expand Down Expand Up @@ -106,6 +107,10 @@ public async void Obfuscate(string code)
}
}
}
catch (WebException we)
{
MessageBox.Show(we.Message);
}
catch (Exception e)
{
StreamWriter sw = new StreamWriter("errors.log", true);
Expand Down
1 change: 1 addition & 0 deletions Forms/LoadWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void Load()

private async void Window_Loaded(object sender, RoutedEventArgs e)
{
// checking server accessibility
try
{
var req = WebRequest.CreateHttp("https://api.f3d.at/v1/obfuscate.php");
Expand Down
4 changes: 2 additions & 2 deletions Forms/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MoonSec"
mc:Ignorable="d"
Title="MoonSec" Height="350" Width="600"
Title="MoonSec" Height="360" Width="600"
WindowStartupLocation="CenterScreen"
ResizeMode="CanMinimize"
Topmost="True"
Expand All @@ -27,7 +27,7 @@
<CheckBox x:Name="smallOutputCheck" Checked="strEncCheck_Checked" VerticalContentAlignment="Center" Height="30" FontSize="18" Foreground="White" FontFamily="Century Gothic" Content="Small Output"/>
</StackPanel>
</GroupBox>
<GroupBox Header="File Path" FontFamily="Century Gothic" FontSize="18" Padding="5" Foreground="White" Height="75" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Margin="10 75">
<GroupBox Header="File Path" FontFamily="Century Gothic" FontSize="18" Padding="5" Foreground="White" Height="75" VerticalAlignment="Top" Margin="10,171,10,0">
<DockPanel Height="30">
<TextBox x:Name="file" Width="450" VerticalContentAlignment="Center" Margin="5 0 5 0"></TextBox>
<Button x:Name="openFile" Width="75" VerticalContentAlignment="Center" Content="..." Click="openFile_Click"></Button>
Expand Down
2 changes: 1 addition & 1 deletion Forms/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public MainWindow()
{
InitializeComponent();

moonSec = new MoonSecNet("API Key Provided by MoonSec");
moonSec = new MoonSecNet("YOUR_API_KEY");

Platforms.ItemsSource = PlatformCollection.GetPlatforms().Keys;
Platforms.SelectedIndex = 0;
Expand Down

0 comments on commit a0f40d8

Please sign in to comment.