Exemplo n.º 1
0
int cli_vm_execute_jit(const struct cli_all_bc *bcs, struct cli_bc_ctx *ctx, const struct cli_bc_func *func)
{
    UNUSEDPARAM(bcs);
    UNUSEDPARAM(ctx);
    UNUSEDPARAM(func);
    return CL_EBYTECODE;
}
Exemplo n.º 2
0
static cl_error_t post(int fd, int result, const char *virname, void *context)
{
    struct clamscan_cb_data *d = context;
    struct metachain *c;
    char str[128];

    UNUSEDPARAM(fd);
    UNUSEDPARAM(result);

    if (d != NULL)
        c = d->chain;

    if (c && c->nchains) {
        print_chain(c, str, sizeof(str));

        if (c->level == c->lastadd && !virname)
            free(c->chains[--c->nchains]);

        if (virname && !c->lastvir)
            c->lastvir = c->level;
    }

    if (c)
        c->level--;

    return CL_CLEAN;
}
Exemplo n.º 3
0
static inline int PERF_LOG_TRIES(int8_t acmode, int8_t bm_called, int32_t length) {
    UNUSEDPARAM(acmode);
    UNUSEDPARAM(bm_called);
    UNUSEDPARAM(length);

    return 0;
}
Exemplo n.º 4
0
///-------------------------------------------------------------------------
// @brief 
///-------------------------------------------------------------------------
void RotatingBlades::update( RenderInstanceTree& renderInstances, float elapsedTime, const Input& input )
{
    m_angle += 25.0f*elapsedTime;

    if (m_active)
    {
        //m_rotatingblades1.update( renderInstances, elapsedTime, m_world );
//#ifdef _DEBUG
//        renderInstances.back()->m_name = L"Rotating blades 1";
//#endif
        //m_rotatingblades2.update(renderInstances, elapsedTime, m_world, "Rotating blades 2");

        //glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, 1.0f);
        //glDepthMask(false);
        //TextureManager& tm = TextureManager::getInstance();

        //.glActiveTexture(GL_TEXTURE0);
        //glEnable(GL_TEXTURE_2D);
        //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
        //tm.activateTexture(SpaceSim::getInstance().getstd::stringSetting("blades"));

        //.glActiveTexture(GL_TEXTURE1);
        //glEnable(GL_TEXTURE_2D);
        //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
        //tm.activateTexture(SpaceSim::getInstance().getstd::stringSetting("bladesalpha"));

        //glDisable(GL_CULL_FACE);
        //glEnable(GL_BLEND);
        //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        //glEnable(GL_TEXTURE_2D);

        //glPushMatrix();
        //glTranslatef(m_position.x(), m_position.y(), m_position.z());
        //glRotatef(m_angle, 0.0f, 0.1f, 0.0f);
        //m_rotatingblades1.draw();
        //m_rotatingblades2.draw();
        //glPopMatrix();
        //glEnable(GL_CULL_FACE);
        //glDisable(GL_BLEND);
        //.glClientActiveTexture(GL_TEXTURE1);
        //glDisable(GL_TEXTURE_2D);
        //.glClientActiveTexture(GL_TEXTURE0);
        //glDisable(GL_TEXTURE_2D);
        //glDepthMask(true);
        //glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, 0.0f);
    }

    //Minimap
    //glPointSize(4.0f);
    //glColor4fv(Color::cyan().rgba());
    //glBegin(GL_POintS);
    //(m_position.x(), m_position.y(), m_position.z() + 25.0f);
    //glEnd();

    UNUSEDPARAM(input);
    UNUSEDPARAM(renderInstances);
    UNUSEDPARAM(elapsedTime);
}
Exemplo n.º 5
0
int cli_pcre_build(struct cli_matcher *root, long long unsigned match_limit, long long unsigned recmatch_limit, const struct cli_dconf *dconf)
{
    UNUSEDPARAM(root);
    UNUSEDPARAM(match_limit);
    UNUSEDPARAM(recmatch_limit);
    UNUSEDPARAM(dconf);

    cli_errmsg("cli_pcre_build: Cannot build PCRE expression without PCRE support\n");
    return CL_SUCCESS;
}
Exemplo n.º 6
0
int cli_pcre_recaloff(struct cli_matcher *root, struct cli_pcre_off *data, struct cli_target_info *info, cli_ctx *ctx)
{
    UNUSEDPARAM(root);
    UNUSEDPARAM(info);
    UNUSEDPARAM(ctx);
    if (data) {
        data->offset = NULL;
        data->shift = NULL;
    }
    return CL_SUCCESS;
}
Exemplo n.º 7
0
void hash_callback(int fd, unsigned long long size, const unsigned char *md5, const char *virname, void *ctx)
{
    struct cb_context *c = ctx;
    UNUSEDPARAM(fd);
    UNUSEDPARAM(virname);

    if (!c)
	return;
    c->virsize = size;
    strncpy(c->virhash, (const char *)md5, 32);
    c->virhash[32] = '\0';
}
Exemplo n.º 8
0
//-------------------------------------------------------------------------
// @brief 
//-------------------------------------------------------------------------
void ScorchMark::update( RenderInstanceTree& renderInstances, float elapsedTime, const Input& input )
{
    m_lifetime -= elapsedTime;

    //glDepthMask(FALSE);
    //glEnable(GL_BLEND);
    //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    //TextureManager& tm = TextureManager::getInstance();
    //.glActiveTexture(GL_TEXTURE0);
    //glEnable(GL_TEXTURE_2D);
    //if (m_playerscorch)
    //	tm.activateTexture(SpaceSim::getInstance().getstd::stringSetting("scorchmakerplayer"));
    //else
    //	tm.activateTexture(SpaceSim::getInstance().getstd::stringSetting("scorchmarkgun"));
    //.glActiveTexture(GL_TEXTURE1);
    //glEnable(GL_TEXTURE_2D);
    //tm.activateTexture(SpaceSim::getInstance().getstd::stringSetting("scorchmarkalpha"));
    //glPushMatrix();
    //glTranslatef(m_position.x(), m_position.y(), m_position.z());
    //if (Vector3::xAxis() == m_normal)
    //{
    //	glRotatef(-90, 0.0f, 1.0f, 0.0f);
    //}
    //else if (Vector3::yAxis() == m_normal)
    //{
    //	glRotatef(90, 1.0f, 0.0f, 0.0f);
    //}
    //else if (-Vector3::xAxis() == m_normal)
    //{
    //	glRotatef(90, 0.0f, 1.0f, 0.0f);
    //}
    //else if (-Vector3::yAxis() == m_normal)
    //{
    //	glRotatef(-90, 1.0f, 0.0f, 0.0f);
    //}
    //else if (Vector3::zAxis() == m_normal)
    //	glRotatef(180, 0.0f, 1.0f, 0.0f);
    //m_scorchmark.setColor(m_material.getDiffuse());
    //m_scorchmark.draw();
    //glPopMatrix();
    //.glActiveTexture(GL_TEXTURE1);
    //glDisable(GL_TEXTURE_2D);
    //.glActiveTexture(GL_TEXTURE0);
    //glDisable(GL_TEXTURE_2D);
    //glDisable(GL_TEXTURE_2D);
    //glDisable(GL_BLEND);
    //glDepthMask(TRUE);
    UNUSEDPARAM(renderInstances);
    UNUSEDPARAM(input);
}
static void pppSendCommMessageInd(PppControlS * pppControl, MessageBufS * ptr)
{
	U_CHAR *buf = pppControl->OutMessageContainer.Buf;
	U_CHAR *inbuf = (U_CHAR *) ptr->Buf;
	U_INT inLen = ptr->Length;
	U_INT index = 0;
	U_SHORT fcs = PPP_INITFCS;

	PPP_LOG_ENTRY(MDB_pppSendCommMessageInd);
	UNUSEDPARAM(fcs);

	if (!pppControl->lcpXmitParams.isAcfcEnabled) {
		PPP_LOG();
		PPP_APPEND(buf, index, PPP_ALLSTATIONS, fcs);
		PPP_APPEND(buf, index, PPP_UI, fcs);
	}

	PPP_APPEND(buf, index, PPP_IP, fcs);
	PPP_MEMCPY(&buf[index], inbuf, inLen);
	index += inLen;

	pppControl->OutMessageContainer.Length = index;

	PppCreateMessageFrameIp();

	PppSendToCallback(pppControl, pppControl->OutFrameContainer.Buf, pppControl->OutFrameContainer.Length);

	PPP_LOG_EXIT();

}
Exemplo n.º 10
0
void
fileblobPartialSet(fileblob *fb, const char *fullname, const char *arg)
{
    UNUSEDPARAM(arg);

    if(fb->b.name)
        return;

    assert(fullname != NULL);

    cli_dbgmsg("fileblobPartialSet: saving to %s\n", fullname);

    fb->fd = open(fullname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY|O_EXCL, 0600);
    if(fb->fd < 0) {
        cli_errmsg("fileblobPartialSet: unable to create file: %s\n",fullname);
        return;
    }
    fb->fp = fdopen(fb->fd, "wb");

    if(fb->fp == NULL) {
        cli_errmsg("fileblobSetFilename: fdopen failed\n");
        close(fb->fd);
        return;
    }
    blobSetFilename(&fb->b, fb->ctx ? fb->ctx->engine->tmpdir : NULL, fullname);
    if(fb->b.data)
        if(fileblobAddData(fb, fb->b.data, fb->b.len) == 0) {
            free(fb->b.data);
            fb->b.data = NULL;
            fb->b.len = fb->b.size = 0;
            fb->isNotEmpty = 1;
        }
    fb->fullname = cli_strdup(fullname);
}
Exemplo n.º 11
0
static int hash_match(const struct regex_matcher *rlist, const char *host, size_t hlen, const char *path, size_t plen, int *prefix_matched)
{
	const char *virname;
#if 0
	char s[1024];
	strncpy(s, host, hlen);
	strncpy(s+hlen, path, plen);
	s[hlen+plen] = '\0';
	cli_dbgmsg("hash lookup for: %s\n",s);
#endif
    UNUSEDPARAM(prefix_matched);

	if(rlist->sha256_hashes.bm_patterns) {
	    const char hexchars[] = "0123456789ABCDEF";
	    unsigned char h[65];
	    unsigned char sha256_dig[32];
	    unsigned i;
        void *sha256;

        sha256 = cl_hash_init("sha256");
        if (!(sha256))
            return CL_EMEM;

        cl_update_hash(sha256, (void *)host, hlen);
        cl_update_hash(sha256, (void *)path, plen);
        cl_finish_hash(sha256, sha256_dig);

	    for(i=0;i<32;i++) {
		h[2*i] = hexchars[sha256_dig[i]>>4];
		h[2*i+1] = hexchars[sha256_dig[i]&0xf];
	    }
	    h[64]='\0';
	    cli_dbgmsg("Looking up hash %s for %s(%u)%s(%u)\n", h, host, (unsigned)hlen, path, (unsigned)plen);
#if 0
	    if (prefix_matched) {
		if (cli_bm_scanbuff(sha256_dig, 4, &virname, NULL, &rlist->hostkey_prefix,0,NULL,NULL,NULL) == CL_VIRUS) {
		    cli_dbgmsg("prefix matched\n");
		    *prefix_matched = 1;
		} else
		    return CL_SUCCESS;
	    }
#endif
	    if (cli_bm_scanbuff(sha256_dig, 32, &virname, NULL, &rlist->sha256_hashes,0,NULL,NULL,NULL) == CL_VIRUS) {
		cli_dbgmsg("This hash matched: %s\n", h);
		switch(*virname) {
		    case 'W':
			cli_dbgmsg("Hash is whitelisted, skipping\n");
			break;
		    case '1':
			return CL_PHISH_HASH1;
		    case '2':
			return CL_PHISH_HASH2;
		    default:
			return CL_PHISH_HASH0;
		}
	    }
	}
	return CL_SUCCESS;
}
Exemplo n.º 12
0
void game::draw( void )
{
    const view_data& vp = mCamPtr->view_params();

    UNUSEDPARAM( vp );


    application< game >::draw();
}
Exemplo n.º 13
0
static void gpt_printSectors(cli_ctx *ctx, size_t sectorsize)
{
#ifdef DEBUG_GPT_PARSE
    struct gpt_header phdr, shdr;
    off_t ppos = 0, spos = 0;
    size_t pptable_len, sptable_len, maplen;
    uint64_t ptableLastLBA, stableLastLBA;

    /* sector size calculation */
    sectorsize = GPT_DEFAULT_SECTOR_SIZE;

    maplen = (*ctx->fmap)->real_len;

    ppos = 1 * sectorsize; /* sector 1 (second sector) is the primary gpt header */
    spos = maplen - sectorsize; /* last sector is the secondary gpt header */

    /* read in the primary and secondary gpt headers */
    if (fmap_readn(*ctx->fmap, &phdr, ppos, sizeof(phdr)) != sizeof(phdr)) {
        cli_dbgmsg("cli_scangpt: Invalid primary GPT header\n");
        return;
    }
    if (fmap_readn(*ctx->fmap, &shdr, spos, sizeof(shdr)) != sizeof(shdr)) {
        cli_dbgmsg("cli_scangpt: Invalid secondary GPT header\n");
        return;
    }

    pptable_len = phdr.tableNumEntries * phdr.tableEntrySize;
    sptable_len = shdr.tableNumEntries * shdr.tableEntrySize;
    ptableLastLBA = (phdr.tableStartLBA + (pptable_len / sectorsize)) - 1;
    stableLastLBA = (shdr.tableStartLBA + (sptable_len / sectorsize)) - 1;

    gpt_parsemsg("0: MBR\n");
    gpt_parsemsg("%llu: Primary GPT Header\n", phdr.currentLBA);
    gpt_parsemsg("%llu-%llu: Primary GPT Partition Table\n", phdr.tableStartLBA, ptableLastLBA);
    gpt_parsemsg("%llu-%llu: Usable LBAs\n", phdr.firstUsableLBA, phdr.lastUsableLBA);
    gpt_parsemsg("%llu-%llu: Secondary GPT Partition Table\n", shdr.tableStartLBA, stableLastLBA);
    gpt_parsemsg("%llu: Secondary GPT Header\n", phdr.backupLBA);
#else
    UNUSEDPARAM(ctx);
    UNUSEDPARAM(sectorsize);
    return;
#endif
}
Exemplo n.º 14
0
static cl_error_t pre(int fd, const char *type, void *context)
{
    struct metachain *c;
    struct clamscan_cb_data *d;

    UNUSEDPARAM(fd);
    UNUSEDPARAM(type);

    if (!(context))
        return CL_CLEAN;
    d = (struct clamscan_cb_data *)context;
    c = d->chain;
    if (c == NULL)
        return CL_CLEAN;

    c->level++;

    return CL_CLEAN;
}
Exemplo n.º 15
0
///-----------------------------------------------------------------------------
///! @brief   TODO enter a description
///! @remark
///-----------------------------------------------------------------------------
void MouseController::internalActionSetup(InputActions::ActionType inputAction, const tinyxml2::XMLAttribute* input)
{
    UNUSEDPARAM(inputAction);

    InputDefines::MouseControlDefinitions mouseDefinitions;
    unsigned int inputHash = hashString(input->Value());
    InputDefines::MouseControlDefinitions::MouseInput mouseInput = mouseDefinitions.FindControllerInputIdForHashId(inputHash);

    m_physicalKeyToAction.insert(PhysicalInputPair(mouseInput, inputAction));
}
Exemplo n.º 16
0
void *SzAlloc(void *p, size_t size)
{
    UNUSEDPARAM(p);
  if (size == 0)
    return 0;
  #ifdef _SZ_ALLOC_DEBUG
  fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount);
  g_allocCount++;
  #endif
  return malloc(size);
}
Exemplo n.º 17
0
void *__lzma_wrap_alloc(void *unused, size_t size) { 
    UNUSEDPARAM(unused);
    if(!size || size > CLI_MAX_ALLOCATION)
	return NULL;
    if(!size || size > CLI_MAX_ALLOCATION) {
	cli_dbgmsg("lzma_wrap_alloc(): Attempt to allocate %lu bytes.\n", (unsigned long int) size);
	return NULL;
    }

    return cli_calloc(1, size);
}
Exemplo n.º 18
0
static void cli_untgz_cleanup(char *path, gzFile infile, FILE *outfile, int fdd)
{
    UNUSEDPARAM(fdd);
    cli_dbgmsg("in cli_untgz_cleanup()\n");
    if (path != NULL)
        free (path);
    if (infile != NULL) 
        gzclose (infile);
    if (outfile != NULL)
        fclose(outfile);
}
Exemplo n.º 19
0
static const void *mem_need(fmap_t *m, size_t at, size_t len, int lock) { /* WIN32 */
    UNUSEDPARAM(lock);
    if(!len) {
	return NULL;
    }
    at += m->nested_offset;
    if(!CLI_ISCONTAINED(0, m->real_len, at, len)) {
	return NULL;
    }

    return (void *)((char *)m->data + at);
}
Exemplo n.º 20
0
char *get_hostid(void *cbdata)
{
    UNUSEDPARAM(cbdata);

    if (!strcmp(hostid, "none"))
        return NULL;

    if (!is_valid_hostid())
        return strdup(STATS_ANON_UUID);

    return strdup(hostid);
}
Exemplo n.º 21
0
void SzFree(void *p, void *address)
{
    UNUSEDPARAM(p);
  #ifdef _SZ_ALLOC_DEBUG
  if (address != 0)
  {
    g_allocCount--;
    fprintf(stderr, "\nFree; count = %10d", g_allocCount);
  }
  #endif
  free(address);
}
Exemplo n.º 22
0
/* FTW callback for scanning in non IDSESSION mode
 * Returns SUCCESS or BREAK on success, CL_EXXX on error */
static int serial_callback(STATBUF *sb, char *filename, const char *path, enum cli_ftw_reason reason, struct cli_ftw_cbdata *data) {
    struct client_serial_data *c = (struct client_serial_data *)data->data;
    int sockd, ret;
    const char *f = filename;

    UNUSEDPARAM(sb);

    if(chkpath(path))
	return CL_SUCCESS;
    c->files++;
    switch(reason) {
    case error_stat:
	logg("!Can't access file %s\n", path);
	c->errors++;
	return CL_SUCCESS;
    case error_mem:
	logg("!Memory allocation failed in ftw\n");
	c->errors++;
	return CL_EMEM;
    case warning_skipped_dir:
	logg("^Directory recursion limit reached\n");
    case warning_skipped_link:
	return CL_SUCCESS;
    case warning_skipped_special:
	logg("^%s: Not supported file type\n", path);
	c->errors++;
	return CL_SUCCESS;
    case visit_directory_toplev:
	if(c->scantype >= STREAM)
	    return CL_SUCCESS;
	f = path;
	filename = NULL;
    case visit_file:
	break;
    }

    if((sockd = dconnect()) < 0) {
	if(filename) free(filename);
	c->errors++;
	return CL_EOPEN;
    }
    ret = dsresult(sockd, c->scantype, f, &c->printok, &c->errors);
    if(filename) free(filename);
    closesocket(sockd);
    if(ret < 0) {
	c->errors++;
	return CL_EOPEN;
    }
    c->infected += ret;
    if(reason == visit_directory_toplev)
	return CL_BREAK;
    return CL_SUCCESS;
}
Exemplo n.º 23
0
int cli_pcre_scanbuf(const unsigned char *buffer, uint32_t length, const char **virname, struct cli_ac_result **res, const struct cli_matcher *root, struct cli_ac_data *mdata, const struct cli_pcre_off *data, cli_ctx *ctx)
{
    UNUSEDPARAM(buffer);
    UNUSEDPARAM(length);
    UNUSEDPARAM(virname);
    UNUSEDPARAM(res);
    UNUSEDPARAM(root);
    UNUSEDPARAM(mdata);
    UNUSEDPARAM(data);
    UNUSEDPARAM(ctx);

    cli_errmsg("cli_pcre_scanbuf: Cannot scan buffer with PCRE expression without PCRE support\n");
    return CL_SUCCESS;
}
Exemplo n.º 24
0
//-----------------------------------------------------------------------------
//! @brief   TODO enter a description
//! @remark
//-----------------------------------------------------------------------------
void GunTurret::initialise(const ShaderInstance& shaderInstance)
{
    UNUSEDPARAM(shaderInstance);

    const SettingsManager& sm = getGameResource().getSettingsManager();
    const ISetting<std::string>* modelString = sm.getSetting<std::string>("Guns");
    if (modelString)
    {
        m_drawableObject = getWriteableGameResource().getModelManager().LoadModel(m_resource, shaderInstance, modelString->getData());
    }

    Super::initialise(shaderInstance);
}
Exemplo n.º 25
0
void *SzAllocTemp(void *p, size_t size)
{
    UNUSEDPARAM(p);
  if (size == 0)
    return 0;
  #ifdef _SZ_ALLOC_DEBUG
  fprintf(stderr, "\nAlloc_temp %10d bytes;  count = %10d", size, g_allocCountTemp);
  g_allocCountTemp++;
  #ifdef _WIN32
  return HeapAlloc(GetProcessHeap(), 0, size);
  #endif
  #endif
  return malloc(size);
}
Exemplo n.º 26
0
///-------------------------------------------------------------------------
// @brief 
///-------------------------------------------------------------------------
void RotatingBlades::handleMessage( const MessageSystem::Message& msg )
{
    UNUSEDPARAM(msg);
    //const ActivationMessage& activateMsg = (const ActivationMessage&)msg;
    //setActive(activateMsg.shouldActivate());
    if (msg.getMessageId() == MESSAGE_ID(CreatedRenderResourceMessage))
    {
        const MessageSystem::CreatedRenderResourceMessage& renderResourceMsg = static_cast<const MessageSystem::CreatedRenderResourceMessage&>(msg);
        renderResourceMsg.GetData();
        m_renderHandle = renderResourceMsg.GetData()->m_renderResourceHandle;
        //Store the render object reference we get back and the things it can do
        m_initialisationDone = true;
    }
}
Exemplo n.º 27
0
void SzFreeTemp(void *p, void *address)
{
    UNUSEDPARAM(p);
  #ifdef _SZ_ALLOC_DEBUG
  if (address != 0)
  {
    g_allocCountTemp--;
    fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp);
  }
  #ifdef _WIN32
  HeapFree(GetProcessHeap(), 0, address);
  return;
  #endif
  #endif
  free(address);
}
Exemplo n.º 28
0
int cli_process_ooxml(cli_ctx *ctx)
{
#if HAVE_LIBXML2 && HAVE_JSON
    uint32_t loff = 0;
    int tmp = CL_SUCCESS;

    cli_dbgmsg("in cli_process_ooxml\n");
    if (!ctx) {
        return CL_ENULLARG;
    }

    /* find "[Content Types].xml" */
    tmp = unzip_search_single(ctx, "[Content_Types].xml", 18, &loff);
    if (tmp == CL_ETIMEOUT) {
        cli_json_parse_error(ctx->wrkproperty, "OOXML_ERROR_TIMEOUT");
        return CL_ETIMEOUT;
    }
    else if (tmp != CL_VIRUS) {
        cli_dbgmsg("cli_process_ooxml: failed to find ""[Content_Types].xml""!\n");
        cli_json_parse_error(ctx->wrkproperty, "OOXML_ERROR_NO_CONTENT_TYPES");
        return CL_EFORMAT;
    }
    cli_dbgmsg("cli_process_ooxml: found ""[Content_Types].xml"" @ %x\n", loff);

    tmp = unzip_single_internal(ctx, loff, ooxml_content_cb);
    if (tmp == CL_ETIMEOUT)
        cli_json_parse_error(ctx->wrkproperty, "OOXML_ERROR_TIMEOUT");
    else if (tmp == CL_EMEM)
        cli_json_parse_error(ctx->wrkproperty, "OOXML_ERROR_OUTOFMEM");
    else if (tmp == CL_EMAXSIZE)
        cli_json_parse_error(ctx->wrkproperty, "OOXML_ERROR_EMAXSIZE");
    else if (tmp == CL_EMAXFILES)
        cli_json_parse_error(ctx->wrkproperty, "OOXML_ERROR_EMAXFILES");

    return tmp;
#else
    UNUSEDPARAM(ctx);
    cli_dbgmsg("in cli_process_ooxml\n");
#if !HAVE_LIBXML2
    cli_dbgmsg("cli_process_ooxml: libxml2 needs to enabled!\n");
#endif
#if !HAVE_JSON
    cli_dbgmsg("cli_process_ooxml: libjson needs to enabled!\n");
#endif
    return CL_SUCCESS;
#endif
}
Exemplo n.º 29
0
/*ARGSUSED*/
void
blobSetFilename(blob *b, const char *dir, const char *filename)
{
    assert(b != NULL);
    assert(b->magic == BLOBCLASS);
    assert(filename != NULL);

    UNUSEDPARAM(dir);

    cli_dbgmsg("blobSetFilename: %s\n", filename);

    if(b->name)
        free(b->name);

    b->name = cli_strdup(filename);

    if(b->name)
        sanitiseName(b->name);
}
static void chapSendAuthSuccessOrFail(PppControlS *pppControl, U_CHAR success_or_fail_code)
{
	const char *message[] = { "Authentication Successful", "Authentication Failed" };
	char *pMessage = (char *)message[success_or_fail_code - CHAP_AUTHENTICATE_SUCCESS];
	U_CHAR *buf = pppControl->OutMessageContainer.Buf;
	U_INT index = 0;
	U_INT lenIndex;
	U_SHORT len = PPP_HDRLEN;
	U_SHORT fcs = PPP_INITFCS;
	UNUSEDPARAM(fcs);

	if (!pppControl->lcpXmitParams.isAcfcEnabled) {
		PPP_APPEND(buf, index, PPP_ALLSTATIONS, fcs);
		PPP_APPEND(buf, index, PPP_UI, fcs);
	}

	PPP_APPEND_SHORT(buf, index, PPP_CHAP, fcs);

	PPP_APPEND(buf, index, success_or_fail_code, fcs);
	PPP_APPEND(buf, index, pppControl->LastXmitId++, fcs);

	lenIndex = index;

	index += 2;

	while (*pMessage != '\0') {
		PPP_APPEND(buf, index, *pMessage, fcs);
		pMessage++;
		len++;
	}

	PPP_APPEND_SHORT(buf, lenIndex, len, fcs);

	PPP_APPEND_FCS(buf, index, fcs);

	pppControl->OutMessageContainer.Length = index;

	PppCreateMessageFrame();

	PppSendToCallback(pppControl, pppControl->OutFrameContainer.Buf, pppControl->OutFrameContainer.Length);
}