rename
circlesuck
This commit is contained in:
parent
55a939e0cc
commit
4781305304
38 changed files with 48 additions and 63 deletions
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Square.INI;
|
using Glove.INI;
|
||||||
|
|
||||||
namespace CircleScape {
|
namespace SockScape {
|
||||||
public static class Configuration {
|
public static class Configuration {
|
||||||
private static SettingsFile Settings;
|
private static SettingsFile Settings;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CircleScape.DAL {
|
namespace SockScape.DAL {
|
||||||
public partial class Origin {
|
public partial class Origin {
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace CircleScape.DAL {
|
namespace SockScape.DAL {
|
||||||
using System;
|
using System;
|
||||||
using System.Data.Entity;
|
using System.Data.Entity;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
|
@ -6,7 +6,7 @@ using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CircleScape.DAL {
|
namespace SockScape.DAL {
|
||||||
public partial class Session {
|
public partial class Session {
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CircleScape.DAL {
|
namespace SockScape.DAL {
|
||||||
public partial class User {
|
public partial class User {
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Square;
|
using Glove;
|
||||||
|
|
||||||
namespace CircleScape.Encryption {
|
namespace SockScape.Encryption {
|
||||||
class Cipher {
|
class Cipher {
|
||||||
private byte[] Key = new byte[512 / 8];
|
private byte[] Key = new byte[512 / 8];
|
||||||
private byte[] State = new byte[256];
|
private byte[] State = new byte[256];
|
||||||
|
|
|
@ -4,10 +4,10 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Square;
|
using Glove;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace CircleScape.Encryption {
|
namespace SockScape.Encryption {
|
||||||
class Key {
|
class Key {
|
||||||
private readonly static BigInteger Secret = RNG.NextPrime(512 / 8);
|
private readonly static BigInteger Secret = RNG.NextPrime(512 / 8);
|
||||||
public BigInteger Generator { get; private set; } = 2;
|
public BigInteger Generator { get; private set; } = 2;
|
||||||
|
|
|
@ -5,11 +5,11 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
//using CircleScape.DAL;
|
//using CircleScape.DAL;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Square;
|
using Glove;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Kneesocks;
|
using Kneesocks;
|
||||||
|
|
||||||
namespace CircleScape {
|
namespace SockScape {
|
||||||
class Entrypoint {
|
class Entrypoint {
|
||||||
static void Main(string[] args) {
|
static void Main(string[] args) {
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square {
|
namespace Glove {
|
||||||
public static class ArrayExtensions {
|
public static class ArrayExtensions {
|
||||||
public static T[] Subset<T>(this T[] arr, int offset, int count = -1) {
|
public static T[] Subset<T>(this T[] arr, int offset, int count = -1) {
|
||||||
var arrEnum = arr.AsEnumerable();
|
var arrEnum = arr.AsEnumerable();
|
|
@ -5,7 +5,7 @@ using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square {
|
namespace Glove {
|
||||||
public static class CryptoExtensions {
|
public static class CryptoExtensions {
|
||||||
public static byte[] SHA1(this string str)
|
public static byte[] SHA1(this string str)
|
||||||
=> Encoding.UTF8.GetBytes(str).SHA1();
|
=> Encoding.UTF8.GetBytes(str).SHA1();
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square {
|
namespace Glove {
|
||||||
public static class Utils {
|
public static class Utils {
|
||||||
public static void Swap<T>(ref T a, ref T b) {
|
public static void Swap<T>(ref T a, ref T b) {
|
||||||
T c = a;
|
T c = a;
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square.INI {
|
namespace Glove.INI {
|
||||||
public class Instance : IEnumerable<KeyValuePair<string, Value>> {
|
public class Instance : IEnumerable<KeyValuePair<string, Value>> {
|
||||||
private Dictionary<string, Value> Data
|
private Dictionary<string, Value> Data
|
||||||
= new Dictionary<string, Value>(StringComparer.OrdinalIgnoreCase);
|
= new Dictionary<string, Value>(StringComparer.OrdinalIgnoreCase);
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square.INI {
|
namespace Glove.INI {
|
||||||
public class Section : IEnumerable<Instance> {
|
public class Section : IEnumerable<Instance> {
|
||||||
private List<Instance> Instances = new List<Instance>();
|
private List<Instance> Instances = new List<Instance>();
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square.INI {
|
namespace Glove.INI {
|
||||||
public class SectionRules {
|
public class SectionRules {
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool Required { get; set; } = true;
|
public bool Required { get; set; } = true;
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square.INI {
|
namespace Glove.INI {
|
||||||
public class SettingsFile {
|
public class SettingsFile {
|
||||||
private Dictionary<string, Section> Sections
|
private Dictionary<string, Section> Sections
|
||||||
= new Dictionary<string, Section>(StringComparer.OrdinalIgnoreCase);
|
= new Dictionary<string, Section>(StringComparer.OrdinalIgnoreCase);
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square.INI {
|
namespace Glove.INI {
|
||||||
public class Value {
|
public class Value {
|
||||||
private string Raw;
|
private string Raw;
|
||||||
|
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Square {
|
namespace Glove {
|
||||||
public static class NumericExtensions {
|
public static class NumericExtensions {
|
||||||
public static byte[] Pack(this Single value)
|
public static byte[] Pack(this Single value)
|
||||||
=> BitConverter.GetBytes(value).HostToNetworkOrder();
|
=> BitConverter.GetBytes(value).HostToNetworkOrder();
|
|
@ -5,7 +5,7 @@ using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace Square {
|
namespace Glove {
|
||||||
public static class RNG {
|
public static class RNG {
|
||||||
private static Random RandCtx = new Random();
|
private static Random RandCtx = new Random();
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Square {
|
namespace Glove {
|
||||||
public static class StringExtensions {
|
public static class StringExtensions {
|
||||||
public static byte[] GetBytes(this string str, bool isUtf8 = true)
|
public static byte[] GetBytes(this string str, bool isUtf8 = true)
|
||||||
=> isUtf8 ? Encoding.UTF8.GetBytes(str)
|
=> isUtf8 ? Encoding.UTF8.GetBytes(str)
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Square;
|
using Glove;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Square;
|
using Glove;
|
||||||
|
|
||||||
namespace Kneesocks {
|
namespace Kneesocks {
|
||||||
public class Frame {
|
public class Frame {
|
||||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Square;
|
using Glove;
|
||||||
|
|
||||||
namespace Kneesocks {
|
namespace Kneesocks {
|
||||||
public class Handshake {
|
public class Handshake {
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
<Compile Include="Stack.cs" />
|
<Compile Include="Stack.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Square\Square.csproj">
|
<ProjectReference Include="..\Square\Glove.csproj">
|
||||||
<Project>{054f172e-9683-40bc-8bdd-7671340ec193}</Project>
|
<Project>{054f172e-9683-40bc-8bdd-7671340ec193}</Project>
|
||||||
<Name>Square</Name>
|
<Name>Glove</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
namespace CircleScape.Migrations
|
namespace SocjScape.Migrations
|
||||||
{
|
{
|
||||||
using System.CodeDom.Compiler;
|
using System.CodeDom.Compiler;
|
||||||
using System.Data.Entity.Migrations;
|
using System.Data.Entity.Migrations;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace CircleScape.Migrations
|
namespace SockScape.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Data.Entity.Migrations;
|
using System.Data.Entity.Migrations;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
namespace CircleScape.Migrations
|
namespace SockScape.Migrations
|
||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Data.Entity;
|
using System.Data.Entity;
|
||||||
using System.Data.Entity.Migrations;
|
using System.Data.Entity.Migrations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
internal sealed class Configuration : DbMigrationsConfiguration<CircleScape.DAL.ScapeDb>
|
internal sealed class Configuration : DbMigrationsConfiguration<SockScape.DAL.ScapeDb>
|
||||||
{
|
{
|
||||||
public Configuration()
|
public Configuration()
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace CircleScape.Migrations
|
||||||
AutomaticMigrationsEnabled = false;
|
AutomaticMigrationsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Seed(CircleScape.DAL.ScapeDb context)
|
protected override void Seed(SockScape.DAL.ScapeDb context)
|
||||||
{
|
{
|
||||||
// This method will be called after migrating to the latest version.
|
// This method will be called after migrating to the latest version.
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CircleScape {
|
namespace SockScape {
|
||||||
static class ServerList {
|
static class ServerList {
|
||||||
public static Dictionary<int, IPEndPoint> Servers { get; private set; }
|
public static Dictionary<int, IPEndPoint> Servers { get; private set; }
|
||||||
= new Dictionary<int, IPEndPoint>();
|
= new Dictionary<int, IPEndPoint>();
|
||||||
|
|
|
@ -125,9 +125,9 @@
|
||||||
<Project>{347353f6-cecd-4895-8717-2b5394ac71cc}</Project>
|
<Project>{347353f6-cecd-4895-8717-2b5394ac71cc}</Project>
|
||||||
<Name>Kneesocks</Name>
|
<Name>Kneesocks</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="Libraries\Square\Square.csproj">
|
<ProjectReference Include="Libraries\Square\Glove.csproj">
|
||||||
<Project>{054f172e-9683-40bc-8bdd-7671340ec193}</Project>
|
<Project>{054f172e-9683-40bc-8bdd-7671340ec193}</Project>
|
||||||
<Name>Square</Name>
|
<Name>Glove</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
|
@ -1,13 +1,13 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 15.0.26430.6
|
VisualStudioVersion = 15.0.26403.7
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CircleScape", "CircleScape.csproj", "{438DBAC1-BA37-40BB-9CCE-0FE1F23C6DC5}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SockScape", "SockScape.csproj", "{438DBAC1-BA37-40BB-9CCE-0FE1F23C6DC5}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kneesocks", "Libraries\Kneesocks\Kneesocks.csproj", "{347353F6-CECD-4895-8717-2B5394AC71CC}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kneesocks", "Libraries\Kneesocks\Kneesocks.csproj", "{347353F6-CECD-4895-8717-2B5394AC71CC}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square", "Libraries\Square\Square.csproj", "{054F172E-9683-40BC-8BDD-7671340EC193}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Glove", "Libraries\Glove\Glove.csproj", "{054F172E-9683-40BC-8BDD-7671340EC193}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -4,9 +4,9 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Kneesocks;
|
using Kneesocks;
|
||||||
using Square;
|
using Glove;
|
||||||
|
|
||||||
namespace CircleScape.Socks {
|
namespace SockScape.Socks {
|
||||||
class MasterConnection : Connection {
|
class MasterConnection : Connection {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CircleScape.Socks {
|
namespace SockScape.Socks {
|
||||||
class MasterUdpClient {
|
class MasterUdpClient {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CircleScape.Socks {
|
namespace SockScape.Socks {
|
||||||
static class MasterUdpServer {
|
static class MasterUdpServer {
|
||||||
private static UdpClient Sock;
|
private static UdpClient Sock;
|
||||||
private static Thread ListeningThread = null;
|
private static Thread ListeningThread = null;
|
||||||
|
|
|
@ -3,9 +3,9 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Square;
|
using Glove;
|
||||||
|
|
||||||
namespace CircleScape {
|
namespace SockScape {
|
||||||
class Packet {
|
class Packet {
|
||||||
public enum kId {
|
public enum kId {
|
||||||
KeyExchange = 0,
|
KeyExchange = 0,
|
||||||
|
|
|
@ -5,10 +5,10 @@ using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Kneesocks;
|
using Kneesocks;
|
||||||
using Square;
|
using Glove;
|
||||||
using CircleScape.Encryption;
|
using SockScape.Encryption;
|
||||||
|
|
||||||
namespace CircleScape {
|
namespace SockScape {
|
||||||
class PlayerConnection : Connection {
|
class PlayerConnection : Connection {
|
||||||
private DateTime ConnectionOpened;
|
private DateTime ConnectionOpened;
|
||||||
private Key Key;
|
private Key Key;
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace What
|
|
||||||
{
|
|
||||||
public class INIFile {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netstandard1.4</TargetFramework>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
Loading…
Reference in a new issue