Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
2.4 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ic3w0lf22 committed Oct 21, 2021
1 parent b7c6b4d commit 6b89032
Show file tree
Hide file tree
Showing 14 changed files with 380 additions and 421 deletions.
4 changes: 2 additions & 2 deletions RAMAccount.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ function Account:SetAlias(Alias) return POST('SetAlias', self.Username, Alias) e
function Account:SetDescription(Description) return POST('SetDescription', self.Username, Description) end
function Account:AppendDescription(Description) return POST('AppendDescription', self.Username, Description) end

function Account:GetField(Field) return GET('GetField', self.Username, 'Field=' .. Field).Body end
function Account:SetField(Field, Value) return GET('SetField', self.Username, 'Field=' .. Field, 'Value=' .. tostring(Value)).Body end
function Account:GetField(Field) return GET('GetField', self.Username, 'Field=' .. Field) end
function Account:SetField(Field, Value) return GET('SetField', self.Username, 'Field=' .. Field, 'Value=' .. tostring(Value)) end
function Account:RemoveField(Field) return GET('RemoveField', self.Username, 'Field=' .. Field) end

function Account:GetCookie() return GET('GetCookie', self.Username) end
Expand Down
183 changes: 72 additions & 111 deletions RBX Alt Manager/AccountManager.Designer.cs

Large diffs are not rendered by default.

429 changes: 177 additions & 252 deletions RBX Alt Manager/AccountManager.cs

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions RBX Alt Manager/AccountManager.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,8 @@
<metadata name="AccountsStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>34, 18</value>
</metadata>
<metadata name="MainStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>276, 18</value>
</metadata>
<metadata name="PlaceTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>380, 18</value>
<value>271, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="SaveToAccount.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand All @@ -147,7 +144,7 @@
<value>156, 17</value>
</metadata>
<metadata name="SaveTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>491, 18</value>
<value>375, 16</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Expand Down
65 changes: 45 additions & 20 deletions RBX Alt Manager/Classes/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,30 @@ public class PinStatus
public double unlockedUntil { get; set; }
}

public class Account
public class Account : IComparable<Account>
{
public bool Valid;
public string SecurityToken;
public string Username;
private string _Alias = "";
private string _Description = "";
public string Group { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] public string Group { get; set; } = "Default";
public long UserID;
public Dictionary<string, string> Fields = new Dictionary<string, string>();
[JsonIgnore] public DateTime PinUnlocked;
[JsonIgnore] public DateTime TokenSet;
[JsonIgnore] public DateTime LastAppLaunch;
[JsonIgnore] public string CSRFToken;

public int CompareTo(Account compareTo)
{
if (compareTo == null)
return 1;

else
return Group.CompareTo(compareTo.Group);
}

private string BrowserTrackerID;

public string Alias
Expand Down Expand Up @@ -88,7 +97,7 @@ public string GetCSRFToken()
request.AddCookie(".ROBLOSECURITY", SecurityToken);
request.AddHeader("Referer", "https://www.roblox.com/games/606849621/Jailbreak");

IRestResponse response = AccountManager.client.Execute(request);
IRestResponse response = AccountManager.AuthClient.Execute(request);
Parameter result = response.Headers.FirstOrDefault(x => x.Name == "x-csrf-token");

string Token = "";
Expand Down Expand Up @@ -122,7 +131,7 @@ public bool CheckPin(bool Internal = false)
request.AddCookie(".ROBLOSECURITY", SecurityToken);
request.AddHeader("Referer", "https://www.roblox.com/");

IRestResponse response = AccountManager.client.Execute(request);
IRestResponse response = AccountManager.AuthClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -150,7 +159,7 @@ public bool UnlockPin(string Pin)
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("pin", Pin);

IRestResponse response = AccountManager.client.Execute(request);
IRestResponse response = AccountManager.AuthClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -200,7 +209,7 @@ public bool SetFollowPrivacy(int Privacy)
break;
}

IRestResponse response = AccountManager.mainclient.Execute(request);
IRestResponse response = AccountManager.MainClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK) return true;

Expand All @@ -220,7 +229,7 @@ public bool ChangePassword(string Current, string New)
request.AddParameter("currentPassword", Current);
request.AddParameter("newPassword", New);

IRestResponse response = AccountManager.client.Execute(request);
IRestResponse response = AccountManager.AuthClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -282,7 +291,7 @@ public bool LogOutOfOtherSessions()
request.AddHeader("X-CSRF-TOKEN", GetCSRFToken());
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");

IRestResponse response = AccountManager.mainclient.Execute(request);
IRestResponse response = AccountManager.MainClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -316,7 +325,7 @@ public bool BlockPlayer(string Username)

request.AddCookie(".ROBLOSECURITY", SecurityToken);

IRestResponse response = AccountManager.apiclient.Execute(request);
IRestResponse response = AccountManager.APIClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK)
{
Expand All @@ -330,7 +339,7 @@ public bool BlockPlayer(string Username)
blockReq.AddHeader("Content-Type", "application/json");
blockReq.AddJsonBody(new { blockeeId = BlockeeID.ToString() });

IRestResponse blockRes = AccountManager.mainclient.Execute(blockReq);
IRestResponse blockRes = AccountManager.MainClient.Execute(blockReq);

if (blockRes.Content.Contains(@"""success"":true"))
MessageBox.Show("Blocked " + Username);
Expand All @@ -347,7 +356,7 @@ public bool BlockPlayer(string Username)
blockReq.AddHeader("Content-Type", "application/json");
blockReq.AddJsonBody(new { blockeeId = BlockeeID.ToString() });

IRestResponse blockRes = AccountManager.mainclient.Execute(blockReq);
IRestResponse blockRes = AccountManager.MainClient.Execute(blockReq);

if (blockRes.Content.Contains(@"""success"":true"))
MessageBox.Show("Unblocked " + Username);
Expand Down Expand Up @@ -375,7 +384,7 @@ public string BlockUserId(string UserID, bool SkipPinCheck = false)
blockReq.AddHeader("Content-Type", "application/json");
blockReq.AddJsonBody(new { blockeeId = UserID });

IRestResponse blockRes = AccountManager.mainclient.Execute(blockReq);
IRestResponse blockRes = AccountManager.MainClient.Execute(blockReq);

return blockRes.Content;
}
Expand All @@ -391,7 +400,7 @@ public string UnblockUserId(string UserID, bool SkipPinCheck = false) {
blockReq.AddHeader("Content-Type", "application/json");
blockReq.AddJsonBody(new { blockeeId = UserID });

IRestResponse blockRes = AccountManager.mainclient.Execute(blockReq);
IRestResponse blockRes = AccountManager.MainClient.Execute(blockReq);

return blockRes.Content;
}
Expand All @@ -404,7 +413,7 @@ public string UnblockEveryone()

request.AddCookie(".ROBLOSECURITY", SecurityToken);

IRestResponse response = AccountManager.apiclient.Execute(request);
IRestResponse response = AccountManager.APIClient.Execute(request);

if (response.IsSuccessful && response.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -444,14 +453,14 @@ public string GetBlockedList()

request.AddCookie(".ROBLOSECURITY", SecurityToken);

IRestResponse response = AccountManager.apiclient.Execute(request);
IRestResponse response = AccountManager.APIClient.Execute(request);

return response.Content;
}

public string ParseAccessCode(IRestResponse response)
{
string pattern = "Roblox.GameLauncher.joinPrivateGame\\(\\d+,'(\\w+\\-\\w+\\-\\w+\\-\\w+\\-\\w+)";
string pattern = "Roblox.GameLauncher.joinPrivateGame\\(\\d+\\,\\s*'(\\w+\\-\\w+\\-\\w+\\-\\w+\\-\\w+)'";
Regex regex = new Regex(pattern);
MatchCollection matches = regex.Matches(response.Content);

Expand Down Expand Up @@ -479,7 +488,7 @@ public string JoinServer(long PlaceID, string JobID = "", bool FollowUser = fals
request.AddHeader("X-CSRF-TOKEN", Token);
request.AddHeader("Referer", "https://www.roblox.com/games/606849621/Jailbreak");

IRestResponse response = AccountManager.client.Execute(request);
IRestResponse response = AccountManager.AuthClient.Execute(request);

Parameter Ticket = response.Headers.FirstOrDefault(x => x.Name == "rbx-authentication-ticket");

Expand All @@ -497,7 +506,7 @@ public string JoinServer(long PlaceID, string JobID = "", bool FollowUser = fals
request.AddHeader("X-CSRF-TOKEN", Token);
request.AddHeader("Referer", "https://www.roblox.com/games/606849621/Jailbreak");

response = AccountManager.mainclient.Execute(request);
response = AccountManager.MainClient.Execute(request);

if (response.StatusCode == HttpStatusCode.OK)
{
Expand All @@ -517,7 +526,7 @@ public string JoinServer(long PlaceID, string JobID = "", bool FollowUser = fals
cRequest.AddHeader("X-CSRF-TOKEN", Token);
cRequest.AddHeader("Referer", "https://www.roblox.com/games/606849621/Jailbreak");

IRestResponse result = AccountManager.webClient.Execute(cRequest);
IRestResponse result = AccountManager.Web13Client.Execute(cRequest);

if (result.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -577,7 +586,7 @@ public string LaunchApp()
request.AddHeader("X-CSRF-TOKEN", Token);
request.AddHeader("Referer", "https://www.roblox.com/games/606849621/Jailbreak");

IRestResponse response = AccountManager.client.Execute(request);
IRestResponse response = AccountManager.AuthClient.Execute(request);

Parameter Ticket = response.Headers.FirstOrDefault(x => x.Name == "rbx-authentication-ticket");

Expand All @@ -595,6 +604,22 @@ public string LaunchApp()
return "ERROR: Invalid Authentication Ticket";
}

public bool SendFriendRequest(string Username)
{
long UserId = AccountManager.GetUserID(Username);

RestRequest friendRequest = new RestRequest($"/v1/users/{UserId}/request-friendship", Method.POST);
friendRequest.AddCookie(".ROBLOSECURITY", SecurityToken);
friendRequest.AddHeader("X-CSRF-TOKEN", GetCSRFToken());

IRestResponse friendResponse = AccountManager.FriendsClient.Execute(friendRequest);

if (friendResponse.IsSuccessful && friendResponse.StatusCode == HttpStatusCode.OK)
return true;

return false;
}

public string GetField(string Name) => Fields.ContainsKey(Name) ? Fields[Name] : "";
public void SetField(string Name, string Value) { Fields[Name] = Value; AccountManager.DelayedSaveAccounts(); }
public void RemoveField(string Name) { Fields.Remove(Name); AccountManager.DelayedSaveAccounts(); }
Expand Down
28 changes: 28 additions & 0 deletions RBX Alt Manager/Classes/ViewSorter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RBX_Alt_Manager.Classes
{
class ViewSorter : IComparer
{
SortOrder _Order;

public ViewSorter(SortOrder order)
{
_Order = order;
}

public int Compare(object x, object y)
{
// perform you desired comparison depending on the _Order
Console.WriteLine($"{x}, {y}");

return 0;
}
}
}
17 changes: 15 additions & 2 deletions RBX Alt Manager/Forms/AccountUtils.Designer.cs

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

Loading

0 comments on commit 6b89032

Please sign in to comment.