Skip to content

Commit

Permalink
Fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinbreiz committed Dec 27, 2017
1 parent 46d13c3 commit 0ef9dec
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 29 deletions.
19 changes: 10 additions & 9 deletions PS4 Payload Sender/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 30 additions & 20 deletions PS4 Payload Sender/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,32 @@ private void button1_Click(object sender, EventArgs e)

public static bool Connect2PS4(string ip, string port)
{
try
{
_psocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
_psocket.ReceiveTimeout = 3000;
_psocket.SendTimeout = 3000;
_psocket.Connect(new IPEndPoint(IPAddress.Parse(ip), Int32.Parse(port)));
pDConnected = true;
return true;
}
catch (Exception ex)
{
pDConnected = false;
Exception = ex.ToString();
return false;
}
try
{
_psocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
_psocket.ReceiveTimeout = 3000;
_psocket.SendTimeout = 3000;
_psocket.Connect(new IPEndPoint(IPAddress.Parse(ip), Int32.Parse(port)));
pDConnected = true;
return true;
}
catch (Exception ex)
{
pDConnected = false;
Exception = ex.ToString();
return false;
}
}

public static bool SendPayload(string filename)
public static void SendPayload(string filename)
{
_psocket.SendFile(filename);
return true;
}

public static bool DisconnectPayload()
public static void DisconnectPayload()
{
pDConnected = false;
_psocket.Close();
return true;
}

private void Form1_Load(object sender, EventArgs e)
Expand All @@ -91,13 +89,25 @@ private void button3_Click(object sender, EventArgs e)
try
{
SendPayload(path);
}
catch (Exception ex)
{
MessageBox.Show("Error while sending payload!\n" + ex);
}
try
{
DisconnectPayload();
MessageBox.Show("Payload sent!");
}
catch (Exception ex)
{
MessageBox.Show("Error!\n"+ ex);
MessageBox.Show("Error while disconnecting!\n" + ex);
}
}

private void pictureBox60_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://customprotocol.com");
}
}
}
Binary file modified PS4 Payload Sender/bin/Debug/PS4 Payload Sender.exe
Binary file not shown.
Binary file modified PS4 Payload Sender/bin/Debug/PS4 Payload Sender.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,13 @@ C:\Users\valentinbreiz\source\repos\PS4 Payload Sender\PS4 Payload Sender\obj\De
C:\Users\valentinbreiz\source\repos\PS4 Payload Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.csproj.CoreCompileInputs.cache
C:\Users\valentinbreiz\source\repos\PS4 Payload Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.exe
C:\Users\valentinbreiz\source\repos\PS4 Payload Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.pdb
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\bin\Debug\PS4 Payload Sender.exe.config
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\bin\Debug\PS4 Payload Sender.exe
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\bin\Debug\PS4 Payload Sender.pdb
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.csprojResolveAssemblyReference.cache
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4_Payload_Sender.Form1.resources
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4_Payload_Sender.Properties.Resources.resources
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.csproj.GenerateResource.Cache
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.csproj.CoreCompileInputs.cache
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.exe
C:\Users\valentinbreiz\Documents\GitHub\PS4-Payload-Sender\PS4 Payload Sender\obj\Debug\PS4 Payload Sender.pdb
Binary file not shown.
Binary file modified PS4 Payload Sender/obj/Debug/PS4 Payload Sender.exe
Binary file not shown.
Binary file modified PS4 Payload Sender/obj/Debug/PS4 Payload Sender.pdb
Binary file not shown.

0 comments on commit 0ef9dec

Please sign in to comment.