Categories > Exploiting > WRD Exploit API >
When I click the Inject button, it takes me to the code and gives me an error
Posted
System.ArgumentNullException: "The value cannot be null.
Parameter name: value". When I click the Inject button, it takes me to the code and gives me an error
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeAreDevs_API;
namespace NEBULA
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
ExploitAPI API = new ExploitAPI();
Point lastPoint;
private void button1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button2_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}
private void button4_Click(object sender, EventArgs e)
{
API.SendLuaScript(richTextBox1.Text);
}
private void button5_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
}
private void button8_Click(object sender, EventArgs e)
{
API.LaunchExploit();
}
private void button7_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
using (Stream s = File.Open(saveFileDialog1.FileName, FileMode.CreateNew))
using (StreamWriter sw = new StreamWriter(s))
{
sw.Write(richTextBox1.Text);
}
}
}
private void button6_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
openFileDialog1.Title = "Open";
richTextBox1.Text = File.ReadAllText(openFileDialog1.FileName);
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
richTextBox1.Text = File.ReadAllText($"./Scripts/{listBox1.SelectedItem}");
}
private void button9_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
Functions.PopulateListBox(listBox1, "./Scripts", "*.txt");
Functions.PopulateListBox(listBox1, "./Scripts", "*.lua");
}
private void button3_MouseDown(object sender, MouseEventArgs e)
{
lastPoint = new Point(e.X, e.Y);
}
private void button3_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Left += e.X - lastPoint.X;
this.Top += e.Y - lastPoint.Y;
}
}
}
}
Replied
wait weare devs api works on UWP 2024?
Cancel
Post
Replied
I dont think so.
Cancel
Post
Replied
It seems like you're encountering a `System.ArgumentNullException` when clicking the "Inject" button in your code. The error message suggests that a null value is being passed to a method or parameter that doesn't accept null values.
To debug this, let's check the code where the "Inject" button is handled:
```csharp
private void button8_Click(object sender, EventArgs e)
{
API.LaunchExploit();
}
```
The issue might be related to the `API` object being null or not properly initialized. Ensure that `ExploitAPI` is properly instantiated in the constructor `Form1()`. If `ExploitAPI` requires any parameters for initialization, make sure they are provided.
If `ExploitAPI` is properly initialized and the issue persists, then the problem might be within the `LaunchExploit()` method itself. Ensure that all necessary parameters are passed to this method and that it handles them correctly.
Additionally, consider adding null checks in your code to prevent such exceptions. For example:
```csharp
private void button8_Click(object sender, EventArgs e)
{
if (API != null)
{
API.LaunchExploit();
}
else
{
MessageBox.Show("API object is null.");
}
}
```
This way, you can handle cases where `API` is unexpectedly null and provide a more informative error message to help with debugging.
If the issue persists after these checks, further investigation into the `ExploitAPI` class and its `LaunchExploit()` method implementation may be necessary. It might also be beneficial to seek assistance from online programming communities or forums where experienced developers can offer insights and guidance. Additionally, if you're struggling with specific C# assignments, there are resources available online that provide help with C# assignment, like programminghomeworkhelp.com.
Cancel
Post
Replied
ngl r jus dif nothig more to it
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post