tyranid / canape.core Goto Github PK
View Code? Open in Web Editor NEWA network proxy library written in C# for .NET Core based on CANAPE
License: GNU General Public License v3.0
A network proxy library written in C# for .NET Core based on CANAPE
License: GNU General Public License v3.0
Packages that require license acceptance require a License URL to be provided. Did you have one you wanted to provided?
Toggling the requirement works around this build issue.
It's probably me, but when I load the parser I get the following error:
C:\Users\dave\Documents\AttackNetProto\SuperFunkyChat>C:\Users\dave\Documents\AttackNetProto\SuperFunkyChat\CANAPE.Core-1.1\CANAPE.Cli\bin\Release\netcoreapp3.0\CANAPE.Cli.exe chapter5_proxy.csx --color
CANAPE.Cli (c) 2017 James Forshaw, 2014 Context Information Security.
Error: CANAPE.Net.NetServiceException: Could not start service
---> System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted.
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at System.Net.Sockets.TcpListener.Start()
at CANAPE.Net.Listeners.TcpNetworkListener.Start() in C:\Users\dave\Documents\AttackNetProto\SuperFunkyChat\CANAPE.Core-1.1\CANAPE.Net\Listeners\TcpNetworkListener.cs:line 180
at CANAPE.Net.ProxyNetworkService.Start() in C:\Users\dave\Documents\AttackNetProto\SuperFunkyChat\CANAPE.Core-1.1\CANAPE.Net\ProxyNetworkService.cs:line 644
--- End of inner exception stack trace ---
at CANAPE.Net.ProxyNetworkService.Start() in C:\Users\dave\Documents\AttackNetProto\SuperFunkyChat\CANAPE.Core-1.1\CANAPE.Net\ProxyNetworkService.cs:line 649
at Submission#0.<>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray1 precedingExecutors, Func
2 currentExecutor, StrongBox1 exceptionHolderOpt, Func
2 catchExceptionOpt, CancellationToken cancellationToken)
at CANAPE.Cli.EntryPoint.RunScript(String filename, IEnumerable1 include_dirs, IEnumerable
1 metadata_dirs, IEnumerable`1 args) in C:\Users\dave\Documents\AttackNetProto\SuperFunkyChat\CANAPE.Core-1.1\CANAPE.Cli.Lib\EntryPoint.cs:line 156
For reference, the relevanty part of my proxy is
#load "parser.csx"
using static System.Console;
using static CANAPE.Cli.ConsoleUtils;
var template = new FixedProxyTemplate();
// Local port of 4444, destination 192.068.56.101:12345
template.LocalPort = 4444;
template.Host = "192.168.56.101";
template.Port = 12345;
template.AddLayer<Parser>();
(which worked before adding the parser) and the parser is:
using CANAPE.Net.Layers;
using System.IO;
class Parser : DataParserNetworkLayer
{
protected override bool NegotiateProtocol(Stream serverStream, Stream clientStream)
{
var client = new DataReader(clientStream);
var server = new DataWriter(serverStream);
// Read magic from client and write it to server.
uint magic = client.ReadUInt32();
Console.WriteLine("Magic: {0:X}", magic);
server.WriteUInt32(magic);
// Return true to signal negotiation was successful.
return true;
}
}
I'd be much obliged if you could let me know where I'm going wrong. Thanks, Dave
Edit: hang on... I tried to go back to the non-parser proxy and I'm getting the same error. Methinks I've messed up somewhere...
Edit 2: I've gone back to the original proxy script and am getting the same error. It looks environmental.
Tls proxy is not working with netcore 3.0 properly, I think. Because magic byte is coming all wrong. https://i.imgur.com/aYpfpy5.jpg
The story for getting the application framework 1.1 on Core 2.0 isn't great, especially on Linux. As Canape Core should run quite happily when built for 2.0 we should update the projects so that it builds and runs without any requirements on 1.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.