#include "squid.h"
#include "base64.h"
#include "helper/protocol_defines.h"
#include "ntlmauth/ntlmauth.h"
#include "ntlmauth/support_bits.cci"
#include <cctype>
#include <chrono>
#include <cstring>
#include <thread>
Go to the source code of this file.
Macros | |
#define | IGNORANCE_IS_BLISS |
#define | SEND(X) {debug("sending '%s' to squid\n",X); printf(X "\n");} |
#define | SEND2(X, Y) {debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);} |
#define | SEND3(X, Y, Z) {debug("sending '" X "' to squid\n",Y,Z); printf(X "\n",Y,Z);} |
#define | SEND4(X, Y, Z, W) {debug("sending '" X "' to squid\n",Y,Z,W); printf(X "\n",Y,Z,W);} |
Functions | |
static void | usage (void) |
static void | process_options (int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
Variables | |
const char * | authenticate_ntlm_domain = "WORKGROUP" |
int | strip_domain_enabled = 0 |
int | NTLM_packet_debug_enabled = 0 |
unsigned int | response_delay = 0 |
char * | my_program_name = nullptr |
Macro Definition Documentation
◆ IGNORANCE_IS_BLISS
#define IGNORANCE_IS_BLISS |
Definition at line 34 of file ntlm_fake_auth.cc.
◆ SEND
#define SEND | ( | X | ) | {debug("sending '%s' to squid\n",X); printf(X "\n");} |
Definition at line 57 of file ntlm_fake_auth.cc.
◆ SEND2
#define SEND2 | ( | X, | |
Y | |||
) | {debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);} |
Definition at line 64 of file ntlm_fake_auth.cc.
◆ SEND3
#define SEND3 | ( | X, | |
Y, | |||
Z | |||
) | {debug("sending '" X "' to squid\n",Y,Z); printf(X "\n",Y,Z);} |
Definition at line 65 of file ntlm_fake_auth.cc.
◆ SEND4
#define SEND4 | ( | X, | |
Y, | |||
Z, | |||
W | |||
) | {debug("sending '" X "' to squid\n",Y,Z,W); printf(X "\n",Y,Z,W);} |
Definition at line 66 of file ntlm_fake_auth.cc.
Function Documentation
◆ main()
Definition at line 137 of file ntlm_fake_auth.cc.
References authenticate_ntlm_domain, base64_decode_final(), base64_decode_init(), base64_decode_update(), base64_encode_final(), base64_encode_init(), base64_encode_len, base64_encode_update(), _ntlm_challenge::context_high, debug(), _ntlm_negotiate::flags, HELPER_INPUT_BUFFER, hex_dump(), htole32, lc(), le16toh, _strhdr::maxlen, my_program_name, NTLM_AUTHENTICATE, NTLM_ERR_NONE, ntlm_make_challenge(), ntlm_make_nonce(), NTLM_MAX_FIELD_LENGTH, NTLM_NEGOTIATE_ASCII, NTLM_NONCE_LEN, NTLM_packet_debug_enabled, ntlm_unpack_auth(), ntlm_validate_packet(), _ntlm_challenge::payload, process_options(), response_delay, safe_free, SEND, SEND2, SEND3, SEND4, strip_domain_enabled, _ntlm_challenge::target, VERSION, and xcalloc().
◆ process_options()
|
static |
Definition at line 96 of file ntlm_fake_auth.cc.
References debug_enabled, getopt(), NTLM_packet_debug_enabled, optarg, opterr, optopt, response_delay, strip_domain_enabled, usage(), and xstrtoui().
Referenced by main().
◆ usage()
|
static |
Definition at line 83 of file ntlm_fake_auth.cc.
References my_program_name.
Referenced by process_options().
Variable Documentation
◆ authenticate_ntlm_domain
const char* authenticate_ntlm_domain = "WORKGROUP" |
Definition at line 69 of file ntlm_fake_auth.cc.
Referenced by main().
◆ my_program_name
char* my_program_name = nullptr |
Definition at line 80 of file ntlm_fake_auth.cc.
◆ NTLM_packet_debug_enabled
int NTLM_packet_debug_enabled = 0 |
Definition at line 71 of file ntlm_fake_auth.cc.
Referenced by main(), and process_options().
◆ response_delay
unsigned int response_delay = 0 |
Definition at line 72 of file ntlm_fake_auth.cc.
Referenced by main(), and process_options().
◆ strip_domain_enabled
int strip_domain_enabled = 0 |
Definition at line 70 of file ntlm_fake_auth.cc.
Referenced by main(), and process_options().