First commit - OpenBullet 1.0.0

This commit is contained in:
ruri
2019-03-31 12:18:26 +02:00
parent 1a0775b648
commit 422079782d
296 changed files with 31668 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenBullet", "OpenBullet\OpenBullet.csproj", "{99E40E7F-00A4-4FB1-9441-B05A56C47C08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RuriLib", "RuriLib\RuriLib.csproj", "{17E95D0B-C1FD-445C-9FDF-244AF7299A67}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenBulletCLI", "OpenBulletCLI\OpenBulletCLI.csproj", "{0B6D8B01-861E-4CAF-B1C9-6670884381DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{99E40E7F-00A4-4FB1-9441-B05A56C47C08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99E40E7F-00A4-4FB1-9441-B05A56C47C08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99E40E7F-00A4-4FB1-9441-B05A56C47C08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99E40E7F-00A4-4FB1-9441-B05A56C47C08}.Release|Any CPU.Build.0 = Release|Any CPU
{17E95D0B-C1FD-445C-9FDF-244AF7299A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17E95D0B-C1FD-445C-9FDF-244AF7299A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17E95D0B-C1FD-445C-9FDF-244AF7299A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17E95D0B-C1FD-445C-9FDF-244AF7299A67}.Release|Any CPU.Build.0 = Release|Any CPU
{0B6D8B01-861E-4CAF-B1C9-6670884381DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B6D8B01-861E-4CAF-B1C9-6670884381DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B6D8B01-861E-4CAF-B1C9-6670884381DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B6D8B01-861E-4CAF-B1C9-6670884381DB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D3B9D7E8-3A43-46E9-8A81-FF84254697A0}
EndGlobalSection
EndGlobal
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin" />
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+27
View File
@@ -0,0 +1,27 @@
<Application x:Class="OpenBullet.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:OpenBullet"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<!-- Colors -->
<SolidColorBrush x:Key="ThemeMain" Color="#1E90FF" />
<SolidColorBrush x:Key="BackgroundMain" Color="#222" />
<SolidColorBrush x:Key="BackgroundSecondary" Color="#111" />
<SolidColorBrush x:Key="ForegroundMain" Color="Gainsboro" />
<SolidColorBrush x:Key="ForegroundGood" Color="GreenYellow"/>
<SolidColorBrush x:Key="ForegroundBad" Color="Tomato"/>
<SolidColorBrush x:Key="ForegroundCustom" Color="DarkOrange"/>
<SolidColorBrush x:Key="ForegroundRetry" Color="Yellow"/>
<SolidColorBrush x:Key="ForegroundToCheck" Color="Aquamarine"/>
<SolidColorBrush x:Key="ForegroundMenuSelected" Color="DodgerBlue"/>
<SolidColorBrush x:Key="Headers" />
<!-- Fonts -->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml" />
<ResourceDictionary Source="Themes/MetroDark/MetroDark.MSControls.Toolkit.Implicit.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
+11
View File
@@ -0,0 +1,11 @@
using System.Windows;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per App.xaml
/// </summary>
public partial class App : Application
{
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

@@ -0,0 +1,21 @@
using System;
using System.Windows.Data;
using System.Windows.Media;
namespace OpenBullet.Converters
{
public class BooleanBrushConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return new SolidColorBrush((bool)value?.Equals(true) ? Colors.Tomato : Colors.Yellow);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return false;
}
#endregion
}
}
@@ -0,0 +1,20 @@
using System;
using System.Windows.Data;
namespace OpenBullet.Converters
{
public class EnumBooleanConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value?.Equals(parameter);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value?.Equals(true) == true ? parameter : Binding.DoNothing;
}
#endregion
}
}
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OpenBullet.Converters
{
class KeychainBrushConverter
{
}
}
+44
View File
@@ -0,0 +1,44 @@
[WLTYPE]
Name=Default
Regex=^.*$
Verify=False
Separator=:
Slices=DATA
[WLTYPE]
Name=Email
Regex=^[^@]+@[^\.]+\..+$
Verify=True
Separator=:
Slices=EMAIL
[WLTYPE]
Name=Credentials
Regex=^.*:.*$
Verify=True
Separator=:
Slices=USERNAME,PASSWORD
[WLTYPE]
Name=Numeric
Regex=^[0-9]*$
Verify=True
Separator=:
Slices=CODE
[WLTYPE]
Name=URLs
Regex=^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$
Verify=True
Separator=:
Slices=URL
[CUSTOMKC]
Name=CUSTOM
Color=OrangeRed
[EXPFORMAT]
Format=<CAPTURE>
[EXPFORMAT]
Format=<DATA>:<PROXY>:<CAPTURE>
Binary file not shown.
Binary file not shown.
Binary file not shown.
+129
View File
@@ -0,0 +1,129 @@
using OpenBullet.ViewModels;
using RuriLib;
using RuriLib.Models;
using RuriLib.Runner;
using RuriLib.ViewModels;
using System;
using System.Collections.ObjectModel;
using System.IO;
using System.Windows;
using System.Windows.Media;
namespace OpenBullet
{
public enum Components
{
Main,
RunnerManager,
Runner,
ProxyManager,
WordlistManager,
HitsDB,
ConfigManager,
Stacker,
OtherOptions,
Settings,
ListGenerator,
SeleniumTools,
ComboSuite,
About
}
public static class Globals
{
// Version
public static string obVersion = "1.0.0";
// Main Window
public static MainWindow mainWindow;
// Log Window
public static LogWindow logWindow;
public static OBLog log = new OBLog();
// Constant file paths
public static string dataBaseFile = @"DB/OpenBullet.db";
public static string obSettingsFile = @"Settings/OBSettings.json";
public static string rlSettingsFile = @"Settings/RLSettings.json";
public static string envFile = @"Settings/Environment.ini";
public static string licenseFile = @"Settings/License.txt";
public static string logFile = @"Log.txt";
public static string configFolder = @"Configs";
// Settings
public static OBSettingsViewModel obSettings;
public static RLSettingsViewModel rlSettings;
public static EnvironmentSettings environment;
// Runners
public static ObservableCollection<RunnerViewModel> Runners = new ObservableCollection<RunnerViewModel>();
// Logging Methods
public static void Log(Components component, LogLevel level, string message, bool prompt = false)
{
if (prompt) MessageBox.Show(message, level.ToString());
if (!CanLog()) return;
App.Current.Dispatcher.Invoke(new Action(() =>
{
var entry = new LogEntry(component.ToString(), message, level);
InsertEntry(entry);
LogToFile(entry);
}));
}
public static void LogInfo(Components component, string message, bool prompt = false)
{
Log(component, LogLevel.Info, message, prompt);
}
public static void LogWarning(Components component, string message, bool prompt = false)
{
Log(component, LogLevel.Warning, message, prompt);
}
public static void LogError(Components component, string message, bool prompt = false)
{
Log(component, LogLevel.Error, message, prompt);
}
private static bool CanLog()
{
try
{
return obSettings.General.EnableLogging;
}
catch { return false; }
}
private static void InsertEntry(LogEntry entry)
{
try
{
log.List.Insert(0, entry);
}
catch { }
}
private static void LogToFile(LogEntry entry)
{
try
{
if(obSettings.General.LogToFile)
File.AppendAllText(logFile, $"[{entry.LogTime}] ({entry.LogLevel}) {entry.LogComponent} - " + entry.LogString + Environment.NewLine);
}
catch { }
}
public static System.Windows.Media.Color GetColor(string propertyName)
{
try { return ((SolidColorBrush)App.Current.Resources[propertyName]).Color; }
catch { return ((SolidColorBrush)App.Current.Resources["ForegroundMain"]).Color; }
}
public static SolidColorBrush GetBrush(string propertyName)
{
try { return (SolidColorBrush)App.Current.Resources[propertyName]; }
catch { return (SolidColorBrush)App.Current.Resources["ForegroundMain"]; }
}
}
}
+301
View File
@@ -0,0 +1,301 @@
/*****************
* Author: Boris Dongarov (ideafixxxer)
*
* http://www.codeproject.com/Members/ideafixxxer
*
******************/
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace OpenBullet
{
/// <summary>
/// Sorts lines in huge text files
/// </summary>
public class HugeFileSort
{
#region Fields
long maxFileSize = 100 * 1024 * 1024;
//This collection maps string corresponding to the beginning of the lines in the input file
//to temp files containing sorted lines starting from this string,
//and to unsorted files containing only this strings
SortedDictionary<string, ChunkInfo> chunks;
static int fileCounter;
#endregion
#region Properties
/// <summary>
/// Comparer that is used to sort strings in the file
/// </summary>
public StringComparer Comparer { get; set; }
/// <summary>
/// Input file encoding
/// </summary>
public Encoding Encoding { get; set; }
/// <summary>
/// Maximum size of a file that can be loaded into memory for processing
/// </summary>
public long MaxFileSize { get { return maxFileSize; } set { maxFileSize = value; } }
#endregion
#region Nested Types
/// <summary>
/// Contains information related to beginning of lines in the file
/// </summary>
class ChunkInfo
{
StreamWriter noSortWriter;
string noSortFileName;
/// <summary>
/// The name of the file, containing sorted lines starting with the given string
/// </summary>
public string FileName;
/// <summary>
/// Adds a small string to file <see cref="NoSortFileName"/>
/// </summary>
/// <param name="str"></param>
public void AddSmallString(string str, Encoding encoding)
{
if (noSortWriter == null)
{
noSortFileName = GenerateFileName();
noSortWriter = new StreamWriter(noSortFileName, false, encoding);
}
noSortWriter.WriteLine(str);
}
/// <summary>
/// Closes opened stream
/// </summary>
public void Close()
{
if (noSortWriter != null) noSortWriter.Close();
}
/// <summary>
/// The name of the file, containing only the given string
/// </summary>
public string NoSortFileName { get { return noSortFileName; } }
private string GenerateFileName()
{
return "tmp\\n" + fileCounter++ + ".txt";
}
}
/// <summary>
/// Contains information about file chunk
/// </summary>
class FileChunk
{
StreamWriter writer;
long size;
string fileName;
public FileChunk(Encoding encoding)
{
fileName = GenerateFileName();
writer = new StreamWriter(fileName, false, encoding);
}
private string GenerateFileName()
{
return "tmp\\s" + fileCounter++ + ".txt";
}
/// <summary>
/// Appends the line to the file
/// </summary>
/// <param name="entry">Text line to append</param>
public void Append(string entry, Encoding encoding)
{
writer.WriteLine(entry);
size += encoding.GetByteCount(entry) + encoding.GetByteCount(Environment.NewLine);
}
/// <summary>
/// File size in bytes
/// </summary>
public long Size { get { return size; } }
/// <summary>
/// File name
/// </summary>
public string FileName { get { return fileName; } }
/// <summary>
/// Closes file stream
/// </summary>
public void Close()
{
writer.Close();
}
}
#endregion
/// <summary>
/// Initializes a new instance of <see cref="HugeFileSort"/>
/// </summary>
public HugeFileSort()
{
Comparer = StringComparer.CurrentCulture;
Encoding = Encoding.UTF8;
}
/// <summary>
/// Performs sorting
/// </summary>
/// <param name="inputFileName">The name of the file that needs to be sorted</param>
/// <param name="outputFileName">The name of the file in which sorted lines from the <paramref name="inputFileName"/> should be saved</param>
public void Sort(string inputFileName, string outputFileName)
{
chunks = new SortedDictionary<string, ChunkInfo>(Comparer);
var info = new FileInfo(inputFileName);
//If file size is less than maxFileSize simply sort its content in memory.
if (info.Length < maxFileSize)
SortFile(inputFileName, outputFileName);
//Otherwise create temp directory and split file into chunks, saving each chunk as a new file into this directory
else
{
var dir = new DirectoryInfo("tmp");
if (dir.Exists)
dir.Delete(true);
dir.Create();
SplitFile(inputFileName, 1);
Merge(outputFileName);
}
}
/// <summary>
/// Merges all chunks into one file
/// </summary>
private void Merge(string outputFileName)
{
using (var output = File.Create(outputFileName))
{
foreach (var name in chunks)
{
name.Value.Close();
if (name.Value.NoSortFileName != null)
{
CopyFile(name.Value.NoSortFileName, output);
//File.Delete(name.Value.NoSortFileName);
}
if (name.Value.FileName != null)
{
CopyFile(name.Value.FileName, output);
//File.Delete(name.Value.FileName);
}
}
}
}
/// <summary>
/// Copy content of the file into stream
/// </summary>
/// <param name="fileName">The name of the file to copy from</param>
/// <param name="output">Output file stream</param>
private void CopyFile(string fileName, FileStream output)
{
using (var file = File.OpenRead(fileName))
{
file.CopyTo(output);
}
}
/// <summary>
/// Splits big file into some chunks by matching starting characters in each line
/// </summary>
/// <param name="inputFileName">Big file name</param>
/// <param name="chars">Number of starting characters to split by</param>
private void SplitFile(string inputFileName, int chars)
{
var files = new Dictionary<string, FileChunk>(Comparer);
using (var sr = new StreamReader(inputFileName, Encoding))
{
while (sr.Peek() >= 0)
{
string entry = sr.ReadLine();
//The length of the line is less than the current number of characters we split by
//In this cases we add the line to the non-sorted file
if (entry.Length < chars)
{
ChunkInfo nameInfo;
if (!chunks.TryGetValue(entry, out nameInfo))
chunks.Add(entry, nameInfo = new ChunkInfo());
nameInfo.AddSmallString(entry, Encoding);
}
//Otherwise we add the line to the file corresponding to the first char characters of the line
else
{
string start = entry.Substring(0, chars);
FileChunk sfi;
if (!files.TryGetValue(start, out sfi))
{
sfi = new FileChunk(Encoding);
files.Add(start, sfi);
}
sfi.Append(entry, Encoding);
}
}
}
//For each of the chunk we check if size of the chunk is still greater than the maxFileSize
foreach (var file in files)
{
file.Value.Close();
//If it is - split to smaller chunks
if (file.Value.Size > maxFileSize)
{
SplitFile(file.Value.FileName, chars + 1);
File.Delete(file.Value.FileName);
}
//Otherwise save it to the dictionary
else
{
SortFile(file.Value.FileName, file.Value.FileName);
ChunkInfo nameInfo;
if (!chunks.TryGetValue(file.Key, out nameInfo))
chunks.Add(file.Key, nameInfo = new ChunkInfo());
nameInfo.FileName = file.Value.FileName;
}
}
}
/// <summary>
/// Sorts content of the specified file
/// </summary>
/// <param name="inputFileName">File to sort</param>
/// <param name="outputFileName">File to write results to</param>
private void SortFile(string inputFileName, string outputFileName)
{
var info = new FileInfo(inputFileName);
var entries = new List<string>((int)(info.Length / 4L));
using (var sr = new StreamReader(inputFileName, Encoding))
{
while (sr.Peek() >= 0)
entries.Add(sr.ReadLine());
}
entries.Sort(Comparer);
using (var sw = new StreamWriter(outputFileName, false, Encoding))
{
foreach (string entry in entries)
{
sw.WriteLine(entry);
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

+472
View File
@@ -0,0 +1,472 @@
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<section name="General Info">
<item name="What is LoliScript?">
LoliScript (LS) is a custom scripting language made to give access to all existing (plus some more advanced) capabilities of OpenBullet.
Every instruction is a one-liner (but can be broken down into multiple segments for readability) and it will integrate the existing block execution capabilities with some other that cannot be reproduced with normal blocks.
This is ABSOLUTELY NOT a fully functional scripting language meant to replace the capabilities offered by JavaScript or Python.
Here's an example of a LoliScript command:
PRINT Hello, World!
And here's how you would execute a standard Function Block:
FUNCTION Constant "Hello, World!" -> VAR "GREETING"
In this documentation you will learn how to use LoliScript to its full potential and integrate it with your other blocks or even stop using blocks altogether!
</item>
<item name="When to use it">
You should use LoliScript when:
• you need more powerful tools to build a config
• you want something faster and much easier to debug at a glance
• you don't want to deal with clicking on tens of blocks in big configs
</item>
</section>
<section name="Syntax">
<item name="Introduction">
LoliScript has a linear syntax where each line is a command.
Example:
FUNCTION Constant "Hello, World!" -> VAR "GREETING"
Indentation will be considered as a continuation of the previous line, so writing something like:
FUNCTION Constant
"Hello, World!"
-> VAR "GREETING"
is completely equivalent to the one-liner above.
Optional arguments will be wrapped with square brackets [ ] and they don't need to be set each time.
Every command follows this scheme:
CMDID [ARGUMENTS]
CMDID uniquely identifies a command or flow control statement by its name
[ARGUMENTS] can have different types and they are used to customize the command you want to execute
</item>
<item name="Argument Types">
The arguments can be of 4 types:
• Parameter (usually identifies an enumerator value)
FUNCTION Hash SHA512 ...
• Numeric (usually an integer)
FUNCTION RandomNum 0 100 ...
• Boolean (a parameter name (case sensitive!) followed by =True or =False)
KEYCHECK BanOn4XX=True BanOnTocheck=False
• Literal (corresponds to a string argument)
FUNCTION Constant "Hello" ...
Note that you will have to escape double quotes inside a literal, for example
FUNCTION Constant "This is how to \"escape\" double quotes" ...
• Redirector (used to direct the output to a variable or a file)
FUNCTION Constant "Hello" -> VAR "GREETING"
FUNCTION Constant "Hello" -> CAP "Greeting"
</item>
<item name="Variables">
You can access the saved values of variables and use them in literals by including them in angle brackets like this &lt;A&gt;.
There are 3 types of variables:
Single
List
Dictionary
Examples (NAME is the variable name):
- Single
&lt;NAME&gt;
- List (access one element by index or all element using * as index)
&lt;NAME[0]&gt;
&lt;NAME[*]&gt;
- Dictionary (access by key using () and by value using {}, supports *)
&lt;NAME(key)&gt;
&lt;NAME{value}&gt;
&lt;NAME(*)&gt;
&lt;NAME{*}&gt;
</item>
<item name="Comments">
Every line that starts with two #s is considered a comment
Example:
## THIS IS A COMMENT
</item>
</section>
<section name="General Commands">
<item name="PRINT">
This command is peculiar since it doesn't take a literal argument but just parses the rest of the line after the keyword PRINT and outputs it to the debugger log.
Syntax:
PRINT TEXT
Example:
PRINT Hello, World!
</item>
<item name="SET">
This command is very powerful as it allows manipulation on the global data of the bot.
Syntax:
SET IDENTIFIER [PARAMETERS]
Allowed identifiers:
SOURCE - The stored response source of the last request performed
STATUS - The status of the bot
RESPONSECODE - The response code of the last request performed
COOKIE - Sets the value for a cookie of the global cookie jar given its name
ADDRESS - The address of the response of the last request performed
PROXY - Sets the current proxy
PROXYTYPE - Sets the current proxy type
DATA - Sets the current data
VAR - Sets a variable
CAP - Sets a captured data
NEWGVAR - Initializes a new global variable (only if it doesn't exist)
GVAR - Sets a global variable's value
GCOOKIES - Sets cookies from the local cookie jar into the global cookie jar
Examples:
SET SOURCE "Example Source"
SET STATUS SUCCESS
SET STATUS CUSTOM "ABCD"
SET RESPONSECODE 200
SET COOKIE "token" "abcdef"
SET ADDRESS "https://www.google.com"
SET PROXY "127.0.0.1:8888"
SET PROXYTYPE HTTP
SET DATA "abc:def"
SET VAR "varname" "data"
SET CAP "capname" "data"
SET NEWGVAR "sharedcookie" "abc=123"
SET GVAR "sharedcookie" "def=456"
SET GCOOKIES
</item>
<item name="DELETE">
This command allows you to delete elements from current collections.
Syntax:
DELETE IDENTIFIER [CONDITION] "LITERAL"
Allowed identifiers:
COOKIE
VAR
GVAR
The default condition is EqualTo
Examples:
DELETE COOKIE Contains "phpsessid"
DELETE VAR "TOKEN"
DELETE GVAR "MAX"
</item>
<item name="Mouse Action">
This command allows you to perform advanced mouse actions in the browser.
General Syntax:
MOUSEACTION [ACTION [PARAMETERS]]*
General Syntax for an ELEMENT parameter:
ELEMENT LOCATOR "STRING" [INDEX]
Allowed Actions:
## Spawn a div with a given id to a (x,y) absolute position, so you can use it as element hook for mouse movement
SPAWN "ID" X Y
CLICK [ELEMENT]
CLICKANDHOLD [ELEMENT]
RIGHTCLICK [ELEMENT]
DOUBLECLICK [ELEMENT]
DRAGANDDROP ELEMENT -> ELEMENT
DRAGANDDROPWITHOFFSET X Y ELEMENT
KEYDOWN "KEY" [ELEMENT]
KEYUP "KEY" [ELEMENT]
MOVEBY X Y
MOVETO ELEMENT
RELEASE [ELEMENT]
SENDKEYS "KEYS" [ELEMENT]
## Draws random points in a square starting from the top left corner and with the given width and height
DRAWPOINTS MAXW MAXH AMOUNT
DRAWLINE (X1 Y2 -> X2 Y2 / ELEMENT -> ELEMENT) : AMOUNT
DRAWLINEHUMAN (X1 Y1 -> X2 Y2 / ELEMENT -> ELEMENT) : AMOUNT [GRAVITY WIND]
Examples:
## Moving to an element and clicking 100 pixels right of it
MOUSEACTION
MOVETO ELEMENT CLASS "testclass" 1
MOVEBY 100 0
CLICK
## Moving to a specific set of coordinates on the page
MOUSEACTION
SPAWN "target" 100 150
MOVETO ELEMENT ID "target"
## Moving like a human from point A (0,0) to point B (700,700). The lower the AMOUNT, the faster the line is drawn
MOUSEACTION
DRAWLINEHUMAN 0 0 -> 700 700 : 150 1 1
## Moving like a human from element with id="one" to element with id="two", 20 points and default gravity/wind
MOUSEACTION
DRAWLINEHUMAN ELEMENT ID "one" -> ELEMENT ID "two" : 20
</item>
</section>
<section name="Block Commands">
<item name="Info">
The block commands will spawn and execute a block of the corresponding type, after setting all the required parameters.
You can give a label to any block by writing # and then the preferred label, for example:
#GETLEN FUNCTION Length "Test123" -> VAR "LEN"
</item>
<item name="Function">
This will spawn and execute a Function Block.
Note: If the input has a variable of List type, the function will be executed on all the elements and return a new List variable.
Syntax:
FUNCTION Name [ARGUMENTS] ["INPUT STRING"] [-> VAR/CAP "NAME"]
Examples:
FUNCTION Constant "Hello" -> VAR "GREETING"
FUNCTION Constant "Name is &lt;NAME[*]&gt;" -> CAP "Names"
FUNCTION ClearCookies
Peculiar functions:
FUNCTION Hash SHA512 "&lt;PASS&gt;" -> VAR "HASHED"
FUNCTION HMAC SHA1 "key" HmacBase64=True "&lt;PASS&gt;" -> VAR "DIGEST"
FUNCTION Translate StopAfterFirstMatch=True
KEY "key1" VALUE "value1"
KEY "key2" VALUE "value2"
"input" -> CAP "Translated"
FUNCTION DateToUnixTime "format" "input" -> VAR "DATE"
FUNCTION Replace "what" "with" UseRegex=True "input" -> VAR "REPLACED"
FUNCTION RegexMatch "pattern" "input" -> VAR "MATCHED"
FUNCTION RandomNum 0 100 -> VAR "RANDOM"
FUNCTION CountOccurrences "tofind" "input" -> VAR "COUNT"
FUNCTION CharAt "index" "input" -> VAR "CHAR"
FUNCTION Substring "startindex" "length" "input" -> VAR "SUBSTRING"
</item>
<item name="Keycheck">
This will spawn and execute a Keycheck Block.
Syntax (expanded for readability):
KEYCHECK [BanOn4XX?] [BanOnToCheck?]
[KEYCHAIN TYPE ["CUSTOMNAME"] MODE
[KEY "STRING" [CONDITION "STRING"]]*
]*
Note: As shown above, for brevity,
KEY "&lt;SOURCE&gt;" Contains "abc"
can be written as
KEY "abc"
Example:
KEYCHECK BanOnToCheck=False
KEYCHAIN SUCCESS OR
KEY "Logout"
KEYCHAIN FAILURE OR
KEY "&lt;SOURCE&gt;" EqualTo ""
KEYCHAIN CUSTOM "DEFAULT" OR
KEY "abc" Contains "ab"
</item>
<item name="Request">
This will spawn and execute a Request Block.
Syntax (expanded for readability):
REQUEST METHOD "URL" [AutoRedirect?] [ReadResponseSource?]
[STANDARD / MULTIPART / BASICAUTH]
[CONTENT "postdata"]
[CONTENTTYPE "ctype"]
[STRINGCONTENT "name: value"]*
[FILECONTENT "name: path"]*
[BOUNDARY "abcd"]
[COOKIE "abc: def"]*
[HEADER "abc: def"]*
[-> STRING / -> FILE "path"]
Examples:
REQUEST GET "http://example.com/file.zip" -> FILE "file.zip"
REQUEST POST "http://example.com/poster" AutoRedirect=False
COOKIE "Hello: World"
HEADER "Hello: World"
CONTENT "{"id":1}"
CONTENTTYPE "application/json"
REQUEST POST "http://example.com/multi" MULTIPART
STRINGCONTENT "Hello: World"
STRINGCONTENT "Hi: Again"
FILECONTENT "Image: image.jpg"
BOUNDARY "abcd"
REQUEST GET "http://example.com/basic" BASICAUTH
</item>
<item name="Recaptcha">
This will spawn and execute a Recaptcha Block.
Syntax:
RECAPTCHA "URL" "SITEKEY" -> VAR "NAME"
Example:
RECAPTCHA "http://example.com" "ABCD" -> VAR "RECAP"
</item>
<item name="Captcha">
This will spawn and execute a Captcha Block.
Syntax:
CAPTCHA "URL" [Base64?] [SendScreenshot?] -> VAR "NAME"
Example:
CAPTCHA "http://example.com/image.png" -> VAR "CAP"
</item>
<item name="Parse">
This will spawn and execute a Parse Block.
Syntax:
PARSE "TARGET" LR "LEFT" "RIGHT" [Recursive?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"]
PARSE "TARGET" CSS "SELECTOR" "ATTRIBUTE" [INDEX / Recursive?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"]
PARSE "TARGET" JSON "FIELD" [Recursive?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"]
PARSE "TARGET" REGEX "REGEX" "OUTPUT" [Recursive?] -> VAR/CAP "NAME" ["PREFIX" "SUFFIX"]
Examples:
PARSE "&lt;SOURCE&gt;" LR "&lt;span&gt;" "&lt;/span&gt;" Recursive=True -> CAP "BALANCE" "$" ""
PARSE "&lt;SOURCE&gt;" CSS "[name=csrf]" "value" -> VAR "CSRF"
</item>
<item name="Bypass CF">
This will spawn and execute a BypassCF Block.
Syntax:
BYPASSCF "URL" ["UA"]
Example:
BYPASSCF "http://example.com"
</item>
<item name="Utility">
This will spawn and execute a Utility Block.
Syntax for list:
UTILITY LIST "List Name" ACTION [PARAMETERS] [-> VAR/CAP "NAME"]
Syntax for variable:
UTILITY VARIABLE "Variable Name" ACTION [PARAMETERS] [-> VAR/CAP "NAME"]
Syntax for conversion:
UTILITY CONVERSION FROM TO "input" [-> VAR/CAP "NAME"]
Syntax for file:
UTILITY FILE "File Name" ACTION [PARAMETERS] [-> VAR/CAP "NAME"]
Example:
UTILITY LIST "List1" JOIN "," -> VAR "JOINED"
UTILITY VARIABLE "Var1" SPLIT "," -> VAR "SPLITTED"
UTILITY CONVERSION BASE64 HEX "0xA35F" -> VAR "BASE64"
UTILITY FILE "test.txt" WRITE "Hello" -> VAR "TEXT"
</item>
<item name="TCP">
This will spawn and execute a TCP block
NOTE: This block is currently only available in LoliScript
Syntax:
TCP COMMAND [ARGUMENTS]
Allowed Commands:
CONNECT "HOST" "PORT" [UseSSL?] [-> VAR/CAP "NAME"]
SEND "MESSAGE" [-> VAR/CAP "NAME"]
DISCONNECT
Example:
TCP CONNECT "google.com" "443" UseSSL=True
TCP SEND "Hello" -> VAR "RESPONSE"
TCP DISCONNECT
</item>
<item name="Navigate">
This will spawn and execute a Navigate Block.
Syntax:
NAVIGATE "URL" [TIMEOUT]
Example:
NAVIGATE "http://example.com"
NAVIGATE "http://example.com" 60
</item>
<item name="Browser Action">
This will spawn and execute a BrowserAction Block.
Syntax:
BROWSERACTION ACTION ["INPUT"]
Examples:
BROWSERACTION OPEN
BROWSERACTION SENDKEYS "Hello"
</item>
<item name="Element Action">
This will spawn and execute an ElementAction block
Syntax:
ELEMENTACTION LOCATOR "LOCATOR" [INDEX / Recursive?] ACTION ["INPUT"] [-> VAR/CAP "NAME"]
Examples:
ELEMENTACTION ID "testid" CLICK
ELEMENTACTION SELECTOR "div input" SENDKEYS "abcd"
ELEMENTACTION CLASS "testclass" Recursive=True GETTEXT -> CAP "ITEMS"
</item>
<item name="Execute JS">
This will spawn and execute an ExecuteJS block
Syntax:
EXECUTEJS "SCRIPT"
Examples:
EXECUTEJS "alert('hi');"
</item>
</section>
<section name="Flow Control">
<item name="If Else">
The IF statement will check the condition after it. If it's successful, it will continue to the next instruction, otherwise it will jump to the first ELSE or ENDIF statement.
The ELSE statement will be executed if the IF wasn't successful, otherwise it will jump to the first ENDIF statement.
Syntax:
IF "STRING1" CONDITION "STRING2"
## OTHER COMMANDS
ENDIF
You can add an ELSE command too like this:
IF "STRING1" CONDITION "STRING2"
## COMMANDS TO BE EXECUTED ON TRUE CONDITION
ELSE
## COMMANDS TO BE EXECUTED ON FALSE CONDITION
ENDIF
</item>
<item name="While">
The WHILE statement will check the condition after it. If it's successful, it will continue to the next instruction, otherwise it will jump to the first ENDWHILE statement.
The ENDWHILE statement will always jump back to the first WHILE statement above it.
The WHILE - ENDWHILE pair allows to reproduce the FOR statement of common high level programming languages as well.
Syntax:
WHILE "STRING1" CONDITION "STRING2"
## OTHER COMMANDS
ENDWHILE
</item>
<item name="Jump">
The JUMP statement will jump to the first block with the specified label (within the script!).
Syntax:
JUMP #LABEL
</item>
<item name="Begin (End) Script">
The BEGIN SCRIPT statement will mark an area of the script where the commands will be executed using another scripting language.
The OUTPUTS literal can contain a comma-separated list of variable names that you want to extract from the script's scope and declare inside OB as strings or lists.
It is useful to mention that your normal variables will be automatically declared inside the script as strings / lists of strings / dictionaries (if their name is allowed by that language's standards).
Available languages:
JavaScript
IronPython
Syntax:
BEGIN SCRIPT LANGUAGE
[script here]
END SCRIPT -> VARS "OUTPUTS"
Example:
BEGIN SCRIPT JavaScript
var a = 1+2;
var b = 'hello';
END SCRIPT -> VARS "a,b"
</item>
</section>
</doc>
+155
View File
@@ -0,0 +1,155 @@
<SyntaxDefinition name="C#"
xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Gray" />
<Color name="Disabled" foreground="Tomato" />
<Color name="string" foreground="LightBlue" />
<Color name="Variable" foreground="Yellow" />
<!-- This is the main ruleset. -->
<RuleSet>
<Span color="Comment" begin="##" />
<Span color="Disabled" begin="!" />
<!-- <Span color="Comment" multiline="true" begin="/\*" end="\*/" /> -->
<Span color="string">
<Begin>"</Begin>
<End>"</End>
<RuleSet>
<Span begin="\\" end="." />
<Rule color="Variable">
&lt;[^&gt;|&quot;]*&gt;
</Rule>
</RuleSet>
</Span>
<Keywords fontWeight="bold" foreground="GreenYellow">
<Word>FUNCTION</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="DodgerBlue">
<Word>KEYCHECK</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Plum">
<Word>KEYCHAIN</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="SkyBlue">
<Word>KEY</Word>
<Word>VALUE</Word>
<Word>NKEY</Word>
<Word>MKEY</Word>
<Word>NMKEY</Word>
<Word>RKEY</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Turquoise">
<Word>RECAPTCHA</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="LimeGreen">
<Word>REQUEST</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Plum">
<Word>HEADER</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="SkyBlue">
<Word>COOKIE</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Gold">
<Word>PARSE</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Orange">
<Word>LR</Word>
<Word>CSS</Word>
<Word>JSON</Word>
<Word>REGEX</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="DarkOrange">
<Word>CAPTCHA</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="DarkSalmon">
<Word>BYPASSCF</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="MediumPurple">
<Word>TCP</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Wheat">
<Word>UTILITY</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="RoyalBlue">
<Word>NAVIGATE</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Green">
<Word>BROWSERACTION</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Firebrick">
<Word>ELEMENTACTION</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Indigo">
<Word>EXECUTEJS</Word>
</Keywords>
<Keywords fontWeight="bold" foreground="Plum">
<Word>ELEMENT</Word>
</Keywords>
<!-- Control flow -->
<Keywords fontWeight="bold" foreground="OrangeRed">
<Word>IF</Word>
<Word>ELSE</Word>
<Word>ENDIF</Word>
<Word>WHILE</Word>
<Word>ENDWHILE</Word>
<Word>JUMP</Word>
<Word>BEGIN</Word>
<Word>END</Word>
<Word>SCRIPT</Word>
</Keywords>
<!-- Other commands -->
<Keywords fontWeight="bold" foreground="Orange">
<Word>PRINT</Word>
<Word>SET</Word>
<Word>DELETE</Word>
<Word>MOUSEACTION</Word>
</Keywords>
<Keywords foreground="Yellow">
<Word>VAR</Word>
<Word>GVAR</Word>
</Keywords>
<Keywords foreground="Tomato">
<Word>CAP</Word>
</Keywords>
<Keywords foreground="Magenta">
<Word>-&gt;</Word>
</Keywords>
<!-- Digits -->
<Rule foreground="DarkSeaGreen">
\b0[xX][0-9a-fA-F]+ # hex number
| \b
( \d+(\.[0-9]+)? #number with optional floating point
| \.[0-9]+ #or just starting with floating point
)
([eE][+-]?[0-9]+)? # optional exponent
</Rule>
</RuleSet>
</SyntaxDefinition>
+33
View File
@@ -0,0 +1,33 @@
<Window x:Class="OpenBullet.LoadingWindow"
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:OpenBullet"
mc:Ignorable="d"
Title="LoadingWindow" Height="200" Width="300"
Background="{DynamicResource BackgroundMain}" WindowStyle="None" ResizeMode="NoResize">
<Window.Resources>
<Storyboard x:Key="WaitStoryboard">
<DoubleAnimation
Storyboard.TargetName="Wait"
Storyboard.TargetProperty="(TextBlock.RenderTransform).(RotateTransform.Angle)"
From="0"
To="360"
Duration="0:0:2"
RepeatBehavior="Forever" />
</Storyboard>
</Window.Resources>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel>
<TextBlock Grid.Row="0" Text="LOADING..." Foreground="Gainsboro" FontFamily="Consolas" FontSize="14" HorizontalAlignment="Center"/>
<TextBlock Grid.Row="0" Text="PLEASE WAIT" Foreground="Gainsboro" FontFamily="Consolas" FontSize="14" HorizontalAlignment="Center"/>
<TextBlock Grid.Row="1" HorizontalAlignment="Center" Margin="20" Name="Wait" FontFamily="Fonts/#FontAwesome" Foreground="Gainsboro" FontSize="50" Text="&#xf110;" RenderTransformOrigin="0.5, 0.5">
<TextBlock.RenderTransform>
<RotateTransform Angle="0" />
</TextBlock.RenderTransform>
</TextBlock>
</StackPanel>
</Grid>
</Window>
+17
View File
@@ -0,0 +1,17 @@
using System.Windows;
using System.Windows.Media.Animation;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per LoadingWindow.xaml
/// </summary>
public partial class LoadingWindow : Window
{
public LoadingWindow()
{
InitializeComponent();
((Storyboard)FindResource("WaitStoryboard")).Begin();
}
}
}
+147
View File
@@ -0,0 +1,147 @@
<Window x:Class="OpenBullet.LogWindow"
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:OpenBullet"
mc:Ignorable="d"
Background="#222"
Title="Log" Height="450" Width="800">
<Window.Resources>
<ContextMenu x:Key="ItemContextMenu">
<MenuItem x:Name="copy" Header="Copy" Click="copyClick"/>
</ContextMenu>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<ListView x:Name="logListView" Grid.Row="0" Foreground="Gainsboro" Background="Transparent" ItemsSource="{Binding Path=List, Mode=OneWay}" SelectionMode="Extended" BorderThickness="1">
<!-- Align Headers to the Left -->
<ListView.Resources>
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
<Setter Property="Width" Value="18" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource BorderLightColor}" Offset="0.0" />
<GradientStop Color="{DynamicResource BorderDarkColor}" Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Grid>
<Border BorderThickness="0,0,0,1" BorderBrush="Black" Background="Transparent">
<TextBlock x:Name="ContentHeader" Text="{TemplateBinding Content}" Padding="5,5,5,0" Width="{TemplateBinding Width}" TextAlignment="Left" />
</Border>
<Thumb x:Name="PART_HeaderGripper"
HorizontalAlignment="Right"
Margin="0,0,-9,0"
Style="{StaticResource GridViewColumnHeaderGripper}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Foreground" Value="Gainsboro" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="14" />
</Style>
<Style TargetType="{x:Type ListViewItem}">
<EventSetter Event="MouseRightButtonDown" Handler="ListViewItem_MouseRightButtonDown" />
<Setter Property="ContextMenu" Value="{StaticResource ItemContextMenu}"/>
<Setter Property="Foreground">
<Setter.Value>
<SolidColorBrush Color="{Binding LogColor}"/>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="0"
SnapsToDevicePixels="true">
<GridViewRowPresenter
HorizontalAlignment="Left"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Black" />
</Trigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<!-- Show Headers by overriding the default style -->
<ListView.Style>
<Style TargetType="{x:Type ListView}" />
</ListView.Style>
<ListView.View>
<GridView>
<GridViewColumn Header="Time" Width="140" DisplayMemberBinding="{Binding Path=LogTime}" />
<GridViewColumn Header="Level" Width="70" DisplayMemberBinding="{Binding Path=LogLevel}" />
<GridViewColumn Header="Component" Width="100" DisplayMemberBinding="{Binding Path=LogComponent}" />
<GridViewColumn Header="Message" Width="10000" DisplayMemberBinding="{Binding Path=LogString}" />
</GridView>
</ListView.View>
</ListView>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="5" Orientation="Horizontal">
<Button x:Name="copyAllButton" Content="Copy All" Click="copyAllButton_Click" />
<Button x:Name="clearButton" Content="Clear" Click="clearButton_Click"/>
<CheckBox Content="Only Show Errors" IsChecked="{Binding OnlyErrors}" VerticalAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
<TextBox Grid.Column="1" x:Name="searchBar" Text="{Binding SearchString}" Margin="5" />
<Button Grid.Column="2" x:Name="searchButton" Content="Search" Click="searchButton_Click" Margin="5"/>
</Grid>
</Grid>
</Window>
+64
View File
@@ -0,0 +1,64 @@
using RuriLib;
using System;
using System.Windows;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per Log.xaml
/// </summary>
public partial class LogWindow : Window
{
public LogWindow()
{
InitializeComponent();
DataContext = Globals.log;
Closing += LogWindowClosing;
}
private void LogWindowClosing(object sender, System.ComponentModel.CancelEventArgs e)
{
Globals.logWindow = null;
}
private void copyClick(object sender, RoutedEventArgs e)
{
var clipboardText = "";
foreach (LogEntry selected in logListView.SelectedItems)
{
clipboardText += $"[{selected.LogTime}] ({selected.LogLevel}) {selected.LogComponent} - "+ selected.LogString + Environment.NewLine;
}
Clipboard.SetText(clipboardText);
}
private void copyAllButton_Click(object sender, RoutedEventArgs e)
{
var clipboardText = "";
foreach (LogEntry selected in logListView.Items)
{
clipboardText += $"[{selected.LogTime}] ({selected.LogLevel}) {selected.LogComponent} - " + selected.LogString + Environment.NewLine;
}
Clipboard.SetText(clipboardText);
}
private void ListViewItem_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
}
private void clearButton_Click(object sender, RoutedEventArgs e)
{
try
{
Globals.log.List.Clear();
}
catch { }
}
private void searchButton_Click(object sender, RoutedEventArgs e)
{
Globals.log.Refresh();
}
}
}
+14
View File
@@ -0,0 +1,14 @@
<Window x:Class="OpenBullet.MainDialog"
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:OpenBullet"
mc:Ignorable="d"
Title="MainDialog" Height="300" Width="300"
Background="{DynamicResource BackgroundMain}"
SizeToContent="WidthAndHeight" ResizeMode="NoResize">
<Grid>
</Grid>
</Window>
+19
View File
@@ -0,0 +1,19 @@
using System.Windows;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per MainDialog.xaml
/// </summary>
public partial class MainDialog : Window
{
public MainDialog(Page content, string title)
{
InitializeComponent();
Content = content;
Title = title;
}
}
}
+109
View File
@@ -0,0 +1,109 @@
<Window x:Class="OpenBullet.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:OpenBullet"
mc:Ignorable="d"
Title="" Width="800" Height="620"
MinWidth="800" MinHeight="600"
Background="{DynamicResource BackgroundMain}"
WindowStyle="None" ResizeMode="NoResize" AllowsTransparency="False" Margin="0 -5 0 0">
<!-- Background="{DynamicResource BackgroundMain}" -->
<!--
<Window.Background>
<ImageBrush ImageSource="/Images/Themes/italydark.jpg"/>
</Window.Background>
-->
<Grid x:Name="Root" Margin="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
<RowDefinition Height="10" />
</Grid.RowDefinitions>
<!-- Title Bar -->
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Background="{DynamicResource BackgroundSecondary}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<Image Height="30" Width="30" Source="pack://application:,,,/Images/BBIcon.png"/>
<Label x:Name="titleLabel" Content="Open Bullet" FontFamily="pack://application:,,,/Fonts/#Century Gothic" FontSize="14" />
</StackPanel>
<Grid x:Name="dragPanel" Grid.Column="1" MouseDown="dragPanel_MouseDown" Background="{DynamicResource BackgroundSecondary}"/>
<StackPanel Grid.Column="2" Orientation="Horizontal">
<!-- <Image x:Name="themeImage" Margin="0 0 4 0" Height="20" Source="/Images/Themes/charles2.png" /> -->
<!--<Image x:Name="themeImage2" Height="30" Source="/Images/Themes/ci.png" />-->
<StackPanel x:Name="minimizePanel" MouseEnter="minimizePanel_MouseEnter" MouseLeave="minimizePanel_MouseLeave" MouseDown="minimizePanel_MouseDown">
<Image x:Name="minimizeImage" Margin="7" Height="15" Width="15" Source="/Images/Icons/minimize.png" ToolTip="Minimize" />
</StackPanel>
<StackPanel x:Name="maximizePanel" MouseEnter="maximizePanel_MouseEnter" MouseLeave="maximizePanel_MouseLeave" MouseDown="maximizePanel_MouseDown">
<Image x:Name="maximizeImage" Margin="7" Height="15" Width="15" Source="/Images/Icons/maximize.png" ToolTip="Maximize"/>
</StackPanel>
<StackPanel x:Name="quitPanel" MouseEnter="quitPanel_MouseEnter" MouseLeave="quitPanel_MouseLeave" MouseDown="quitPanel_MouseDown">
<Image x:Name="quitImage" Margin="7" Height="15" Width="15" Source="/Images/Icons/quit.png" ToolTip="Quit"/>
</StackPanel>
</StackPanel>
</Grid>
<!-- Top Menu StackPanel -->
<Grid Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel x:Name="topMenu" Grid.Column="0" Orientation="Horizontal">
<StackPanel.Resources>
<Style TargetType="Label">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="0 0 5 0" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="14" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</StackPanel.Resources>
<Label x:Name="menuOptionRunner" Content="Runner" MouseDown="menuOptionRunner_MouseDown" />
<Label x:Name="menuOptionProxyManager" Content="Proxies" MouseDown="menuOptionProxyManager_MouseDown" />
<Label x:Name="menuOptionWordlistManager" Content="Wordlists" MouseDown="menuOptionWordlistManager_MouseDown" />
<Label x:Name="menuOptionConfigCreator" Content="Configs" MouseDown="menuOptionConfigCreator_MouseDown" />
<Label x:Name="menuOptionHitsDatabase" Content="Hits DB" MouseDown="menuOptionHitsDatabase_MouseDown" />
<Label x:Name="menuOptionTools" Content="Tools" MouseDown="menuOptionTools_MouseDown" />
<Label x:Name="menuOptionSettings" Content="Settings" MouseDown="menuOptionSettings_MouseDown" />
<Label x:Name="menuOptionAbout" Content="About" MouseDown="menuOptionAbout_MouseDown" />
</StackPanel>
<Image Grid.Column="1" x:Name="logImage" Height="20" Width="20" Source="/Images/Icons/log.png" ToolTip="Open the Log" MouseDown="logImage_MouseDown"/>
<Image Grid.Column="2" x:Name="screenshotImage" Height="20" Width="20" Margin="4 0 0 0" Source="/Images/Icons/camera.png" ToolTip="Take a Screenshot" MouseDown="screenshotImage_MouseDown"/>
</Grid>
<Frame Grid.Column="1" Grid.Row="2" x:Name="Main" NavigationUIVisibility="Hidden" >
<!-- <Frame.Background>
<ImageBrush ImageSource="/Images/Hall/hall8trans2.png" AlignmentX="Center" AlignmentY="Center"/>
</Frame.Background> -->
</Frame>
<Image Grid.Row="3" Grid.Column="2" x:Name="gripImage" Source="/Images/Icons/grip.png" Height="10" Width="10" Margin="-5 -5 0 0" PreviewMouseLeftButtonDown="gripImage_PreviewMouseLeftButtonDown" PreviewMouseMove="gripImage_PreviewMouseMove" PreviewMouseLeftButtonUp="gripImage_PreviewMouseLeftButtonUp" Cursor="SizeNWSE"/>
</Grid>
</Window>
+514
View File
@@ -0,0 +1,514 @@
using OpenBullet.ViewModels;
using RuriLib;
using RuriLib.ViewModels;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private Random rand = new Random();
private int snowBuffer = 0;
public RunnerManager RunnerManagerPage { get; set; }
public Runner CurrentRunnerPage { get; set; }
public ProxyManager ProxyManagerPage { get; set; }
public WordlistManager WordlistManagerPage { get; set; }
public Configs ConfigsPage { get; set; }
public HitsDB HitsDBPage { get; set; }
public Settings OBSettingsPage { get; set; }
public Tools ToolsPage { get; set; }
public About AboutPage { get; set; }
public System.Drawing.Rectangle Bounds { get; private set; }
private string title = $"OpenBullet {Globals.obVersion}";
private bool maximized = false;
System.Windows.Point _startPosition;
bool _isResizing = false;
private BackgroundWorker ruriGuard = new BackgroundWorker();
private BackgroundWorker ruriKiller = new BackgroundWorker();
private BackgroundWorker ruriScout = new BackgroundWorker();
public MainWindow()
{
// Clean or create log file
File.WriteAllText(Globals.logFile, "");
InitializeComponent();
Title = title;
titleLabel.Content = title;
// Set global reference to this window
Globals.mainWindow = this;
// Make sure all folders are there or recreate them
var folders = new string[] { "Captchas", "ChromeExtensions", "Configs", "DB", "Screenshots", "Settings", "Sounds", "Wordlists" };
foreach(var folder in folders.Select(f => System.IO.Path.Combine(Directory.GetCurrentDirectory(), f)))
{
if (!Directory.Exists(folder))
Directory.CreateDirectory(folder);
}
// Initialize Environment Settings
try
{
Globals.environment = IOManager.ParseEnvironmentSettings(Globals.envFile);
}
catch
{
MessageBox.Show("Could not find / parse the Environment Settings file. Please fix the issue and try again.");
Environment.Exit(0);
}
if (Globals.environment.WordlistTypes.Count == 0 || Globals.environment.CustomKeychains.Count == 0)
{
MessageBox.Show("At least one WordlistType and one CustomKeychain must be defined in the Environment Settings file.");
Environment.Exit(0);
}
// Initialize Settings
Globals.rlSettings = new RLSettingsViewModel();
Globals.obSettings = new OBSettingsViewModel();
// Create / Load Settings
if (!File.Exists(Globals.rlSettingsFile)) {
MessageBox.Show("RuriLib Settings file not found, generating a default one");
Globals.LogWarning(Components.Main, "RuriLib Settings file not found, generating a default one");
IOManager.SaveSettings(Globals.rlSettingsFile, Globals.rlSettings);
Globals.LogInfo(Components.Main, $"Created the default RuriLib Settings file {Globals.rlSettingsFile}");
}
else {
Globals.rlSettings = IOManager.LoadSettings(Globals.rlSettingsFile);
Globals.LogInfo(Components.Main, "Loaded the existing RuriLib Settings file");
}
if (!File.Exists(Globals.obSettingsFile))
{
MessageBox.Show("OpenBullet Settings file not found, generating a default one");
Globals.LogWarning(Components.Main, "OpenBullet Settings file not found, generating a default one");
OBIOManager.SaveSettings(Globals.obSettingsFile, Globals.obSettings);
Globals.LogInfo(Components.Main, $"Created the default OpenBullet Settings file {Globals.obSettingsFile}");
}
else
{
Globals.obSettings = OBIOManager.LoadSettings(Globals.obSettingsFile);
Globals.LogInfo(Components.Main, "Loaded the existing OpenBullet Settings file");
}
Topmost = Globals.obSettings.General.AlwaysOnTop;
RunnerManagerPage = new RunnerManager(Globals.obSettings.General.AutoCreateRunner);
if (Globals.obSettings.General.AutoCreateRunner)
CurrentRunnerPage = RunnerManagerPage.vm.Runners.FirstOrDefault().Page;
Globals.LogInfo(Components.Main, "Initialized RunnerManager");
ProxyManagerPage = new ProxyManager();
Globals.LogInfo(Components.Main, "Initialized ProxyManager");
WordlistManagerPage = new WordlistManager();
Globals.LogInfo(Components.Main, "Initialized WordlistManager");
ConfigsPage = new Configs();
Globals.LogInfo(Components.Main, "Initialized ConfigManager");
HitsDBPage = new HitsDB();
Globals.LogInfo(Components.Main, "Initialized HitsDB");
OBSettingsPage = new Settings();
Globals.LogInfo(Components.Main, "Initialized Settings");
ToolsPage = new Tools();
Globals.LogInfo(Components.Main, "Initialized Tools");
AboutPage = new About();
menuOptionRunner_MouseDown(this, null);
// Re-enable this before release
// (new SplashWindow()).ShowDialog();
if (Globals.obSettings.Themes.EnableSnow)
Loaded += MainWindow_Loaded;
}
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
var t = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(10000 / Globals.obSettings.Themes.SnowAmount) };
t.Tick += (s, ea) => Snow();
t.Start();
}
private void Snow()
{
if (snowBuffer >= 100) {
int i = 0;
while(i < Root.Children.Count)
{
// Remove first snowflake you find (oldest) before putting another one so there are max 100 snowflakes on screen
if (Root.Children[i].GetType() == typeof(Snowflake)) { Root.Children.RemoveAt(i); break; }
i++;
}
}
var x = rand.Next(-500, (int)Root.ActualWidth - 100);
var y = -100;
var s = rand.Next(5, 15);
var flake = new Snowflake
{
Width = s,
Height = s,
RenderTransform = new TranslateTransform
{
X = x,
Y = y
},
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
IsHitTestVisible = false
};
Grid.SetColumn(flake, 1);
Grid.SetRow(flake, 2);
Root.Children.Add(flake);
var d = TimeSpan.FromSeconds(rand.Next(1, 4));
x += rand.Next(100, 500);
var ax = new DoubleAnimation { To = x, Duration = d };
flake.RenderTransform.BeginAnimation(TranslateTransform.XProperty, ax);
y = (int)Root.ActualHeight + 200;
var ay = new DoubleAnimation { To = y, Duration = d };
flake.RenderTransform.BeginAnimation(TranslateTransform.YProperty, ay);
snowBuffer++;
}
public void ShowRunnerManager()
{
CurrentRunnerPage = null;
Main.Content = RunnerManagerPage;
}
public void ShowRunner(Runner page)
{
CurrentRunnerPage = page;
Main.Content = page;
}
#region Menu Options MouseDown Events
public void menuOptionRunner_MouseDown(object sender, MouseButtonEventArgs e)
{
if (CurrentRunnerPage == null) Main.Content = RunnerManagerPage;
else Main.Content = CurrentRunnerPage;
menuOptionSelected(menuOptionRunner);
}
private void menuOptionProxyManager_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = ProxyManagerPage;
menuOptionSelected(menuOptionProxyManager);
}
private void menuOptionWordlistManager_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = WordlistManagerPage;
menuOptionSelected(menuOptionWordlistManager);
}
private void menuOptionConfigCreator_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = ConfigsPage;
menuOptionSelected(menuOptionConfigCreator);
}
private void menuOptionHitsDatabase_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = HitsDBPage;
menuOptionSelected(menuOptionHitsDatabase);
}
private void menuOptionTools_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = ToolsPage;
menuOptionSelected(menuOptionTools);
}
private void menuOptionSettings_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = OBSettingsPage;
menuOptionSelected(menuOptionSettings);
}
private void menuOptionAbout_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = AboutPage;
menuOptionSelected(menuOptionAbout);
}
private void menuOptionSelected(object sender)
{
foreach (var child in topMenu.Children)
{
try
{
var c = (Label)child;
c.Foreground = Globals.GetBrush("ForegroundMain");
}
catch { }
}
((Label)sender).Foreground = Globals.GetBrush("ForegroundMenuSelected");
}
#endregion
private void quitPanel_MouseEnter(object sender, MouseEventArgs e)
{
quitPanel.Background = new SolidColorBrush(Colors.DarkRed);
}
private void quitPanel_MouseLeave(object sender, MouseEventArgs e)
{
quitPanel.Background = new SolidColorBrush(Colors.Transparent);
}
private void quitPanel_MouseDown(object sender, MouseButtonEventArgs e)
{
if (CheckOnQuit()) Environment.Exit(0);
}
private bool CheckOnQuit()
{
var active = RunnerManagerPage.vm.Runners.Count(r => r.Runner.Busy);
if (!Globals.obSettings.General.DisableQuitWarning || active > 0)
{
Globals.LogWarning(Components.Main, "Prompting quit confirmation");
if (active == 0)
{
if (MessageBox.Show($"Are you sure you want to quit?",
"Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
return false;
}
else
{
if (MessageBox.Show($"There are {active} active runners. Are you sure you want to quit?",
"Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
return false;
}
}
if (Globals.mainWindow.ConfigsPage.StackerPage != null)
Globals.mainWindow.ConfigsPage.StackerPage.SetScript();
if (!Globals.obSettings.General.DisableNotSavedWarning && !Globals.mainWindow.ConfigsPage.ConfigManagerPage.CheckSaved())
{
Globals.LogWarning(Components.Main, "Config not saved, prompting quit confirmation");
if (MessageBox.Show("The Config in Stacker wasn't saved.\nAre you sure you want to quit?",
"Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
return false;
}
Globals.LogInfo(Components.Main, "Quit sequence initiated");
return true;
}
private void maximizePanel_MouseEnter(object sender, MouseEventArgs e)
{
maximizePanel.Background = new SolidColorBrush(Colors.DimGray);
}
private void maximizePanel_MouseLeave(object sender, MouseEventArgs e)
{
maximizePanel.Background = new SolidColorBrush(Colors.Transparent);
}
private void maximizePanel_MouseDown(object sender, MouseButtonEventArgs e)
{
if(maximized)
{
this.Width = 800;
this.Height = 620;
Left = 0;
Top = 0;
maximized = false;
WindowState = WindowState.Normal;
}
else
{
this.Width = SystemParameters.WorkArea.Width;
this.Height = SystemParameters.WorkArea.Height;
Left = 0;
Top = 0;
maximized = true;
WindowState = WindowState.Normal;
}
}
private void minimizePanel_MouseEnter(object sender, MouseEventArgs e)
{
minimizePanel.Background = new SolidColorBrush(Colors.DimGray);
}
private void minimizePanel_MouseLeave(object sender, MouseEventArgs e)
{
minimizePanel.Background = new SolidColorBrush(Colors.Transparent);
}
private void minimizePanel_MouseDown(object sender, MouseButtonEventArgs e)
{
try { WindowState = WindowState.Minimized; } catch { }
}
private void dragPanel_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
this.DragMove();
}
private void gripImage_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (Mouse.Capture(gripImage))
{
_isResizing = true;
_startPosition = Mouse.GetPosition(this);
}
}
private void gripImage_PreviewMouseMove(object sender, MouseEventArgs e)
{
if (_isResizing)
{
System.Windows.Point currentPosition = Mouse.GetPosition(this);
double diffX = currentPosition.X - _startPosition.X;
double diffY = currentPosition.Y - _startPosition.Y;
Width = Width + diffX;
Height = Height + diffY;
_startPosition = currentPosition;
}
}
private void gripImage_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (_isResizing == true)
{
_isResizing = false;
Mouse.Capture(null);
}
}
private void screenshotImage_MouseDown(object sender, MouseButtonEventArgs e)
{
var bitmap = CopyScreen((int)Width, (int)Height, (int)Top, (int)Left);
Clipboard.SetImage(bitmap);
GetBitmap(bitmap).Save("screenshot.jpg", ImageFormat.Jpeg);
Globals.LogInfo(Components.Main, "Acquired screenshot");
}
private static BitmapSource CopyScreen(int width, int height, int top, int left)
{
using (var screenBmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb))
{
using (var bmpGraphics = Graphics.FromImage(screenBmp))
{
bmpGraphics.CopyFromScreen(left, top, 0, 0, screenBmp.Size);
return Imaging.CreateBitmapSourceFromHBitmap(
screenBmp.GetHbitmap(),
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
}
}
}
private static Bitmap GetBitmap(BitmapSource source)
{
Bitmap bmp = new Bitmap(
source.PixelWidth,
source.PixelHeight,
System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
BitmapData data = bmp.LockBits(
new System.Drawing.Rectangle(System.Drawing.Point.Empty, bmp.Size),
ImageLockMode.WriteOnly,
System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
source.CopyPixels(
Int32Rect.Empty,
data.Scan0,
data.Height * data.Stride,
data.Stride);
bmp.UnlockBits(data);
return bmp;
}
private void logImage_MouseDown(object sender, MouseButtonEventArgs e)
{
if(Globals.logWindow == null)
{
Globals.logWindow = new LogWindow();
Globals.logWindow.Show();
}
else
{
Globals.logWindow.Show();
}
}
public void SetStyle()
{
try
{
var brush = Globals.GetBrush("BackgroundMain");
if (!Globals.obSettings.Themes.UseImage)
{
Background = brush;
Main.Background = brush;
}
else
{
// BACKGROUND
if (File.Exists(Globals.obSettings.Themes.BackgroundImage))
{
var bbrush = new ImageBrush(new BitmapImage(new Uri(Globals.obSettings.Themes.BackgroundImage)));
bbrush.Opacity = (double)((double)Globals.obSettings.Themes.BackgroundImageOpacity / (double)100);
Background = bbrush;
}
else
{
Background = brush;
}
// LOGO
if (File.Exists(Globals.obSettings.Themes.BackgroundLogo))
{
var lbrush = new ImageBrush(new BitmapImage(new Uri(Globals.obSettings.Themes.BackgroundLogo)));
lbrush.AlignmentX = AlignmentX.Center;
lbrush.AlignmentY = AlignmentY.Center;
lbrush.Stretch = Stretch.None;
lbrush.Opacity = (double)((double)Globals.obSettings.Themes.BackgroundImageOpacity / (double)100);
Main.Background = lbrush;
}
else
{
Main.Background = new ImageBrush(new BitmapImage(new Uri(@"pack://application:,,,/"
+ Assembly.GetExecutingAssembly().GetName().Name
+ ";component/"
+ "Images/Themes/empty.png", UriKind.Absolute)));
}
}
}
catch { }
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using Newtonsoft.Json;
using OpenBullet.ViewModels;
using System.IO;
namespace OpenBullet
{
public class OBIOManager
{
private static JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All };
public static void SaveSettings(string settingsFile, OBSettingsViewModel settings)
{
File.WriteAllText(settingsFile, JsonConvert.SerializeObject(settings, Formatting.Indented));
}
public static OBSettingsViewModel LoadSettings(string settingsFile)
{
return JsonConvert.DeserializeObject<OBSettingsViewModel>(File.ReadAllText(settingsFile));
}
}
}
+48
View File
@@ -0,0 +1,48 @@
using RuriLib;
using RuriLib.ViewModels;
using System.Collections.ObjectModel;
using System.Windows.Data;
namespace OpenBullet
{
public class OBLog : ViewModelBase
{
public ObservableCollection<LogEntry> List { get; set; }
private bool onlyErrors = false;
public bool OnlyErrors { get { return onlyErrors; } set { onlyErrors = value; OnPropertyChanged("OnlyErrors"); Refresh(); } }
private string searchString = "";
public string SearchString { get { return searchString; } set { searchString = value; OnPropertyChanged("SearchString"); } }
public OBLog()
{
List = new ObservableCollection<LogEntry>();
CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(List);
view.Filter = ErrorFilter;
}
public void Refresh()
{
try
{
CollectionViewSource.GetDefaultView(List).Refresh();
}
catch { }
}
private bool ErrorFilter(object item)
{
if (SearchString != "") // If search box not empty, filter out all the stuff that's not needed
{
if (!(item as LogEntry).LogString.ToLower().Contains(SearchString.ToLower()))
return false;
}
if (!Globals.log.OnlyErrors)
return true;
else
return ((item as LogEntry).LogLevel == LogLevel.Error);
}
}
}
+841
View File
@@ -0,0 +1,841 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{99E40E7F-00A4-4FB1-9441-B05A56C47C08}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>OpenBullet</RootNamespace>
<AssemblyName>OpenBullet</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowedReferenceRelatedFileExtensions>
<!-- Prevent default XML and PDB files copied to output in RELEASE.
Only *.allowedextension files will be included, which doesn't exist in my case.
-->
.allowedextension
</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>BBlogoIcon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="AngleSharp, Version=0.9.9.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.0.9.9.2\lib\net45\AngleSharp.dll</HintPath>
</Reference>
<Reference Include="Extreme.Net, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Extreme-original\Extreme.Net\bin\Debug\Extreme.Net.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
<HintPath>..\packages\AvalonEdit.5.0.4\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
</Reference>
<Reference Include="IronPython, Version=2.7.9.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\IronPython.2.7.9\lib\net45\IronPython.dll</HintPath>
</Reference>
<Reference Include="IronPython.Modules, Version=2.7.9.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\IronPython.2.7.9\lib\net45\IronPython.Modules.dll</HintPath>
</Reference>
<Reference Include="IronPython.SQLite, Version=2.7.9.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\IronPython.2.7.9\lib\net45\IronPython.SQLite.dll</HintPath>
</Reference>
<Reference Include="IronPython.Wpf, Version=2.7.9.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\IronPython.2.7.9\lib\net45\IronPython.Wpf.dll</HintPath>
</Reference>
<Reference Include="Jint, Version=0.0.0.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f, processorArchitecture=MSIL">
<HintPath>..\packages\Jint.2.11.58\lib\net451\Jint.dll</HintPath>
</Reference>
<Reference Include="LiteDB, Version=4.1.4.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL">
<HintPath>..\packages\LiteDB.4.1.4\lib\net40\LiteDB.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dynamic, Version=1.2.2.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\DynamicLanguageRuntime.1.2.2\lib\net45\Microsoft.Dynamic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting, Version=1.2.2.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\DynamicLanguageRuntime.1.2.2\lib\net45\Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting.Metadata, Version=1.2.2.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
<HintPath>..\packages\DynamicLanguageRuntime.1.2.2\lib\net45\Microsoft.Scripting.Metadata.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero2" />
<Reference Include="ProxySocket, Version=1.1.2.0, Culture=neutral, PublicKeyToken=966874d7118d1436, processorArchitecture=MSIL">
<HintPath>..\packages\ProxySocket.1.1.2\lib\net40\ProxySocket.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
</Reference>
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Controls.Input.Toolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Infragistics.Themes.MetroDark.Wpf.1.0.0\lib\net40\System.Windows.Controls.Input.Toolkit.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Controls.Layout.Toolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Infragistics.Themes.MetroDark.Wpf.1.0.0\lib\net40\System.Windows.Controls.Layout.Toolkit.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WebDriver, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll</HintPath>
</Reference>
<Reference Include="WebDriver.Support, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Selenium.Support.3.141.0\lib\net45\WebDriver.Support.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsFormsIntegration" />
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Infragistics.Themes.MetroDark.Wpf.1.0.0\lib\net40\WPFToolkit.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.3.5.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.3.5.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.3.5.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.3.5.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
</Reference>
<Reference Include="Xceed.Wpf.Toolkit, Version=3.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.3.5.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Converters\BooleanBrushConverter.cs" />
<Compile Include="Converters\EnumBooleanConverter.cs" />
<Compile Include="Converters\KeychainBrushConverter.cs" />
<Compile Include="OBIOManager.cs" />
<Compile Include="OBLog.cs" />
<Compile Include="LogWindow.xaml.cs">
<DependentUpon>LogWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogLSDoc.xaml.cs">
<DependentUpon>DialogLSDoc.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogSelectBots.xaml.cs">
<DependentUpon>DialogSelectBots.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogSetProxies.xaml.cs">
<DependentUpon>DialogSetProxies.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsRequests.xaml.cs">
<DependentUpon>ConfigOtherOptionsRequests.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsSelenium.xaml.cs">
<DependentUpon>ConfigOtherOptionsSelenium.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogShowLog.xaml.cs">
<DependentUpon>DialogShowLog.xaml</DependentUpon>
</Compile>
<Compile Include="LoadingWindow.xaml.cs">
<DependentUpon>LoadingWindow.xaml</DependentUpon>
</Compile>
<None Include="LSHighlighting.xshd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
<Compile Include="Pages\Dialogs\DialogSelectWordlist.xaml.cs">
<DependentUpon>DialogSelectWordlist.xaml</DependentUpon>
</Compile>
<Compile Include="HugeFileSort.cs" />
<Compile Include="Pages\Dialogs\DialogAddBlock.xaml.cs">
<DependentUpon>DialogAddBlock.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogCustomInput.xaml.cs">
<DependentUpon>DialogCustomInput.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogSelectConfig.xaml.cs">
<DependentUpon>DialogSelectConfig.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\ConfigOtherOptions.xaml.cs">
<DependentUpon>ConfigOtherOptions.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsData.xaml.cs">
<DependentUpon>ConfigOtherOptionsData.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsGeneral.xaml.cs">
<DependentUpon>ConfigOtherOptionsGeneral.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsInputs.xaml.cs">
<DependentUpon>ConfigOtherOptionsInputs.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsProxies.xaml.cs">
<DependentUpon>ConfigOtherOptionsProxies.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogNewConfig.xaml.cs">
<DependentUpon>DialogNewConfig.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs.xaml.cs">
<DependentUpon>Configs.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Configs\ConfigManager.xaml.cs">
<DependentUpon>ConfigManager.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\HitsDB.xaml.cs">
<DependentUpon>HitsDB.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\RunnerManager.xaml.cs">
<DependentUpon>RunnerManager.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\OBSettingsPage.xaml.cs">
<DependentUpon>OBSettingsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\OB\OBSettingsGeneral.xaml.cs">
<DependentUpon>OBSettingsGeneral.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\OB\OBSettingsThemes.xaml.cs">
<DependentUpon>OBSettingsThemes.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\OB\OBSettingsSounds.xaml.cs">
<DependentUpon>OBSettingsSounds.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\RLSettingsPage.xaml.cs">
<DependentUpon>RLSettingsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\RL\RLSettingsSelenium.xaml.cs">
<DependentUpon>RLSettingsSelenium.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\RL\RLSettingsCaptchas.xaml.cs">
<DependentUpon>RLSettingsCaptchas.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\RL\RLSettingsProxies.xaml.cs">
<DependentUpon>RLSettingsProxies.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings\RL\RLSettingsGeneral.xaml.cs">
<DependentUpon>RLSettingsGeneral.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Settings.xaml.cs">
<DependentUpon>Settings.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogAddWordlist.xaml.cs">
<DependentUpon>DialogAddWordlist.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Dialogs\DialogAddProxies.xaml.cs">
<DependentUpon>DialogAddProxies.xaml</DependentUpon>
</Compile>
<Compile Include="Globals.cs" />
<Compile Include="MainDialog.xaml.cs">
<DependentUpon>MainDialog.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\ProxyManager.xaml.cs">
<DependentUpon>ProxyManager.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockBypassCF.xaml.cs">
<DependentUpon>PageBlockBypassCF.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockCaptcha.xaml.cs">
<DependentUpon>PageBlockCaptcha.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockFunction.xaml.cs">
<DependentUpon>PageBlockFunction.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockKeycheck.xaml.cs">
<DependentUpon>PageBlockKeycheck.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockLSCode.xaml.cs">
<DependentUpon>PageBlockLSCode.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockParse.xaml.cs">
<DependentUpon>PageBlockParse.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockRecaptcha.xaml.cs">
<DependentUpon>PageBlockRecaptcha.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockRequest.xaml.cs">
<DependentUpon>PageBlockRequest.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockTCP.xaml.cs">
<DependentUpon>PageBlockTCP.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageBlockUtility.xaml.cs">
<DependentUpon>PageBlockUtility.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageSBlockBrowserAction.xaml.cs">
<DependentUpon>PageSBlockBrowserAction.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageSBlockElementAction.xaml.cs">
<DependentUpon>PageSBlockElementAction.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageSBlockExecuteJS.xaml.cs">
<DependentUpon>PageSBlockExecuteJS.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\StackerBlocks\PageSBlockNavigate.xaml.cs">
<DependentUpon>PageSBlockNavigate.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\Resources1.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ProxiesGraphs.xaml.cs">
<DependentUpon>ProxiesGraphs.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Tools.xaml.cs">
<DependentUpon>Tools.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Tools\ToolsListGenerator.xaml.cs">
<DependentUpon>ToolsListGenerator.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Main\Tools\ToolsSeleniumTools.xaml.cs">
<DependentUpon>ToolsSeleniumTools.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModels\OBSettingsViewModel.cs" />
<Compile Include="Snowflake.xaml.cs">
<DependentUpon>Snowflake.xaml</DependentUpon>
</Compile>
<Compile Include="SortAdorner.cs" />
<Compile Include="Pages\Main\Stacker.xaml.cs">
<DependentUpon>Stacker.xaml</DependentUpon>
</Compile>
<Compile Include="SplashWindow.xaml.cs">
<DependentUpon>SplashWindow.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModels\BlockKeycheckViewModel.cs" />
<Compile Include="ViewModels\ConfigManagerViewModel.cs" />
<Compile Include="ViewModels\ConfigOtherOptionsInputViewModel.cs" />
<Compile Include="ViewModels\HitsDBViewModel.cs" />
<Compile Include="ViewModels\ListGeneratorViewModel.cs" />
<Compile Include="ViewModels\OBSettings\OBSettingsGeneral.cs" />
<Compile Include="ViewModels\OBSettings\OBSettingsSounds.cs" />
<Compile Include="ViewModels\OBSettings\OBSettingsThemes.cs" />
<Compile Include="ViewModels\ProxyManagerViewModel.cs" />
<Compile Include="ViewModels\RunnerManagerViewModel.cs" />
<Compile Include="ViewModels\KeychainViewModel.cs" />
<Compile Include="ViewModels\KeyViewModel.cs" />
<Compile Include="ViewModels\StackerBlockViewModel.cs" />
<Compile Include="ViewModels\StackerViewModel.cs" />
<Compile Include="ViewModels\WordlistManagerViewModel.cs" />
<Compile Include="Pages\Main\WordlistManager.xaml.cs">
<DependentUpon>WordlistManager.xaml</DependentUpon>
</Compile>
<None Include="Resources\LSHighlighting.xshd" />
<Page Include="LogWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogLSDoc.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogSelectBots.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogSetProxies.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsRequests.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsSelenium.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogShowLog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="LoadingWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogSelectWordlist.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogAddBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogCustomInput.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogSelectConfig.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\ConfigOtherOptions.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsData.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsGeneral.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsInputs.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\OtherOptions\ConfigOtherOptionsProxies.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogNewConfig.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\About.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Configs\ConfigManager.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\HitsDB.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\RunnerManager.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\OBSettingsPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\OB\OBSettingsGeneral.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\OB\OBSettingsThemes.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\OB\OBSettingsSounds.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\RLSettingsPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\RL\RLSettingsSelenium.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\RL\RLSettingsCaptchas.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\RL\RLSettingsProxies.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings\RL\RLSettingsGeneral.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Settings.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogAddWordlist.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dialogs\DialogAddProxies.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Runner\Runner.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Pages\Main\Runner\Runner.xaml.cs">
<DependentUpon>Runner.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Pages\Main\ProxyManager.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockBypassCF.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockCaptcha.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockFunction.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockKeycheck.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockLSCode.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockParse.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockRecaptcha.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockRequest.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockTCP.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageBlockUtility.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageSBlockBrowserAction.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageSBlockElementAction.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageSBlockExecuteJS.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\StackerBlocks\PageSBlockNavigate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ProxiesGraphs.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Stacker.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Snowflake.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SplashWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\MetroDark\MetroDark.MSControls.Core.Implicit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\MetroDark\MetroDark.MSControls.Toolkit.Implicit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\MetroDark\Styles.Shared.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\MetroDark\Styles.WPF.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Themes\MetroDark\Theme.Colors.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Pages\Main\WordlistManager.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Tools.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Tools\ToolsListGenerator.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Tools\ToolsSeleniumTools.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources1.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Resource Include="Fonts\CenturyGothicBold.ttf" />
<Resource Include="Fonts\CenturyGothicRegular.ttf" />
<Resource Include="Fonts\fontawesome-webfont.ttf" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="Themes\MetroDark\HowToApplyTheme.txt" />
</ItemGroup>
<ItemGroup>
<Resource Include="BBlogoIcon.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\folder.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\plus.png" />
<Resource Include="Images\Icons\minus.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\down.png" />
<Resource Include="Images\Icons\up.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\disable.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\clone.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\left.png" />
<Resource Include="Images\Icons\right.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\BBIcon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\BBLogowhiteBullets.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\maximize.png" />
<Resource Include="Images\Icons\minimize.png" />
<Resource Include="Images\Icons\quit.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\save.png" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 e x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\star.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\grip.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\camera.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\LSHighlighting.txt" />
</ItemGroup>
<ItemGroup>
<None Include="LSDoc.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Themes\empty.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\Icons\log.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RuriLib\RuriLib.csproj">
<Project>{17e95d0b-c1fd-445c-9fdf-244af7299a67}</Project>
<Name>RuriLib</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="DefaultEnvFile.ini" />
</ItemGroup>
<ItemGroup>
<None Include="SyntaxHelper.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Resource Include="Images\Icons\play.png" />
<Resource Include="Images\Icons\stop.png" />
<Resource Include="Images\Icons\delete.png" />
<Resource Include="Images\Icons\import.png" />
<Resource Include="Images\Icons\gears.png" />
<Resource Include="Images\Icons\code.png" />
<Resource Include="Images\BBIcon.png" />
<Resource Include="Images\Icons\book.png" />
<Content Include="Images\Icons\export.png" />
<Resource Include="Images\Icons\load.png" />
<Resource Include="Images\Icons\new.png" />
<Resource Include="Images\Icons\scan.png" />
<Resource Include="Images\Icons\search.png" />
<Resource Include="Images\Icons\tasks.png" />
<Resource Include="Images\Icons\undo.png" />
<Resource Include="Images\Icons\stack.png" />
<Resource Include="Images\Icons\git.png" />
<Content Include="Sounds\rifle_hit.wav" />
<Content Include="Sounds\rifle_reload.wav" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Selenium.Chrome.WebDriver.2.45\build\Selenium.Chrome.WebDriver.targets" Condition="Exists('..\packages\Selenium.Chrome.WebDriver.2.45\build\Selenium.Chrome.WebDriver.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Selenium.Chrome.WebDriver.2.45\build\Selenium.Chrome.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.Chrome.WebDriver.2.45\build\Selenium.Chrome.WebDriver.targets'))" />
<Error Condition="!Exists('..\packages\Selenium.Firefox.WebDriver.0.23.0\build\Selenium.Firefox.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.Firefox.WebDriver.0.23.0\build\Selenium.Firefox.WebDriver.targets'))" />
<Error Condition="!Exists('..\packages\Selenium.WebDriver.ChromeDriver.2.46.0\build\Selenium.WebDriver.ChromeDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.ChromeDriver.2.46.0\build\Selenium.WebDriver.ChromeDriver.targets'))" />
<Error Condition="!Exists('..\packages\Selenium.WebDriver.GeckoDriver.Win64.0.24.0\build\Selenium.WebDriver.GeckoDriver.Win64.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.WebDriver.GeckoDriver.Win64.0.24.0\build\Selenium.WebDriver.GeckoDriver.Win64.targets'))" />
</Target>
<Import Project="..\packages\Selenium.Firefox.WebDriver.0.23.0\build\Selenium.Firefox.WebDriver.targets" Condition="Exists('..\packages\Selenium.Firefox.WebDriver.0.23.0\build\Selenium.Firefox.WebDriver.targets')" />
<PropertyGroup>
<PostBuildEvent>if not exist "$(TargetDir)bin" mkdir "$(TargetDir)bin"
if $(ConfigurationName) == Release move "$(TargetDir)*.dll" "$(TargetDir)bin\"
if exist "$(TargetDir)de" RD /S /Q "$(TargetDir)de"
if exist "$(TargetDir)es" RD /S /Q "$(TargetDir)es"
if exist "$(TargetDir)fr" RD /S /Q "$(TargetDir)fr"
if exist "$(TargetDir)hu" RD /S /Q "$(TargetDir)hu"
if exist "$(TargetDir)it" RD /S /Q "$(TargetDir)it"
if exist "$(TargetDir)pt-BR" RD /S /Q "$(TargetDir)pt-BR"
if exist "$(TargetDir)ro" RD /S /Q "$(TargetDir)ro"
if exist "$(TargetDir)ru" RD /S /Q "$(TargetDir)ru"
if exist "$(TargetDir)sv" RD /S /Q "$(TargetDir)sv"
if exist "$(TargetDir)zh-Hans" RD /S /Q "$(TargetDir)zh-Hans"
if not exist "$(TargetDir)Settings" mkdir "$(TargetDir)Settings"
if not exist "$(TargetDir)Settings\Environment.ini" copy "$(ProjectDir)DefaultEnvFile.ini" "$(TargetDir)Settings\Environment.ini"
if not exist "$(TargetDir)Sounds" mkdir "$(TargetDir)Sounds"
copy "$(ProjectDir)Sounds\rifle_hit.wav" "$(TargetDir)Sounds\rifle_hit.wav"
copy "$(ProjectDir)Sounds\rifle_reload.wav" "$(TargetDir)Sounds\rifle_reload.wav"</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Selenium.WebDriver.ChromeDriver.2.46.0\build\Selenium.WebDriver.ChromeDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.ChromeDriver.2.46.0\build\Selenium.WebDriver.ChromeDriver.targets')" />
<Import Project="..\packages\Selenium.WebDriver.GeckoDriver.Win64.0.24.0\build\Selenium.WebDriver.GeckoDriver.Win64.targets" Condition="Exists('..\packages\Selenium.WebDriver.GeckoDriver.Win64.0.24.0\build\Selenium.WebDriver.GeckoDriver.Win64.targets')" />
</Project>
@@ -0,0 +1,53 @@
<Page x:Class="OpenBullet.DialogAddBlock"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="340" d:DesignWidth="510"
Title="DialogAddBlock">
<Grid Height="330" Width="500" Margin="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="20" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="Regular" />
<Setter Property="BorderThickness" Value="3"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="Margin" Value="1"/>
</Style>
</Grid.Resources>
<Button Grid.Column="0" Grid.Row="0" x:Name="blockRequestButton" Background="LimeGreen" Content="REQUEST" Click="blockRequestButton_Click"/>
<Button Grid.Column="1" Grid.Row="0" x:Name="blockUtilityButton" Background="Wheat" Content="UTILITY" Click="blockUtilityButton_Click"/>
<Button Grid.Column="2" Grid.Row="0" x:Name="blockKeycheckButton" Background="DodgerBlue" Content="KEY CHECK" Click="blockKeycheckButton_Click"/>
<Button Grid.Column="0" Grid.Row="1" x:Name="blockParseButton" Background="Gold" Content="PARSE" Click="blockParseButton_Click"/>
<Button Grid.Column="1" Grid.Row="1" x:Name="blockFunctionButton" Background="YellowGreen" Content="FUNCTION" Click="blockFunctionButton_Click"/>
<Button Grid.Column="2" Grid.Row="1" x:Name="blockRecaptchaButton" Background="Turquoise" Content="RECAPTCHA" Click="blockRecaptchaButton_Click"/>
<Button Grid.Column="0" Grid.Row="2" x:Name="blockCaptchaButton" Background="DarkOrange" Content="CAPTCHA" Click="blockCaptchaButton_Click"/>
<Button Grid.Column="1" Grid.Row="2" x:Name="blockBypassCFButton" Background="DarkSalmon" Content="BYPASS CF" Click="blockBypassCFButton_Click"/>
<Button Grid.Column="2" Grid.Row="2" x:Name="blockTCPButton" Background="MediumPurple" Content="TCP" Click="blockTCPButton_Click"/>
<Button Grid.Column="0" Grid.Row="4" x:Name="blockNavigateButton" Background="RoyalBlue" Foreground="Gainsboro" Content="NAVIGATE" Click="blockNavigateButton_Click"/>
<Button Grid.Column="1" Grid.Row="4" x:Name="blockBrowserActionButton" Background="Green" Foreground="Gainsboro" Content="BROWSER ACTION" Click="blockBrowserActionButton_Click"/>
<Button Grid.Column="2" Grid.Row="4" x:Name="blockElementActionButton" Background="Firebrick" Foreground="Gainsboro" Content="ELEMENT ACTION" Click="blockElementActionButton_Click"/>
<Button Grid.Column="0" Grid.Row="5" x:Name="blockExecuteJSButton" Background="Indigo" Foreground="Gainsboro" Content="EXECUTE JS" Click="blockExecuteJSButton_Click"/>
</Grid>
</Grid>
</Page>
@@ -0,0 +1,94 @@
using RuriLib;
using System.Windows;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogAddBlock.xaml
/// </summary>
public partial class DialogAddBlock : Page
{
public object Caller { get; set; }
public DialogAddBlock(object caller)
{
InitializeComponent();
Caller = caller;
}
private void blockRequestButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockRequest());
}
private void blockUtilityButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockUtility());
}
private void blockKeycheckButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockKeycheck());
}
private void blockParseButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockParse());
}
private void blockFunctionButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockFunction());
}
private void blockRecaptchaButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockRecaptcha());
}
private void blockCaptchaButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockImageCaptcha());
}
private void blockBypassCFButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockBypassCF());
}
private void blockTCPButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new BlockTCP());
}
private void blockNavigateButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new SBlockNavigate());
}
private void blockBrowserActionButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new SBlockBrowserAction());
}
private void blockElementActionButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new SBlockElementAction());
}
private void blockExecuteJSButton_Click(object sender, RoutedEventArgs e)
{
SendBack(new SBlockExecuteJS());
}
private void SendBack(BlockBase block)
{
if (Caller.GetType() == typeof(Stacker))
{
((Stacker)Caller).AddBlock(block);
}
((MainDialog)Parent).Close();
}
}
}
@@ -0,0 +1,41 @@
<Page x:Class="OpenBullet.DialogAddProxies"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="320" d:DesignWidth="270"
Title="Add Proxies">
<StackPanel Margin="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Grid.Column="0" Content="Location:" VerticalAlignment="Center"/>
<TextBox x:Name="locationTextbox" Grid.Column="1" VerticalContentAlignment="Center" Margin="5" IsReadOnly="True"/>
<Image x:Name="loadProxiesButton" Grid.Column="2" Source="/Images/Icons/folder.png" Width="20" MouseDown="loadProxiesButton_MouseDown"/>
<Label Grid.Column="0" Grid.Row="1" Content="Type:" VerticalAlignment="Center"/>
<ComboBox x:Name="proxyTypeCombobox" Grid.Column="1" Grid.Row="1" Margin="5"/>
</Grid>
<Label Content="ADVANCED MODE (auth, chain)" HorizontalContentAlignment="Center" FontWeight="Bold"/>
<Label Content="Hover on the box below to see the syntax" HorizontalContentAlignment="Center"/>
<TextBox x:Name="proxiesBox" AcceptsReturn="True" TextWrapping="Wrap" Height="100" VerticalScrollBarVisibility="Auto" Margin="0 5" FontFamily="Consolas">
<TextBox.ToolTip>
<TextBlock>Start the line with the proxy type between round brackets.<LineBreak/>Auth:<LineBreak/>(http)127.0.0.1:8888:username:password<LineBreak/>Chain:<LineBreak/>(socks4)127.0.0.1:8000->(http)127.0.0.1:8888</TextBlock>
</TextBox.ToolTip>
</TextBox>
<Label Content="Auth and Chain won't work with Selenium" Foreground="{DynamicResource ForegroundCustom}" HorizontalContentAlignment="Center"/>
<Button x:Name="acceptButton" Content="ACCEPT" Click="acceptButton_Click" Margin="0 5" />
</StackPanel>
</Page>
@@ -0,0 +1,49 @@
using Extreme.Net;
using Microsoft.Win32;
using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogAddProxies.xaml
/// </summary>
public partial class DialogAddProxies : Page
{
public object Caller { get; set; }
public DialogAddProxies(object caller)
{
InitializeComponent();
Caller = caller;
foreach (string i in Enum.GetNames(typeof(ProxyType)))
if(i != "Chain") proxyTypeCombobox.Items.Add(i);
proxyTypeCombobox.SelectedIndex = 0;
}
private void loadProxiesButton_MouseDown(object sender, MouseButtonEventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Proxy files | *.txt";
ofd.FilterIndex = 1;
ofd.ShowDialog();
locationTextbox.Text = ofd.FileName;
}
private void acceptButton_Click(object sender, RoutedEventArgs e)
{
if(Caller.GetType() == typeof(ProxyManager))
{
((ProxyManager)Caller).AddProxies(locationTextbox.Text,
(ProxyType)Enum.Parse(typeof(ProxyType), proxyTypeCombobox.Text),
proxiesBox.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).ToList());
}
((MainDialog)Parent).Close();
}
}
}
@@ -0,0 +1,44 @@
<Page x:Class="OpenBullet.DialogAddWordlist"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="210" d:DesignWidth="270"
Title="Add Wordlist">
<Grid Height="210" Width="250" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
</Style>
</Grid.Resources>
<Label Grid.Column="0" Grid.Row="0" Content="Location:" />
<TextBox x:Name="locationTextbox" Grid.Column="1" Grid.Row="0" Margin="5" IsReadOnly="True"/>
<Image Grid.Column="2" Grid.Row="0" Source="/Images/Icons/folder.png" MouseDown="Image_MouseDown" Margin="5"/>
<Label Grid.Column="0" Grid.Row="1" Content="Name:" />
<TextBox x:Name="nameTextbox" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Margin="5"/>
<Label Grid.Column="0" Grid.Row="2" Content="Type:" />
<ComboBox x:Name="typeCombobox" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Margin="5"/>
<Label Grid.Column="0" Grid.Row="3" Content="Purpose:" />
<TextBox x:Name="purposeTextbox" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Margin="5"/>
<Button Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="4" x:Name="acceptButton" Content="ACCEPT" Click="acceptButton_Click" Margin="5"/>
</Grid>
</Page>
@@ -0,0 +1,51 @@
using Microsoft.Win32;
using RuriLib.Models;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogAddWordlist.xaml
/// </summary>
public partial class DialogAddWordlist : Page
{
public object Caller { get; set; }
public DialogAddWordlist(object caller)
{
InitializeComponent();
Caller = caller;
foreach (string i in Globals.environment.GetWordlistTypeNames())
typeCombobox.Items.Add(i);
typeCombobox.SelectedIndex = 0;
}
private void acceptButton_Click(object sender, RoutedEventArgs e)
{
if (Caller.GetType() == typeof(WordlistManager))
{
if (nameTextbox.Text.Trim() == "") { MessageBox.Show("The name cannot be blank"); return; }
((WordlistManager)Caller).AddWordlist(new Wordlist(nameTextbox.Text, locationTextbox.Text, typeCombobox.Text, purposeTextbox.Text));
}
((MainDialog)Parent).Close();
}
private void Image_MouseDown(object sender, MouseButtonEventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Wordlist files | *.txt";
ofd.FilterIndex = 1;
ofd.ShowDialog();
locationTextbox.Text = ofd.FileName;
nameTextbox.Text = Path.GetFileNameWithoutExtension(ofd.FileName);
}
}
}
@@ -0,0 +1,15 @@
<Page x:Class="OpenBullet.DialogCustomInput"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="110" d:DesignWidth="500"
Title="DialogCustomInput">
<StackPanel Height="100" Width="490" Margin="5">
<TextBox x:Name="questionTextbox" Text="PLACEHOLDER" BorderThickness="0" Background="Transparent" IsReadOnly="True"/>
<TextBox x:Name="answerTextbox"/>
<Button x:Name="acceptButton" Content="ACCEPT" Click="acceptButton_Click" Margin="0 5 0 0"/>
</StackPanel>
</Page>
@@ -0,0 +1,37 @@
using RuriLib.Models;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogCustomInput.xaml
/// </summary>
public partial class DialogCustomInput : Page
{
object Caller { get; set; }
string VariableName { get; set; }
public DialogCustomInput(object caller, string variableName, string question)
{
InitializeComponent();
Caller = caller;
VariableName = variableName;
questionTextbox.Text = question;
}
private void acceptButton_Click(object sender, RoutedEventArgs e)
{
if(Caller.GetType() == typeof(Stacker))
{
((Stacker)Caller).vm.BotData.Variables.Set(new CVar(VariableName, answerTextbox.Text));
}
else if(Caller.GetType() == typeof(Runner))
{
((Runner)Caller).vm.CustomInputs.Add(new KeyValuePair<string, string>(VariableName, answerTextbox.Text));
}
((MainDialog)Parent).Close();
}
}
}
+60
View File
@@ -0,0 +1,60 @@
<Page x:Class="OpenBullet.DialogLSDoc"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
mc:Ignorable="d"
d:DesignHeight="500" d:DesignWidth="800"
Title="DialogLSDoc">
<Grid Width="790" Height="490" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="15"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- StackPanel for the left menu-->
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0 5 0 0">
<ComboBox x:Name="sectionComboBox" SelectionChanged="sectionComboBox_SelectionChanged" />
<Label Content="TABLE OF CONTENTS:" FontWeight="Bold" Foreground="{DynamicResource ForegroundGood}" />
</StackPanel>
<StackPanel x:Name="menuPanel" Grid.Row="1" />
</Grid>
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Label x:Name="titleLabel" Content="Select a menu option" FontSize="20" FontWeight="Bold"/>
</StackPanel>
<avalonEdit:TextEditor
x:Name="contentDisplay"
Grid.Row="1"
FontFamily="Consolas"
FontSize="10pt"
Background="#111"
IsReadOnly="True"
WordWrap="True"
ShowLineNumbers="False"
/>
</Grid>
</Grid>
</Page>
@@ -0,0 +1,98 @@
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Xml;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogLSDoc.xaml
/// </summary>
public partial class DialogLSDoc : Page
{
XmlNode main, currentSection, currentItem;
XmlNodeList sections, items;
public DialogLSDoc()
{
InitializeComponent();
contentDisplay.TextArea.Foreground = new SolidColorBrush(Colors.Gainsboro);
using (XmlReader reader = XmlReader.Create("LSHighlighting.xshd"))
contentDisplay.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance);
XmlDocument doc = new XmlDocument();
try { doc.Load("LSDoc.xml"); } catch { MessageBox.Show("No documentation file found!"); return; }
// Go to the doc node
main = doc.DocumentElement.SelectSingleNode("/doc");
// Add all sections to the ComboBox
sectionComboBox.Items.Clear();
sections = main.ChildNodes;
foreach(XmlNode s in sections)
sectionComboBox.Items.Add(s.Attributes["name"].Value);
sectionComboBox.SelectedIndex = 0;
// Set the 1st as current
currentSection = sections[0];
SwitchPage();
}
private void sectionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
currentSection = sections.Item(((ComboBox)e.OriginalSource).SelectedIndex);
SwitchPage();
}
catch { }
}
private void SwitchPage()
{
// Get the menu items and add them as clickable Labels to the menu
items = currentSection.ChildNodes;
menuPanel.Children.Clear();
foreach (XmlNode i in items)
{
Label label = new Label();
label.Content = i.Attributes["name"].Value;
label.FontWeight = FontWeights.Bold;
label.MouseDown += menuItem_Clicked;
menuPanel.Children.Add(label);
}
}
private void menuItem_Clicked(object sender, MouseButtonEventArgs e)
{
try
{
int i;
for (i = 0; i < items.Count; i++)
{
if (items[i].Attributes["name"].Value == ((TextBlock)e.OriginalSource).Text)
{
currentItem = items[i];
break;
}
}
DisplayContent();
}
catch { }
}
private void DisplayContent()
{
titleLabel.Content = currentItem.Attributes["name"];
contentDisplay.Text = currentItem.InnerText;
}
}
}
@@ -0,0 +1,41 @@
<Page x:Class="OpenBullet.DialogNewConfig"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="170" d:DesignWidth="270"
Title="DialogNewConfig"
Background="{DynamicResource BackgroundMain}">
<Grid Height="170" Width="250" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
</Style>
</Grid.Resources>
<Label Grid.Column="0" Grid.Row="0" Content="Name:" />
<TextBox x:Name="nameTextbox" Grid.Column="1" Grid.Row="0" Margin="5" KeyDown="textbox_KeyDown"/>
<Label Grid.Column="0" Grid.Row="1" Content="Category:" />
<ComboBox x:Name="categoryCombobox" Grid.Column="1" Grid.Row="1" Text="Default" IsEditable="True" Margin="5" KeyDown="textbox_KeyDown"/>
<Label Grid.Column="0" Grid.Row="2" Content="Author:" />
<TextBox x:Name="authorTextbox" Grid.Column="1" Grid.Row="2" Margin="5" KeyDown="textbox_KeyDown"/>
<Button Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="4" x:Name="acceptButton" Content="ACCEPT" Click="acceptButton_Click" Margin="5"/>
</Grid>
</Page>
@@ -0,0 +1,53 @@
using RuriLib;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogNewConfig.xaml
/// </summary>
public partial class DialogNewConfig : Page
{
public object Caller { get; set; }
public DialogNewConfig(object caller)
{
InitializeComponent();
Caller = caller;
authorTextbox.Text = Globals.obSettings.General.DefaultAuthor;
nameTextbox.Focus();
categoryCombobox.Items.Add("Default");
foreach(var category in Globals.mainWindow.ConfigsPage.ConfigManagerPage.vm.ConfigsList.Select(c => c.Category).Distinct())
categoryCombobox.Items.Add(category);
categoryCombobox.SelectedIndex = 0;
}
private void acceptButton_Click(object sender, RoutedEventArgs e)
{
if (Caller.GetType() == typeof(ConfigManager))
{
// Check if name is ok
if (nameTextbox.Text.Trim() == "") { MessageBox.Show("The name cannot be blank"); return; }
else if (nameTextbox.Text != BlockBase.MakeValidFileName(nameTextbox.Text)) { MessageBox.Show("The name contains invalid characters"); return; }
// Check if category is ok
if (categoryCombobox.Text.Trim() == "") categoryCombobox.Text = "Default";
else if (categoryCombobox.Text != BlockBase.MakeValidFileName(categoryCombobox.Text)) { MessageBox.Show("The category contains invalid characters"); return; }
((ConfigManager)Caller).CreateConfig(nameTextbox.Text, categoryCombobox.Text, authorTextbox.Text);
}
((MainDialog)Parent).Close();
}
private void textbox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
acceptButton_Click(this, new RoutedEventArgs());
}
}
}
@@ -0,0 +1,23 @@
<Page x:Class="OpenBullet.DialogSelectBots"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="80" d:DesignWidth="300"
Title="DialogSelectBots">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<Label Content="Bots:"/>
<TextBox x:Name="botsNumberTextbox" Text="1"/>
</DockPanel>
<Button Grid.Row="1" x:Name="selectButton" Content="Select" Click="selectButton_Click" Margin="0 5 0 0"/>
</Grid>
</Page>
@@ -0,0 +1,31 @@
using System.Windows;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogSelectBots.xaml
/// </summary>
public partial class DialogSelectBots : Page
{
public object Caller { get; set; }
public DialogSelectBots(object caller)
{
InitializeComponent();
Caller = caller;
}
private void selectButton_Click(object sender, RoutedEventArgs e)
{
int bots = 1;
int.TryParse(botsNumberTextbox.Text, out bots);
if (Caller.GetType() == typeof(Runner))
{
(Caller as Runner).vm.BotsNumber = bots;
}
((MainDialog)Parent).Close();
}
}
}
@@ -0,0 +1,152 @@
<Page x:Class="OpenBullet.DialogSelectConfig"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="510" d:DesignWidth="410"
Title="DialogSelectConfig">
<Grid Height="500" Width="400" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!-- Proxies List View -->
<ListView x:Name="configsListView" Grid.Row="0" Foreground="{DynamicResource ForegroundMain}" Background="Transparent" ItemsSource="{Binding Path=ConfigsList}" SelectionMode="Extended" BorderThickness="1" VirtualizingPanel.IsVirtualizing="True">
<!-- Show Headers by overriding the default style -->
<ListView.Style>
<Style TargetType="{x:Type ListView}" />
</ListView.Style>
<!-- Align Headers to the Left -->
<ListView.Resources>
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
<Setter Property="Width" Value="18" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource BorderLightColor}" Offset="0.0" />
<GradientStop Color="{DynamicResource BorderDarkColor}" Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Grid>
<Border BorderThickness="0,0,0,1" BorderBrush="Black" Background="Transparent">
<TextBlock x:Name="ContentHeader" Text="{TemplateBinding Content}" Padding="5,5,5,0" Width="{TemplateBinding Width}" TextAlignment="Left" />
</Border>
<Thumb x:Name="PART_HeaderGripper"
HorizontalAlignment="Right"
Margin="0,0,-9,0"
Style="{StaticResource GridViewColumnHeaderGripper}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="14" />
</Style>
<Style TargetType="{x:Type ListViewItem}">
<!-- <EventSetter Event="Selected" Handler="ListViewItem_Selected" /> -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="0"
SnapsToDevicePixels="true">
<GridViewRowPresenter
HorizontalAlignment="Left"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel>
</VirtualizingStackPanel>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.View>
<GridView>
<GridViewColumn Width="180" DisplayMemberBinding="{Binding Path=Name}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Name" Click="listViewColumnHeader_Click">Name</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="40" DisplayMemberBinding="{Binding Path=Config.Settings.NeedsProxies}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Proxies" Click="listViewColumnHeader_Click">Prox</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="40" DisplayMemberBinding="{Binding Path=Config.CaptchasNeeded}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Captcha" Click="listViewColumnHeader_Click">Cap</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="40" DisplayMemberBinding="{Binding Path=Config.SeleniumPresent}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Selenium" Click="listViewColumnHeader_Click">Sele</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="600" DisplayMemberBinding="{Binding Path=Path}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Path" Click="listViewColumnHeader_Click">Path</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<Button Grid.Row="1" x:Name="selectButton" Content="Select" Click="selectButton_Click" />
</Grid>
</Page>
@@ -0,0 +1,59 @@
using RuriLib;
using RuriLib.ViewModels;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogSelectConfig.xaml
/// </summary>
public partial class DialogSelectConfig : Page
{
private GridViewColumnHeader listViewSortCol = null;
private SortAdorner listViewSortAdorner = null;
object Caller { get; set; }
public DialogSelectConfig(object caller)
{
InitializeComponent();
Caller = caller;
DataContext = Globals.mainWindow.ConfigsPage.ConfigManagerPage.DataContext;
}
private void selectButton_Click(object sender, RoutedEventArgs e)
{
if (configsListView.SelectedItems.Count == 0) return;
if(Caller.GetType() == typeof(Runner))
{
if (Globals.obSettings.General.LiveConfigUpdates) ((Runner)Caller).SetConfig(((ConfigViewModel)configsListView.SelectedItem).Config);
else ((Runner)Caller).SetConfig(IOManager.CloneConfig(((ConfigViewModel)configsListView.SelectedItem).Config));
}
((MainDialog)Parent).Close();
}
private void listViewColumnHeader_Click(object sender, RoutedEventArgs e)
{
GridViewColumnHeader column = (sender as GridViewColumnHeader);
string sortBy = column.Tag.ToString();
if (listViewSortCol != null)
{
AdornerLayer.GetAdornerLayer(listViewSortCol).Remove(listViewSortAdorner);
configsListView.Items.SortDescriptions.Clear();
}
ListSortDirection newDir = ListSortDirection.Ascending;
if (listViewSortCol == column && listViewSortAdorner.Direction == newDir)
newDir = ListSortDirection.Descending;
listViewSortCol = column;
listViewSortAdorner = new SortAdorner(listViewSortCol, newDir);
AdornerLayer.GetAdornerLayer(listViewSortCol).Add(listViewSortAdorner);
configsListView.Items.SortDescriptions.Add(new SortDescription(sortBy, newDir));
}
}
}
@@ -0,0 +1,151 @@
<Page x:Class="OpenBullet.DialogSelectWordlist"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="510" d:DesignWidth="410"
Title="DialogSelectWordlist">
<Grid Height="500" Width="400" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!-- Wordlists List View -->
<ListView x:Name="wordlistsListView" Grid.Row="0" Foreground="{DynamicResource ForegroundMain}" Background="Transparent" ItemsSource="{Binding Path=WordlistList}" SelectionMode="Extended" BorderThickness="1" VirtualizingPanel.IsVirtualizing="True">
<!-- Show Headers by overriding the default style -->
<ListView.Style>
<Style TargetType="{x:Type ListView}" />
</ListView.Style>
<!-- Align Headers to the Left -->
<ListView.Resources>
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
<Setter Property="Width" Value="18" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource BorderLightColor}" Offset="0.0" />
<GradientStop Color="{DynamicResource BorderDarkColor}" Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Grid>
<Border BorderThickness="0,0,0,1" BorderBrush="Black" Background="Transparent">
<TextBlock x:Name="ContentHeader" Text="{TemplateBinding Content}" Padding="5,5,5,0" Width="{TemplateBinding Width}" TextAlignment="Left" />
</Border>
<Thumb x:Name="PART_HeaderGripper"
HorizontalAlignment="Right"
Margin="0,0,-9,0"
Style="{StaticResource GridViewColumnHeaderGripper}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="14" />
</Style>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="0"
SnapsToDevicePixels="true">
<GridViewRowPresenter
HorizontalAlignment="Left"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel>
</VirtualizingStackPanel>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.View>
<GridView>
<GridViewColumn Width="130" DisplayMemberBinding="{Binding Path=Name}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Name" Click="listViewColumnHeader_Click">Name</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="50" DisplayMemberBinding="{Binding Path=Type}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Type" Click="listViewColumnHeader_Click">Type</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="65" DisplayMemberBinding="{Binding Path=Purpose}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Purpose" Click="listViewColumnHeader_Click">Purpose</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="60" DisplayMemberBinding="{Binding Path=Total}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Total" Click="listViewColumnHeader_Click">Total</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="600" DisplayMemberBinding="{Binding Path=Path}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Path" Click="listViewColumnHeader_Click">Path</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<Button Grid.Row="1" x:Name="selectButton" Content="Select" Click="selectButton_Click" />
</Grid>
</Page>
@@ -0,0 +1,56 @@
using RuriLib.Models;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogSelectWordlist.xaml
/// </summary>
public partial class DialogSelectWordlist : Page
{
private GridViewColumnHeader listViewSortCol = null;
private SortAdorner listViewSortAdorner = null;
object Caller { get; set; }
public DialogSelectWordlist(object caller)
{
InitializeComponent();
Caller = caller;
DataContext = Globals.mainWindow.WordlistManagerPage.DataContext;
}
private void selectButton_Click(object sender, RoutedEventArgs e)
{
if (Caller.GetType() == typeof(Runner))
{
((Runner)Caller).SetWordlist((Wordlist)wordlistsListView.SelectedItem);
}
((MainDialog)Parent).Close();
}
private void listViewColumnHeader_Click(object sender, RoutedEventArgs e)
{
GridViewColumnHeader column = (sender as GridViewColumnHeader);
string sortBy = column.Tag.ToString();
if (listViewSortCol != null)
{
AdornerLayer.GetAdornerLayer(listViewSortCol).Remove(listViewSortAdorner);
wordlistsListView.Items.SortDescriptions.Clear();
}
ListSortDirection newDir = ListSortDirection.Ascending;
if (listViewSortCol == column && listViewSortAdorner.Direction == newDir)
newDir = ListSortDirection.Descending;
listViewSortCol = column;
listViewSortAdorner = new SortAdorner(listViewSortCol, newDir);
AdornerLayer.GetAdornerLayer(listViewSortCol).Add(listViewSortAdorner);
wordlistsListView.Items.SortDescriptions.Add(new SortDescription(sortBy, newDir));
}
}
}
@@ -0,0 +1,25 @@
<Page x:Class="OpenBullet.DialogSetProxies"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="80" d:DesignWidth="300"
Title="DialogSetProxies">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0">
<Label Content="Proxies:"/>
<RadioButton x:Name="proxiesDefaultRadio" Content="Default" Margin="0 0 5 0" />
<RadioButton x:Name="proxiesOnRadio" Content="On" Margin="0 0 5 0"/>
<RadioButton x:Name="proxiesOffRadio" Content="Off" />
</DockPanel>
<Button Grid.Row="1" x:Name="selectButton" Content="Select" Click="selectButton_Click" Margin="0 5 0 0"/>
</Grid>
</Page>
@@ -0,0 +1,48 @@
using RuriLib.Runner;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
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;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogSetProxies.xaml
/// </summary>
public partial class DialogSetProxies : Page
{
public object Caller { get; set; }
public DialogSetProxies(object caller)
{
InitializeComponent();
Caller = caller;
proxiesDefaultRadio.IsChecked = true;
}
private void selectButton_Click(object sender, RoutedEventArgs e)
{
ProxyMode mode = ProxyMode.Default;
if ((bool)proxiesDefaultRadio.IsChecked) mode = ProxyMode.Default;
else if ((bool)proxiesOnRadio.IsChecked) mode = ProxyMode.On;
else if ((bool)proxiesOffRadio.IsChecked) mode = ProxyMode.Off;
if (Caller.GetType() == typeof(Runner))
{
(Caller as Runner).vm.ProxyMode = mode;
}
((MainDialog)Parent).Close();
}
}
}
@@ -0,0 +1,43 @@
<Page x:Class="OpenBullet.DialogShowLog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800"
Title="DialogShowLog">
<Grid Width="800" Height="600">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<WindowsFormsHost Grid.Row="0">
<wf:RichTextBox x:Name="logRTB" Dock="Fill" ForeColor="Gainsboro" BackColor="Black" ReadOnly="True" ScrollBars="Vertical" BorderStyle="None" DetectUrls="False"/>
</WindowsFormsHost>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Search:" VerticalAlignment="Center"/>
<TextBox Grid.Column="1" Text="{Binding SearchString}"/>
<Button Grid.Column="2" x:Name="searchButton" Content="Go" Click="searchButton_Click" />
<Image Grid.Column="3" x:Name="previousMatchButton" Source="/Images/Icons/left.png" Margin="5 0" Width="20" Height="20" MouseDown="previousMatchButton_MouseDown" />
<Label Grid.Column="4" Content="{Binding CurrentSearchMatch}"/>
<Label Grid.Column="5" Content="of"/>
<Label Grid.Column="6" Content="{Binding TotalSearchMatches}"/>
<Image Grid.Column="7" x:Name="nextMatchButton" Source="/Images/Icons/right.png" Margin="5 0" Width="20" Height="20" MouseDown="nextMatchButton_MouseDown" />
</Grid>
</Grid>
</Page>
@@ -0,0 +1,114 @@
using RuriLib;
using RuriLib.ViewModels;
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per DialogShowLog.xaml
/// </summary>
public partial class DialogShowLog : Page
{
public FullLogViewModel vm = new FullLogViewModel();
public DialogShowLog(List<LogEntry> log)
{
InitializeComponent();
DataContext = vm;
// Style the logRTB
logRTB.Font = new System.Drawing.Font("Consolas", 10);
logRTB.BackColor = System.Drawing.Color.FromArgb(22, 22, 22);
foreach (var entry in log)
{
logRTB.AppendText(entry.LogString + Environment.NewLine, entry.LogColor);
}
}
private void searchButton_Click(object sender, RoutedEventArgs e)
{
Globals.LogInfo(Components.Stacker, $"Seaching for {vm.SearchString}");
// Reset all highlights
logRTB.SelectAll();
logRTB.SelectionBackColor = System.Drawing.Color.FromArgb(22, 22, 22);
logRTB.DeselectAll();
// Check for empty search
if (vm.SearchString == string.Empty)
return;
int sstart = logRTB.SelectionStart, startIndex = 0, index;
vm.Indexes.Clear();
while ((index = logRTB.Text.IndexOf(vm.SearchString, startIndex, StringComparison.InvariantCultureIgnoreCase)) != -1)
{
logRTB.Select(index, vm.SearchString.Length);
logRTB.SelectionColor = System.Drawing.Color.White;
logRTB.SelectionBackColor = System.Drawing.Color.Navy;
startIndex = index + vm.SearchString.Length;
vm.Indexes.Add(startIndex);
if (vm.Indexes.Count == 1) logRTB.ScrollToCaret();
}
vm.UpdateTotalSearchMatches();
// Reset the selection
logRTB.SelectionStart = sstart;
logRTB.SelectionLength = 0;
logRTB.SelectionColor = System.Drawing.Color.Black;
Globals.LogInfo(Components.Stacker, $"Found {vm.Indexes.Count} matches", true);
if (vm.Indexes.Count > 0)
vm.CurrentSearchMatch = 1;
}
private void previousMatchButton_MouseDown(object sender, MouseButtonEventArgs e)
{
if (vm.CurrentSearchMatch == 1 || vm.TotalSearchMatches == 0)
return;
vm.CurrentSearchMatch--;
logRTB.DeselectAll();
logRTB.Select(vm.Indexes[vm.CurrentSearchMatch - 1], 0);
logRTB.ScrollToCaret();
}
private void nextMatchButton_MouseDown(object sender, MouseButtonEventArgs e)
{
if (vm.CurrentSearchMatch == vm.Indexes.Count || vm.TotalSearchMatches == 0)
return;
vm.CurrentSearchMatch++;
logRTB.DeselectAll();
logRTB.Select(vm.Indexes[vm.CurrentSearchMatch - 1], 0);
logRTB.ScrollToCaret();
}
}
public class FullLogViewModel : ViewModelBase
{
// Search
private string searchString = "";
public string SearchString { get { return searchString; } set { searchString = value; OnPropertyChanged("SearchString"); OnPropertyChanged("SearchProgress"); } }
private List<int> indexes = new List<int>();
public List<int> Indexes { get { return indexes; } set { indexes = value; OnPropertyChanged("TotalSearchMatches"); OnPropertyChanged("CurrentSearchMatch"); } }
public int TotalSearchMatches { get { return Indexes.Count; } }
public void UpdateTotalSearchMatches()
{
OnPropertyChanged("TotalSearchMatches");
}
private int currentSearchMatch = 0;
public int CurrentSearchMatch { get { return currentSearchMatch; } set { currentSearchMatch = value; OnPropertyChanged("CurrentSearchMatch"); } }
}
}
+52
View File
@@ -0,0 +1,52 @@
<Page x:Class="OpenBullet.About"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="550" d:DesignWidth="780"
Title="About">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<TextBlock
FontSize="14"
TextWrapping="Wrap"
Foreground="{DynamicResource ForegroundMain}">
<Italic>OpenBullet</Italic> is a webtesting suite that can be used for <Bold>scraping</Bold> and <Bold>parsing</Bold> data, automated <Bold>pentesting</Bold>, selenium <Bold>unit testing</Bold> and much more..
<LineBreak/><LineBreak/>
<Span Foreground="{DynamicResource ForegroundBad}"><Bold>IT IS ILLEGAL</Bold> to use this program to perform (D)DoS or credential stuffing attacks on sites you don't own!</Span>
<LineBreak/><LineBreak/>
Special thanks to the beta testers:
<LineBreak/><LineBreak/>
• demiurgo
<LineBreak/>
• meinname
<LineBreak/><LineBreak/>
<Span Foreground="{DynamicResource ForegroundGood}">This software is <Italic>Open Source</Italic> and licensed under the MIT license. Please visit the <Bold>repository</Bold> using the button below.</Span>
</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="2">
<Button x:Name="repoButton" Click="repoButton_Click" Margin="0 5">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/git.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Repository</TextBlock>
</StackPanel>
</Button>
<Button x:Name="docuButton" Click="docuButton_Click" Margin="0 5">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/book.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Usage Guide</TextBlock>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</Page>
+26
View File
@@ -0,0 +1,26 @@
using System.Diagnostics;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per About.xaml
/// </summary>
public partial class About : Page
{
public About()
{
InitializeComponent();
}
private void repoButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
Process.Start("https://github.com/openbullet/openbullet");
}
private void docuButton_Click(object sender, System.Windows.RoutedEventArgs e)
{
Process.Start("https://openbullet.github.io/");
}
}
}
+35
View File
@@ -0,0 +1,35 @@
<Page x:Class="OpenBullet.Configs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="550" d:DesignWidth="780"
Title="Configs">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel x:Name="topMenu" Orientation="Horizontal">
<StackPanel.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="0 0 5 0" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="12" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</StackPanel.Resources>
<Label x:Name="menuOptionManager" Content="Manager" MouseDown="menuOptionManager_MouseDown"/>
<Label x:Name="menuOptionStacker" Content="Stacker" MouseDown="menuOptionStacker_MouseDown" />
<Label x:Name="menuOptionOtherOptions" Content="Other Options" MouseDown="menuOptionOtherOptions_MouseDown" />
</StackPanel>
<Frame Grid.Row="1" x:Name="Main" NavigationUIVisibility="Hidden" />
</Grid>
</Page>
+80
View File
@@ -0,0 +1,80 @@
using RuriLib.ViewModels;
using System.Windows.Controls;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per Configs.xaml
/// </summary>
public partial class Configs : Page
{
public ConfigManager ConfigManagerPage;
public Stacker StackerPage;
public ConfigOtherOptions OtherOptionsPage;
public ConfigViewModel CurrentConfig { get; set; }
public Configs()
{
InitializeComponent();
ConfigManagerPage = new ConfigManager();
Globals.LogInfo(Components.ConfigManager, "Initialized Manager Page");
menuOptionManager_MouseDown(this, null);
}
#region Menu Options
private void menuOptionManager_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = ConfigManagerPage;
menuOptionSelected(menuOptionManager);
}
public void menuOptionStacker_MouseDown(object sender, MouseButtonEventArgs e)
{
if(CurrentConfig != null && StackerPage != null)
{
Main.Content = StackerPage;
menuOptionSelected(menuOptionStacker);
}
else
{
Globals.LogError(Components.ConfigManager, "Cannot switch to stacker since no config is loaded or the loaded config isn't public");
}
}
private void menuOptionOtherOptions_MouseDown(object sender, MouseButtonEventArgs e)
{
if(CurrentConfig != null)
{
if (OtherOptionsPage == null)
OtherOptionsPage = new ConfigOtherOptions();
Main.Content = OtherOptionsPage;
menuOptionSelected(menuOptionOtherOptions);
}
else
{
Globals.LogError(Components.ConfigManager, "Cannot switch to other options since no config is loaded");
}
}
private void menuOptionSelected(object sender)
{
foreach (var child in topMenu.Children)
{
try
{
//var a = "";
var c = (Label)child;
c.Foreground = Globals.GetBrush("ForegroundMain");
}
catch { }
}
((Label)sender).Foreground = Globals.GetBrush("ForegroundCustom");
}
#endregion
}
}
@@ -0,0 +1,284 @@
<Page x:Class="OpenBullet.ConfigManager"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="480" d:DesignWidth="780"
Title="ConfigManager">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="40" />
<RowDefinition Height="*" />
<RowDefinition Height="80" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Label Content="Current Config:" FontWeight="Bold"/>
<Label Content="{Binding CurrentConfigName}" Margin="5 0 0 0" FontWeight="Bold"/>
</StackPanel>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="30" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal">
<Button x:Name="newConfigButton" Click="newConfigButton_Click" >
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/new.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">New</TextBlock>
</StackPanel>
</Button>
<Button x:Name="loadConfigButton" Click="loadConfigButton_Click" >
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/gears.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Edit</TextBlock>
</StackPanel>
</Button>
<Button x:Name="saveConfigButton" Click="saveConfigButton_Click" >
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/save.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Save</TextBlock>
</StackPanel>
</Button>
<Button x:Name="deleteConfigsButton" Click="deleteConfigsButton_Click" >
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/delete.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Delete</TextBlock>
</StackPanel>
</Button>
<Label Content="Total Configs:" Margin="0 0 5 0" FontWeight="Bold" VerticalAlignment="Center"/>
<Label Content="{Binding Total}" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal">
<TextBox x:Name="filterTextbox" Width="150" KeyDown="filterTextbox_KeyDown"/>
<Button x:Name="searchButton" Click="searchButton_Click" >
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/search.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Search</TextBlock>
</StackPanel>
</Button>
</StackPanel>
<StackPanel Grid.Column="3" Orientation="Horizontal">
<Button x:Name="openConfigFolderButton" Click="openConfigFolderButton_Click" ToolTip="Open the root folder where Configs are stored">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/folder.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Open Folder</TextBlock>
</StackPanel>
</Button>
<Button x:Name="rescanConfigsButton" Click="rescanConfigsButton_Click" ToolTip="Scan the Config folder again and update the list">
<StackPanel Orientation="Horizontal">
<Image Source="/Images/Icons/scan.png" Width="20" />
<TextBlock VerticalAlignment="Center" Margin="5 0">Rescan</TextBlock>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<!-- Proxies List View -->
<ListView x:Name="configsListView" Grid.Row="2" Foreground="{DynamicResource ForegroundMain}" Background="Transparent" ItemsSource="{Binding Path=ConfigsList}" SelectionMode="Extended" BorderThickness="1" VirtualizingPanel.IsVirtualizing="True" SelectionChanged="configsListView_SelectionChanged">
<!-- Show Headers by overriding the default style -->
<ListView.Style>
<Style TargetType="{x:Type ListView}" />
</ListView.Style>
<!-- Align Headers to the Left -->
<ListView.Resources>
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
<Setter Property="Width" Value="18" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="{DynamicResource BorderLightColor}" Offset="0.0" />
<GradientStop Color="{DynamicResource BorderDarkColor}" Offset="1.0" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="White" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
<Grid>
<Border BorderThickness="0,0,0,1" BorderBrush="Black" Background="Transparent">
<TextBlock x:Name="ContentHeader" Text="{TemplateBinding Content}" Padding="5,5,5,0" Width="{TemplateBinding Width}" TextAlignment="Left" />
</Border>
<Thumb x:Name="PART_HeaderGripper"
HorizontalAlignment="Right"
Margin="0,0,-9,0"
Style="{StaticResource GridViewColumnHeaderGripper}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="14" />
</Style>
<Style TargetType="{x:Type ListViewItem}">
<EventSetter Event="MouseDoubleClick" Handler="ListViewItem_MouseDoubleClick" />
<!-- <EventSetter Event="Selected" Handler="ListViewItemSelected" /> -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="0"
SnapsToDevicePixels="true">
<GridViewRowPresenter
HorizontalAlignment="Left"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource BackgroundSecondary}" />
</Trigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel>
</VirtualizingStackPanel>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Path=Config.Settings.Name}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Name" Click="listViewColumnHeader_Click">Name</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Config.Settings.Author}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Author" Click="listViewColumnHeader_Click">Author</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="180" DisplayMemberBinding="{Binding Path=Category}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="Category" Click="listViewColumnHeader_Click">Category</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Config.Settings.NeedsProxies}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="NeedsProxies" Click="listViewColumnHeader_Click">Proxies</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Config.CaptchasNeeded}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="NeedsCaptchaService" Click="listViewColumnHeader_Click">Captchas</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Config.SeleniumPresent}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="SeleniumPresent" Click="listViewColumnHeader_Click">Selenium</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Path=Config.HasCFBypass}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="HasCFBypass" Click="listViewColumnHeader_Click">CF</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
<GridViewColumn Width="200" DisplayMemberBinding="{Binding Path=Config.Settings.LastModified}">
<GridViewColumn.Header>
<GridViewColumnHeader Tag="LastModified" Click="listViewColumnHeader_Click">Last Modified</GridViewColumnHeader>
</GridViewColumn.Header>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal">
<Label Content="Allowed Wordlists:"/>
<Label Content="{Binding MoreInfoConfig.AllowedWordlists}"/>
</StackPanel>
<StackPanel Grid.Column="0" Grid.Row="1" Orientation="Horizontal">
<Label Content="Blocks Amount:"/>
<Label Content="{Binding MoreInfoConfig.BlocksAmount}"/>
</StackPanel>
<StackPanel Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal">
<Label Content="Additional Info:"/>
<Label Content="{Binding MoreInfoConfig.Settings.AdditionalInfo}"/>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
<Label Content="Last Modified:"/>
<Label Content="{Binding MoreInfoConfig.LastModifiedString}"/>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<Label Content="Suggested Bots:"/>
<Label Content="{Binding MoreInfoConfig.Settings.SuggestedBots}"/>
</StackPanel>
<StackPanel Grid.Column="2" Grid.Row="0" Orientation="Horizontal">
<Label Content="Built with version:"/>
<Label Content="{Binding MoreInfoConfig.Settings.Version}"/>
</StackPanel>
<StackPanel Grid.Column="2" Grid.Row="1" Orientation="Horizontal">
<Label Content="Author:" Foreground="{DynamicResource ForegroundRetry}"/>
<Label Content="{Binding MoreInfoConfig.Settings.Author}" Foreground="{DynamicResource ForegroundRetry}"/>
</StackPanel>
</Grid>
</Grid>
</Page>
@@ -0,0 +1,284 @@
using OpenBullet.Pages.StackerBlocks;
using OpenBullet.ViewModels;
using RuriLib;
using RuriLib.ViewModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per ConfigManager.xaml
/// </summary>
public partial class ConfigManager : Page
{
public ConfigManagerViewModel vm = new ConfigManagerViewModel();
private GridViewColumnHeader listViewSortCol = null;
private SortAdorner listViewSortAdorner = null;
public ConfigViewModel Current { get { return Globals.mainWindow.ConfigsPage.CurrentConfig; } set { Globals.mainWindow.ConfigsPage.CurrentConfig = value; vm.RefreshCurrent(); } }
public void OnSaveConfig(object sender, EventArgs e)
{
saveConfigButton_Click(this, new RoutedEventArgs());
}
public ConfigManager()
{
InitializeComponent();
DataContext = vm;
vm.RefreshList();
}
public bool CheckSaved()
{
if (Current == null ||
Globals.obSettings.General.DisableNotSavedWarning ||
Globals.mainWindow.ConfigsPage.StackerPage == null) return true;
var cvm = Globals.mainWindow.ConfigsPage.StackerPage.vm.Config;
if (string.IsNullOrEmpty(vm.SavedConfig) || cvm == null) return true;
return vm.SavedConfig == IOManager.SerializeConfig(cvm.Config);
}
public void SaveState()
{
var cvm = Globals.mainWindow.ConfigsPage.StackerPage.vm.Config;
if (cvm != null) vm.SavedConfig = IOManager.SerializeConfig(cvm.Config);
}
private void loadConfigButton_Click(object sender, RoutedEventArgs e)
{
if (!CheckSaved())
{
if (Globals.mainWindow.ConfigsPage.StackerPage != null)
Globals.mainWindow.ConfigsPage.StackerPage.SetScript();
Globals.LogWarning(Components.Stacker, "Config not saved, prompting quit confirmation");
if (MessageBox.Show("The Config in Stacker wasn't saved.\nAre you sure you want to load another config?",
"Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
return;
}
// Create new instance of stacker
Current = (ConfigViewModel)configsListView.SelectedItem; // Set Current Config
if (Current != null)
{
Globals.LogInfo(Components.ConfigManager, "Loading config: " + Current.Name);
Globals.mainWindow.ConfigsPage.menuOptionStacker.IsEnabled = true;
Globals.mainWindow.ConfigsPage.menuOptionOtherOptions.IsEnabled = true;
var newStacker = new Stacker(Current);
if (Globals.mainWindow.ConfigsPage.StackerPage != null)
{
newStacker.vm.TestData = Globals.mainWindow.ConfigsPage.StackerPage.vm.TestData;
newStacker.vm.TestProxy = Globals.mainWindow.ConfigsPage.StackerPage.vm.TestProxy;
newStacker.vm.ProxyType = Globals.mainWindow.ConfigsPage.StackerPage.vm.ProxyType;
}
Globals.mainWindow.ConfigsPage.StackerPage = newStacker; // Create a Stacker instance
Globals.LogInfo(Components.ConfigManager, "Created and assigned a new Stacker instance");
Globals.mainWindow.ConfigsPage.OtherOptionsPage = new ConfigOtherOptions(); // Create an Other Options instance
Globals.LogInfo(Components.ConfigManager, "Created and assigned a new Other Options instance");
Globals.mainWindow.ConfigsPage.menuOptionStacker_MouseDown(this, null); // Switch to Stacker
// Save the last state of the config
Globals.mainWindow.ConfigsPage.StackerPage.SetScript();
SaveState();
}
else
{
Globals.LogError(Components.ConfigManager, "No config selected for loading", true);
}
}
private void saveConfigButton_Click(object sender, RoutedEventArgs e)
{
if (Current == null)
{
Globals.LogError(Components.ConfigManager, "No config selected for saving!");
return;
}
SaveConfig();
}
public void SaveConfig()
{
if (Globals.mainWindow.ConfigsPage.CurrentConfig == null ||
Globals.mainWindow.ConfigsPage.StackerPage == null ||
Globals.mainWindow.ConfigsPage.OtherOptionsPage == null)
{
Globals.LogError(Components.ConfigManager, "No config eligible for saving!", true);
return;
}
if (vm.CurrentConfigName == "") {
Globals.LogError(Components.ConfigManager, "Empty config name, cannot save", true);
return;
}
var stacker = Globals.mainWindow.ConfigsPage.StackerPage.vm;
stacker.ConvertKeychains();
if (stacker.View == StackerView.Blocks)
stacker.LS.FromBlocks(stacker.GetList());
Current.Config.Script = stacker.LS.Script;
Globals.LogInfo(Components.ConfigManager, $"Saving config {vm.CurrentConfigName}");
Current.Config.Settings.LastModified = DateTime.Now;
Current.Config.Settings.Version = Globals.obVersion;
Globals.LogInfo(Components.ConfigManager, "Converted the unbinded observables and set the Last Modified date");
// Save to file
if (!IOManager.SaveConfig(Current.Config, Current.Path)) {
Globals.LogError(Components.ConfigManager, "Failed to save the config to file.", true);
return;
};
// Save the last state of the config
SaveState();
Globals.LogInfo(Components.ConfigManager, "Refreshing the list");
vm.RefreshList();
}
private void deleteConfigsButton_Click(object sender, RoutedEventArgs e)
{
Globals.LogWarning(Components.ConfigManager, "Deletion initiated, prompting warning");
if (MessageBox.Show("This will delete the physical files from your disk! Are you sure you want to continue?", "WARNING", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
{
foreach(ConfigViewModel config in configsListView.SelectedItems)
{
try
{
File.Delete(config.Path);
}
catch { Globals.LogError(Components.ConfigManager, "Could not delete file: " + config.Path); }
}
Globals.LogInfo(Components.ConfigManager, $"Deleted {configsListView.SelectedItems.Count} configs");
vm.RefreshList();
}
else
{
Globals.LogInfo(Components.ConfigManager, "Deletion cancelled");
}
}
private void rescanConfigsButton_Click(object sender, RoutedEventArgs e)
{
vm.RefreshList();
}
private void newConfigButton_Click(object sender, RoutedEventArgs e)
{
(new MainDialog(new DialogNewConfig(this), "New Config")).ShowDialog();
}
public void CreateConfig(string name, string category, string author)
{
// Build the filename
var path = Globals.configFolder + "\\" + (category == "Default" ? "" : (category + "\\")) + name + ".loli";
// Create the Category folder if it doesn't exist
if(category != "Default")
{
var categoryFolder = System.IO.Path.Combine(Directory.GetCurrentDirectory(), Globals.configFolder, category);
if (!Directory.Exists(categoryFolder))
Directory.CreateDirectory(categoryFolder);
}
// Build the base config structure
var settings = new ConfigSettings();
settings.Name = name;
settings.Author = author;
Globals.LogInfo(Components.ConfigManager, "Setting up the new Config object, with path '" + path + "'");
Current = new ConfigViewModel(path, category, new Config(settings, ""));
var newStacker = new Stacker(Current);
if (Globals.mainWindow.ConfigsPage.StackerPage != null) // Maintain the previous stacker settings
{
newStacker.vm.TestData = Globals.mainWindow.ConfigsPage.StackerPage.vm.TestData;
newStacker.vm.TestProxy = Globals.mainWindow.ConfigsPage.StackerPage.vm.TestProxy;
newStacker.vm.ProxyType = Globals.mainWindow.ConfigsPage.StackerPage.vm.ProxyType;
}
Globals.mainWindow.ConfigsPage.StackerPage = newStacker; // Create a Stacker instance
Globals.LogInfo(Components.ConfigManager, "Created and assigned a new Stacker instance");
Globals.mainWindow.ConfigsPage.OtherOptionsPage = new ConfigOtherOptions(); // Create an Other Options instance
Globals.LogInfo(Components.ConfigManager, "Created and assigned a new Other Options instance");
Globals.mainWindow.ConfigsPage.menuOptionStacker_MouseDown(this, null); // Switch to Stacker
// Save to disk
saveConfigButton_Click(this, null);
vm.RefreshList();
// Create new instance of stacker
Globals.mainWindow.ConfigsPage.StackerPage = new Stacker(Current);
Globals.mainWindow.ConfigsPage.menuOptionStacker_MouseDown(this, null); // Switch to Stacker
}
private void configsListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try { vm.MoreInfoConfig = ((ConfigViewModel)configsListView.SelectedItem).Config; } catch { }
}
private void listViewColumnHeader_Click(object sender, RoutedEventArgs e)
{
GridViewColumnHeader column = (sender as GridViewColumnHeader);
string sortBy = column.Tag.ToString();
if (listViewSortCol != null)
{
AdornerLayer.GetAdornerLayer(listViewSortCol).Remove(listViewSortAdorner);
configsListView.Items.SortDescriptions.Clear();
}
ListSortDirection newDir = ListSortDirection.Ascending;
if (listViewSortCol == column && listViewSortAdorner.Direction == newDir)
newDir = ListSortDirection.Descending;
listViewSortCol = column;
listViewSortAdorner = new SortAdorner(listViewSortCol, newDir);
AdornerLayer.GetAdornerLayer(listViewSortCol).Add(listViewSortAdorner);
configsListView.Items.SortDescriptions.Add(new SortDescription(sortBy, newDir));
}
private void searchButton_Click(object sender, RoutedEventArgs e)
{
vm.SearchString = filterTextbox.Text;
if(vm.SearchString == "")
vm.RefreshList();
}
private void filterTextbox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
searchButton_Click(this, null);
}
private void openConfigFolderButton_Click(object sender, RoutedEventArgs e)
{
try
{
System.Diagnostics.Process.Start(System.IO.Path.Combine(Directory.GetCurrentDirectory(), Globals.configFolder));
}
catch { Globals.LogError(Components.ConfigManager, "No config folder found!", true); }
}
private void ListViewItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
loadConfigButton_Click(this, new RoutedEventArgs());
}
}
}
@@ -0,0 +1,38 @@
<Page x:Class="OpenBullet.ConfigOtherOptions"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="480" d:DesignWidth="780"
Title="ConfigOtherOptions">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel x:Name="topMenu" Orientation="Horizontal">
<StackPanel.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Margin" Value="0 0 5 0" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundMain}" />
<Setter Property="FontFamily" Value="pack://application:,,,/Fonts/#Century Gothic" />
<Setter Property="FontSize" Value="12" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</StackPanel.Resources>
<Label x:Name="menuOptionGeneral" Content="General" MouseDown="menuOptionGeneral_MouseDown" />
<Label x:Name="menuOptionRequests" Content="Requests" MouseDown="menuOptionRequests_MouseDown"/>
<Label x:Name="menuOptionProxies" Content="Proxies" MouseDown="menuOptionProxies_MouseDown"/>
<Label x:Name="menuOptionInput" Content="Input" MouseDown="menuOptionInput_MouseDown" />
<Label x:Name="menuOptionData" Content="Data" MouseDown="menuOptionData_MouseDown"/>
<Label x:Name="menuOptionSelenium" Content="Selenium" MouseDown="menuOptionSelenium_MouseDown"/>
</StackPanel>
<Frame Grid.Row="1" x:Name="Main" NavigationUIVisibility="Hidden" />
</Grid>
</Page>
@@ -0,0 +1,79 @@
using System.Windows.Controls;
using System.Windows.Input;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per ConfigOtherOptions.xaml
/// </summary>
public partial class ConfigOtherOptions : Page
{
public ConfigOtherOptionsGeneral GeneralPage = new ConfigOtherOptionsGeneral();
public ConfigOtherOptionsRequests RequestsPage = new ConfigOtherOptionsRequests();
public ConfigOtherOptionsProxies ProxiesPage = new ConfigOtherOptionsProxies();
public ConfigOtherOptionsInputs InputsPage = new ConfigOtherOptionsInputs();
public ConfigOtherOptionsData DataPage = new ConfigOtherOptionsData();
public ConfigOtherOptionsSelenium SeleniumPage = new ConfigOtherOptionsSelenium();
public ConfigOtherOptions()
{
InitializeComponent();
menuOptionGeneral_MouseDown(this, null);
}
#region Menu Options
private void menuOptionGeneral_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = GeneralPage;
menuOptionSelected(menuOptionGeneral);
}
private void menuOptionRequests_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = RequestsPage;
menuOptionSelected(menuOptionRequests);
}
private void menuOptionProxies_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = ProxiesPage;
menuOptionSelected(menuOptionProxies);
}
private void menuOptionInput_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = InputsPage;
menuOptionSelected(menuOptionInput);
}
private void menuOptionData_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = DataPage;
menuOptionSelected(menuOptionData);
}
private void menuOptionSelenium_MouseDown(object sender, MouseButtonEventArgs e)
{
Main.Content = SeleniumPage;
menuOptionSelected(menuOptionSelenium);
}
private void menuOptionSelected(object sender)
{
foreach (var child in topMenu.Children)
{
try
{
var c = (Label)child;
c.Foreground = Globals.GetBrush("ForegroundMain");
}
catch { }
}
((Label)sender).Foreground = Globals.GetBrush("ForegroundGood");
}
#endregion
}
}
@@ -0,0 +1,64 @@
<Page x:Class="OpenBullet.ConfigOtherOptionsData"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="780"
Title="ConfigOtherOptionsData">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Label Content="Allowed Wordlist Types" FontWeight="Bold"/>
<ComboBox DockPanel.Dock="Top" x:Name="allowedWordlist1Combobox" SelectionChanged="allowedWordlist1Combobox_SelectionChanged" />
<ComboBox DockPanel.Dock="Top" x:Name="allowedWordlist2Combobox" SelectionChanged="allowedWordlist2Combobox_SelectionChanged" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<Label Grid.Row="1" Content="Rules:" FontWeight="Bold"/>
<Button x:Name="addRuleButton" Content="Add Rule" Click="addRuleButton_Click"/>
<Button x:Name="clearRulesButton" Content="Clear Rules" Click="clearRulesButton_Click"/>
</StackPanel>
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="2">
<ItemsControl x:Name="rulesControl" ItemsSource="{Binding DataRules}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Margin="0 10"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Slice Name:" />
<TextBox Grid.Column="1" Text="{Binding SliceName}" Margin="5 0"/>
<ComboBox Tag="{Binding Id}" Grid.Column="2" x:Name="ruleTypeCombobox" Margin="5 0" SelectionChanged="ruleTypeCombobox_SelectionChanged" Loaded="ruleTypeCombobox_Loaded"/>
<ComboBox Tag="{Binding Id}" Grid.Column="3" x:Name="ruleStringCombobox" IsEditable="True" Margin="5 0" SelectionChanged="ruleStringCombobox_SelectionChanged" Loaded="ruleStringCombobox_Loaded" TextBoxBase.TextChanged="ruleStringCombobox_TextChanged"/>
<Button Grid.Column="5" x:Name="removeRuleButton" Tag="{Binding Id}" Content="Remove" Click="removeRuleButton_Click" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Page>
@@ -0,0 +1,110 @@
using RuriLib;
using RuriLib.Models;
using System;
using System.Windows;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per ConfigOtherOptionsData.xaml
/// </summary>
public partial class ConfigOtherOptionsData : Page
{
private ConfigSettings vm = Globals.mainWindow.ConfigsPage.CurrentConfig.Config.Settings;
Random rand = new Random();
public ConfigOtherOptionsData()
{
InitializeComponent();
DataContext = vm;
// Allowed Wordlist 1
allowedWordlist1Combobox.Items.Add("");
foreach (string i in Globals.environment.GetWordlistTypeNames())
allowedWordlist1Combobox.Items.Add(i);
try { allowedWordlist1Combobox.Text = vm.AllowedWordlist1; }
catch { allowedWordlist1Combobox.SelectedIndex = 0; }
// Allowed Wordlist 2
allowedWordlist2Combobox.Items.Add("");
foreach (string i in Globals.environment.GetWordlistTypeNames())
allowedWordlist2Combobox.Items.Add(i);
try { allowedWordlist2Combobox.Text = vm.AllowedWordlist2; }
catch { allowedWordlist2Combobox.SelectedIndex = 0; }
}
private void clearRulesButton_Click(object sender, RoutedEventArgs e)
{
vm.DataRules.Clear();
}
private void addRuleButton_Click(object sender, RoutedEventArgs e)
{
vm.DataRules.Add(new DataRule(rand.Next()));
}
private void removeRuleButton_Click(object sender, RoutedEventArgs e)
{
vm.RemoveDataRuleById((int)(sender as Button).Tag);
}
private void ruleTypeCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
vm.GetDataRuleById((int)(sender as ComboBox).Tag).RuleType = (RuleType)(sender as ComboBox).SelectedIndex;
}
private void ruleStringCombobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var cb = sender as ComboBox;
vm.GetDataRuleById((int)cb.Tag).RuleString = cb.Text;
}
private void ruleTypeCombobox_Loaded(object sender, RoutedEventArgs e)
{
var dr = vm.GetDataRuleById((int)(sender as ComboBox).Tag);
if (dr.TypeInitialized)
return;
dr.TypeInitialized = true;
foreach (var t in Enum.GetNames(typeof(RuleType)))
(sender as ComboBox).Items.Add(t);
(sender as ComboBox).SelectedIndex = (int)dr.RuleType;
}
private void ruleStringCombobox_Loaded(object sender, RoutedEventArgs e)
{
var dr = vm.GetDataRuleById((int)(sender as ComboBox).Tag);
if (dr.StringInitialized)
return;
dr.StringInitialized = true;
var defaults = new string[] { "Lowercase", "Uppercase", "Digit", "Symbol" };
foreach (var d in defaults)
(sender as ComboBox).Items.Add(d);
(sender as ComboBox).Text = dr.RuleString;
}
private void ruleStringCombobox_TextChanged(object sender, TextChangedEventArgs e)
{
var cb = sender as ComboBox;
vm.GetDataRuleById((int)cb.Tag).RuleString = cb.Text;
}
private void allowedWordlist1Combobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
vm.AllowedWordlist1 = (string)allowedWordlist1Combobox.SelectedValue;
}
private void allowedWordlist2Combobox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
vm.AllowedWordlist2 = (string)allowedWordlist2Combobox.SelectedValue;
}
}
}
@@ -0,0 +1,27 @@
<Page x:Class="OpenBullet.ConfigOtherOptionsGeneral"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="780"
Title="ConfigOtherOptionsGeneral">
<Grid>
<StackPanel>
<DockPanel Grid.Column="0" Margin="5">
<Label DockPanel.Dock="Top" Content="Name" />
<TextBox DockPanel.Dock="Top" Text="{Binding Name}"/>
<Label DockPanel.Dock="Top" Content="Author" Foreground="{DynamicResource ForegroundRetry}"/>
<TextBox DockPanel.Dock="Top" Text="{Binding Author}"/>
<Label DockPanel.Dock="Top" Content="Additional Information" />
<TextBox DockPanel.Dock="Top" Text="{Binding AdditionalInfo}" Margin="0 0 0 10"/>
<Label Content="Suggested Bots" />
<xctk:IntegerUpDown Background="Transparent" Width="50" Margin="10 0 0 0" Value="{Binding SuggestedBots}" Foreground="{DynamicResource ForegroundMain}" HorizontalAlignment="Left" Minimum="1" Maximum="200"/>
</DockPanel>
</StackPanel>
</Grid>
</Page>
@@ -0,0 +1,16 @@
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per ConfigOtherOptionsGeneral.xaml
/// </summary>
public partial class ConfigOtherOptionsGeneral : Page
{
public ConfigOtherOptionsGeneral()
{
InitializeComponent();
DataContext = Globals.mainWindow.ConfigsPage.CurrentConfig.Config.Settings;
}
}
}
@@ -0,0 +1,52 @@
<Page x:Class="OpenBullet.ConfigOtherOptionsInputs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="780"
Title="ConfigOtherOptionsInput">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Button x:Name="addInputButton" Content="Add Input" Click="addInputButton_Click"/>
<Button x:Name="clearInputsButton" Content="Clear Inputs" Click="clearInputsButton_Click"/>
</StackPanel>
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1">
<ItemsControl x:Name="inputsControl" ItemsSource="{Binding CustomInputs}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" Margin="0 10"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="Description:" />
<TextBox Grid.Column="1" Text="{Binding Description}" Margin="5 0"/>
<Label Grid.Column="2" Content="Variable Name:" />
<TextBox Grid.Column="3" Text="{Binding VariableName}" Margin="5 0" />
<Button Grid.Column="5" x:Name="removeInputButton" Tag="{Binding Id}" Content="Remove" Click="removeInputButton_Click"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Page>
@@ -0,0 +1,41 @@
using OpenBullet.ViewModels;
using RuriLib;
using RuriLib.ViewModels;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per ConfigOtherOptionsInput.xaml
/// </summary>
public partial class ConfigOtherOptionsInputs : Page
{
ConfigSettings vm = Globals.mainWindow.ConfigsPage.CurrentConfig.Config.Settings;
Random rand = new Random();
public ConfigOtherOptionsInputs()
{
InitializeComponent();
DataContext = vm;
}
private void clearInputsButton_Click(object sender, RoutedEventArgs e)
{
vm.CustomInputs.Clear();
}
private void addInputButton_Click(object sender, RoutedEventArgs e)
{
vm.CustomInputs.Add(new CustomInput(rand.Next()));
}
private void removeInputButton_Click(object sender, RoutedEventArgs e)
{
vm.RemoveCustomInputById((int)(sender as Button).Tag);
}
}
}
@@ -0,0 +1,31 @@
<Page x:Class="OpenBullet.ConfigOtherOptionsProxies"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:OpenBullet"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="780"
Title="ConfigOtherOptionsProxies">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel>
<DockPanel Grid.Column="0" Margin="5">
<CheckBox DockPanel.Dock="Top" Content="Needs Proxies" IsChecked="{Binding NeedsProxies}" VerticalContentAlignment="Center"/>
<CheckBox DockPanel.Dock="Top" Content="Use Only Socks Proxies" IsChecked="{Binding OnlySocks}" VerticalContentAlignment="Center"/>
<CheckBox DockPanel.Dock="Top" Content="Use Only SSL Proxies" IsChecked="{Binding OnlySsl}" VerticalContentAlignment="Center"/>
<DockPanel DockPanel.Dock="Top">
<Label Content="Max Uses Per Proxy (0 = infinite)" />
<xctk:IntegerUpDown Background="Transparent" Width="50" Margin="10 0 0 0" Value="{Binding MaxProxyUses}" Foreground="{DynamicResource ForegroundMain}" HorizontalAlignment="Right"/>
</DockPanel>
</DockPanel>
</StackPanel>
</Grid>
</Page>
@@ -0,0 +1,16 @@
using System.Windows.Controls;
namespace OpenBullet
{
/// <summary>
/// Logica di interazione per ConfigOtherOptionsProxies.xaml
/// </summary>
public partial class ConfigOtherOptionsProxies : Page
{
public ConfigOtherOptionsProxies()
{
InitializeComponent();
DataContext = Globals.mainWindow.ConfigsPage.CurrentConfig.Config.Settings;
}
}
}

Some files were not shown because too many files have changed in this diff Show More