Skip to content

Commit

Permalink
certification
Browse files Browse the repository at this point in the history
plz dont send cops to me because you guys forgot to set branch password :)
  • Loading branch information
SlejmUr committed Sep 29, 2023
1 parent 0c2e8a7 commit d104813
Show file tree
Hide file tree
Showing 28 changed files with 201 additions and 112 deletions.
6 changes: 4 additions & 2 deletions Cert/cert.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ distinguished_name = req_distinguished_name
[ req_distinguished_name ]
0.commonName = 127.0.0.1
1.commonName = nebula.starbreeze.com
2.commonName = connectivitycheck.gstatic.com
2.commonName = api-nebula.starbreeze.com
3.commonName = connectivitycheck.gstatic.com
[ req_ext ]
keyUsage=critical,digitalSignature,keyEncipherment
extendedKeyUsage=critical,serverAuth,clientAuth
subjectAltName = @alt_names
[ alt_names ]
DNS.0 = 127.0.0.1
DNS.1 = nebula.starbreeze.com
DNS.2 = connectivitycheck.gstatic.com
DNS.2 = api-nebula.starbreeze.com
DNS.3 = connectivitycheck.gstatic.com
62 changes: 62 additions & 0 deletions PayCheckServerLib/Files/DLC_Entiltements.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"CEMASK0000000000": [
"pd3_playstation_cosmetic_mask_premium_collectoredition"
],
"CEMASKASI0000000": [
"pd3_playstation_cosmetic_mask_premium_collectoredition"
],
"CEMASKJAP0000000": [
"pd3_playstation_cosmetic_mask_premium_collectoredition"
],
"CEMASKSIE0000000": [
"pd3_playstation_cosmetic_mask_premium_collectoredition"
],
"GOLDEDITIONITEM1": [
"pd3_playstation_cosmetic_accessory_gloves_goldedition",
"pd3_playstation_cosmetic_mask_premium7"
],
"GOLDEDITIONITEM2": [
"pd3_playstation_cosmetic_accessory_gloves_goldedition",
"pd3_playstation_cosmetic_mask_premium7"
],
"GOLDEDITIONITEM3": [
"pd3_playstation_cosmetic_accessory_gloves_goldedition",
"pd3_playstation_cosmetic_mask_premium7"
],
"GOLDEDITIONITEMS": [
"pd3_playstation_cosmetic_accessory_gloves_goldedition",
"pd3_playstation_cosmetic_mask_premium7"
],
"SILVERED0MASK000": [
"pd3_playstation_cosmetic_mask_premium_silveredition"
],
"SILVERED0MASKASI": [
"pd3_playstation_cosmetic_mask_premium_silveredition"
],
"SILVERED0MASKJAP": [
"pd3_playstation_cosmetic_mask_premium_silveredition"
],
"SILVERED0MASKSIE": [
"pd3_playstation_cosmetic_mask_premium_silveredition"
],
"TRIFECTALOOTBAG0": [
"pd3_playstation_cosmetic_mask_premium_preorder",
"pd3_playstation_cosmetic_suit_premiumsuit_preorder",
"pd3_playstation_cosmetic_accessory_gloves_preorder"
],
"TRIFECTALOOTBAG1": [
"pd3_playstation_cosmetic_mask_premium_preorder",
"pd3_playstation_cosmetic_suit_premiumsuit_preorder",
"pd3_playstation_cosmetic_accessory_gloves_preorder"
],
"TRIFECTALOOTBAG2": [
"pd3_playstation_cosmetic_mask_premium_preorder",
"pd3_playstation_cosmetic_suit_premiumsuit_preorder",
"pd3_playstation_cosmetic_accessory_gloves_preorder"
],
"TRIFECTALOOTBAG3": [
"pd3_playstation_cosmetic_mask_premium_preorder",
"pd3_playstation_cosmetic_suit_premiumsuit_preorder",
"pd3_playstation_cosmetic_accessory_gloves_preorder"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

namespace PayCheckServerLib.Jsons
namespace PayCheckServerLib.Jsons.Basic
{
public class AttribError
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

namespace PayCheckServerLib.Jsons
namespace PayCheckServerLib.Jsons.Basic
{
public class DataPaging<T> where T : class
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

namespace PayCheckServerLib.Jsons
namespace PayCheckServerLib.Jsons.Basic
{
public class ErrorMSG
{
Expand Down
25 changes: 25 additions & 0 deletions PayCheckServerLib/Jsons/Basic/TopLevel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Newtonsoft.Json;

namespace PayCheckServerLib.Jsons.Basic
{
public class TopLevel<T> where T : class
{
[JsonProperty("namespace")]
public string Namespace { get; set; }

[JsonProperty("key")]
public string Key { get; set; }

[JsonProperty("set_by")]
public string SetBy { get; set; }

[JsonProperty("value")]
public T Value { get; set; }

[JsonProperty("created_at")]
public string CreatedAt { get; set; }

[JsonProperty("updated_at")]
public string UpdatedAt { get; set; }
}
}
20 changes: 0 additions & 20 deletions PayCheckServerLib/Jsons/InfamyTranslationTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,6 @@ namespace PayCheckServerLib.Jsons
{
public class InfamyTranslationTable
{
public partial class Basic
{
[JsonProperty("created_at")]
public string CreatedAt { get; set; } = "2023-06-27T12:18:00.00Z";

[JsonProperty("key")]
public string Key { get; set; } = "infamy-translation-table";

[JsonProperty("namespace")]
public string Namespace { get; set; } = "pd3";

[JsonProperty("set_by")]
public string SetBy { get; set; } = "SERVER";

[JsonProperty("updated_at")]
public string UpdatedAt { get; set; } = "2023-06-27T12:18:00.00Z";

[JsonProperty("value")]
public Value Value { get; set; }
}

public partial class Value
{
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 2 additions & 19 deletions PayCheckServerLib/Jsons/ProgressionSaveGame.cs
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
using Newtonsoft.Json;
using PayCheckServerLib.Jsons.Basic;

namespace PayCheckServerLib.Jsons
{
public class ProgressionSaveRSP
public class ProgressionSaveRSP : TopLevel<object>
{
[JsonProperty("created_at")]
public string CreatedAt { get; set; }

[JsonProperty("is_public")]
public bool IsPublic { get; set; } = false;

[JsonProperty("key")]
public string Key { get; set; } = "progressionsavegame";

[JsonProperty("namespace")]
public string Namespace { get; set; } = "pd3";

[JsonProperty("set_by")]
public string SetBy { get; set; } = "CLIENT";

[JsonProperty("updated_at")]
public string UpdatedAt { get; set; }

[JsonProperty("user_id")]
public string UserId { get; set; }

[JsonProperty("value")]
public object Value { get; set; }
}
}
21 changes: 2 additions & 19 deletions PayCheckServerLib/Jsons/TitleData.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
using Newtonsoft.Json;
using PayCheckServerLib.Jsons.Basic;

namespace PayCheckServerLib.Jsons
{
public class TitleData
public class TitleData : TopLevel<Dictionary<string, string>>
{
[JsonProperty("created_at")]
public string CreatedAt { get; set; }

[JsonProperty("key")]
public string Key { get; set; }

[JsonProperty("namespace")]
public string Namespace { get; set; }

[JsonProperty("set_by")]
public string SetBy { get; set; }

[JsonProperty("updated_at")]
public string UpdatedAt { get; set; }

[JsonProperty("value")]
public Dictionary<string, string> Value { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json;

namespace PayCheckServerLib.Jsons
namespace PayCheckServerLib.Jsons.WSS
{
internal class Chats
{
Expand Down
1 change: 1 addition & 0 deletions PayCheckServerLib/PayCheckServerLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<ItemGroup>
<None Remove="config.json" />
<None Remove="Files\DLC_Entiltements.json" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions PayCheckServerLib/Responses/Challenge.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using NetCoreServer;
using Newtonsoft.Json;
using PayCheckServerLib.Jsons;
using PayCheckServerLib.Jsons.Basic;
using System.Linq;

namespace PayCheckServerLib.Responses
Expand Down
9 changes: 8 additions & 1 deletion PayCheckServerLib/Responses/CloudSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Newtonsoft.Json;
using PayCheckServerLib.Helpers;
using PayCheckServerLib.Jsons;
using PayCheckServerLib.Jsons.Basic;
using static System.Runtime.InteropServices.JavaScript.JSType;

namespace PayCheckServerLib.Responses
Expand Down Expand Up @@ -42,8 +43,14 @@ public static bool NewsFeed(HttpRequest _, PC3Server.PC3Session session)
public static bool InfamyTranslationTable(HttpRequest _, PC3Server.PC3Session session)
{
ResponseCreator response = new();
InfamyTranslationTable.Basic table = new()
//InfamyTranslationTable.Basic;
TopLevel<InfamyTranslationTable.Value> table = new()
{
CreatedAt = "2023-06-27T12:18:00.00Z",
UpdatedAt = "2023-06-27T12:18:00.00Z",
Key = "infamy-translation-table",
Namespace = "pd3",
SetBy = "SERVER",
Value = new()
{
InfamyTranslationTable = new()
Expand Down
30 changes: 0 additions & 30 deletions PayCheckServerLib/Responses/DLCSync.cs

This file was deleted.

67 changes: 67 additions & 0 deletions PayCheckServerLib/Responses/DLCs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
using NetCoreServer;
using Newtonsoft.Json;
using PayCheckServerLib.Jsons.Basic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PayCheckServerLib.Responses
{
public class DLCs
{
public class PutDLC
{
public string steamId { get; set; }
public string appId { get; set; }
}

public partial class DLC_Value
{
[JsonProperty("data")]
public Dictionary<string, string[]> Data { get; set; }

[JsonProperty("dlcType")]
public string DlcType { get; set; }
}



[HTTP("PUT", "/platform/public/namespaces/pd3/users/{UserId}/dlc/steam/sync")]
public static bool PUT_DLC_SteamSync(HttpRequest request, PC3Server.PC3Session session)
{
//var body = JsonConvert.DeserializeObject<PutDLC>(request.Body);
ResponseCreator response = new ResponseCreator(204);
response.SetHeader("Content-Type", "application/json");
session.SendResponse(response.GetResponse());
return true;
}


[HTTP("GET", "/cloudsave/v1/namespaces/pd3/records/dlc-entitlements")]
public static bool GETdlcentitlements(HttpRequest request, PC3Server.PC3Session session)
{
TopLevel<DLC_Value> dlc = new()
{
SetBy = "SERVER",
CreatedAt = "2023-09-25T12:01:02.096Z",
Key = "dlc-entitlements",
Namespace = "pd3",
UpdatedAt = "2023-09-25T12:01:02.096Z",
Value = new()
{
Data = new(),
DlcType = "PSN"
}
};
var data = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(File.ReadAllText("Files/DLC_Entiltements.json"));
dlc.Value.Data = data;
ResponseCreator response = new ResponseCreator();
response.SetHeader("Content-Type", "application/json");
response.SetBody(JsonConvert.SerializeObject(dlc));
session.SendResponse(response.GetResponse());
return true;
}
}
}
1 change: 1 addition & 0 deletions PayCheckServerLib/Responses/Entitlements.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using NetCoreServer;
using Newtonsoft.Json;
using PayCheckServerLib.Jsons;
using PayCheckServerLib.Jsons.Basic;

namespace PayCheckServerLib.Responses
{
Expand Down
1 change: 1 addition & 0 deletions PayCheckServerLib/Responses/IAM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Newtonsoft.Json;
using PayCheckServerLib.Helpers;
using PayCheckServerLib.Jsons;
using PayCheckServerLib.Jsons.Basic;
using System.Web;

namespace PayCheckServerLib.Responses
Expand Down
1 change: 1 addition & 0 deletions PayCheckServerLib/Responses/Items.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using NetCoreServer;
using Newtonsoft.Json;
using PayCheckServerLib.Jsons;
using PayCheckServerLib.Jsons.Basic;

namespace PayCheckServerLib.Responses
{
Expand Down
1 change: 1 addition & 0 deletions PayCheckServerLib/Responses/Orders.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using NetCoreServer;
using Newtonsoft.Json;
using PayCheckServerLib.Jsons;
using PayCheckServerLib.Jsons.Basic;

namespace PayCheckServerLib.Responses
{
Expand Down
Loading

0 comments on commit d104813

Please sign in to comment.