big merge

This commit is contained in:
Philippe G
2021-12-18 21:04:23 -08:00
parent 955692f8ad
commit 898998efb0
583 changed files with 84472 additions and 1965 deletions

View File

@@ -0,0 +1,49 @@
#ifndef SESSION_H
#define SESSION_H
#include <vector>
#include <random>
#include <memory>
#include <functional>
#include <climits>
#include <algorithm>
#include "Utils.h"
#include "stdlib.h"
#include "ShannonConnection.h"
#include "LoginBlob.h"
#include "ApResolve.h"
#include "PlainConnection.h"
#include "Packet.h"
#include "ConstantParameters.h"
#include "Crypto.h"
#include "ProtoHelper.h"
#define SPOTIFY_VERSION 0x10800000000
#define LOGIN_REQUEST_COMMAND 0xAB
#define AUTH_SUCCESSFUL_COMMAND 0xAC
#define AUTH_DECLINED_COMMAND 0xAD
class Session
{
private:
ClientResponseEncrypted authRequest;
ClientResponsePlaintext clientResPlaintext;
ClientHello clientHello;
APResponseMessage apResponse;
std::shared_ptr<PlainConnection> conn;
std::unique_ptr<Crypto> crypto;
std::vector<uint8_t> sendClientHelloRequest();
void processAPHelloResponse(std::vector<uint8_t> &helloPacket);
public:
Session();
std::shared_ptr<ShannonConnection> shanConn;
std::shared_ptr<LoginBlob> authBlob;
void connect(std::unique_ptr<PlainConnection> connection);
void connectWithRandomAp();
void close();
std::vector<uint8_t> authenticate(std::shared_ptr<LoginBlob> blob);
};
#endif