eval

redis lua查询和删除keys

自作多情 提交于 2019-11-27 05:42:08
eval "return redis.call('keys',KEYS[1])" 1 adv* eval "return redis.call('keys',KEYS[1])" 1 * eval "return redis.call('keys',ARGV[1])" 0 a* eval "return redis.call('del',unpack(redis.call('keys',ARGV[1])))" 0 adv* eval "return redis.call('del',unpack(redis.call('keys',KEYS[1])))" 1 p* eval "return redis.call('keys',ARGV[1])" 0 * 来源: https://blog.csdn.net/weixin_44018338/article/details/99461886

HTML注入:利用HTML标签绕过CSP

半腔热情 提交于 2019-11-27 05:39:59
先让我们看看如下这个web应用示例: <html> <meta http?equiv="Content?Security?Policy" content="script?src 'nonce?...' 'unsafe?eval'"> <div id="template_target"></div> <script type="application/template" id="template"> Hello World! 1 + 1 = {{ 1 + 1 }} </script> Your search is <?php echo $_GET['q']; ?> <script nonce="..."> let template = document.getElementById('template'); template_target.innerHTML = template.innerText.replace(/{{(.?)}}/g,eval) </script> </html> 以上这段简单的HTML代码可能反映了现在渗透测试人员经常碰到的模板化Web应用。某些模板内容存储在Web页面中,然后再转换为HTML代码的一部分。上段代码中含有id为 template 的HTML元素内容先被读取,然后再执行 {{}} 括号内的内容,最后在某个单独HTML元素中呈现出来。 Hello

python的eval函数

不羁岁月 提交于 2019-11-27 05:32:54
今天学习到了一个python的新函数eval() eval函数就是实现list、dict、tuple与str之间的转化str函数把list,dict,tuple转为为字符串 a = "[[1,2], [3,4], [5,6], [7,8], [9,0]]" b = eval(a) b Out[3]: [[1, 2], [3, 4], [5, 6], [7, 8], [9, 0]] type(b) Out[4]: list a = "{1: 'a', 2: 'b'}" b = eval(a) b Out[7]: {1: 'a', 2: 'b'} type(b) Out[8]: dict a = "([1,2], [3,4], [5,6], [7,8], (9,0))" b = eval(a) b Out[11]: ([1, 2], [3, 4], [5, 6], [7, 8], (9, 0))    来源: https://www.cnblogs.com/silenceki/p/11347662.html

Process mathematical equations in php

依然范特西╮ 提交于 2019-11-27 05:27:38
A user is allowed to enter any mathematical equation they like (with one variable): x + 5 1 - x/2 (x/3) * (56/13) These are stored as strings in the database. When they are retrieved I need to substitute 'x' for a number and check the value of the equation. How could I do this? I was considering writing a parser to deconstruct the strings and turn them into equations, however this sounds expensive and problematic. The other option is to pass them through eval (but I'm not a great fan of using eval if I can help it). Any ideas? UPDATE: I also need to be able to get the boolean value of

Variable scope + eval in Clojure

核能气质少年 提交于 2019-11-27 05:01:26
In Clojure, (def x 3) (eval '(prn x)) prints 3, whereas (let [y 3] (eval '(prn y))) and (binding [z 3] (eval '(prn z))) generate an 'Unable to resolve var' exception. According to http://clojure.org/evaluation , eval , load-string , etc generate temporary namespaces to evaluate their contents. Therefore, I'd expect neither of the above code samples to work, since (def x 3) is done in my current namespace, not the one created by eval . Why does the first code sample work and not the last two? How can I eval a form with bound variables without using def ? Thanks! danlei 1.: The reason this doesn

How do I use variables to set properties in VBA (Excel)

。_饼干妹妹 提交于 2019-11-27 04:54:10
Take this code: With ActiveSheet.Shapes.AddShape(msoShapeRectangle, x, y, w, h).TextFrame .Parent.Line.Visible = False .Parent.Fill.ForeColor.RGB = RGB(r, g, b) End With Is there any VBA way to "execute" or "evaluate" like can be done in perl/python/... such that the text .Parent.Line.Visible can be drawn from a variable (or cell value), rather than hard coded? ParentLine = ".Parent.Line.Visible" ParentLineValue = "False" With ActiveSheet.Shapes.AddShape(msoShapeRectangle, x, y, w, h).TextFrame **eval**(ParentLine & "=" & ParentLineValue) .Parent.Fill.ForeColor.RGB = RGB(r, g, b) End With EDIT

What are the Alternatives to eval in JavaScript?

混江龙づ霸主 提交于 2019-11-27 04:37:11
问题 I have a little bit of code that looks just like this: function StrippedExample(i1, i2, i3, i4, i5, i6, i7, i8) { this.i = []; for (var i=1,j=0 ;i<9;i++) { var k = eval("i"+i); if (k > 0) { this.i[j++] = k; } } } FireBug profiler claims that second longest function is eval(), taking up to nearly 6% of the run time. Everyone says eval is EVIL (as in bad) and slow (as I have found), but I can't really do anything else - the server simply pulls the data out the database and pushes to the browser

ILOG Diagrammer.NET 1.000 License Key

杀马特。学长 韩版系。学妹 提交于 2019-11-27 04:06:21
今天公布 ILOG Diagrammer.NET & ASPNET 1.000组件到2008-3-21有效的license //for Diagrammer.NET 1.000 License Site:jssy.cnblogs.com License Key:EVAL Diagrammer.NET 1.000 21-Mar-2008 33UWX2TC8YFA //for Diagrammer.ASPNET 1.000 License Site:jssy.cnblogs.com License Key:EVAL Diagrammer.ASPNET 1.000 21-Mar-2008 T6WY00YJGUBZ 仅供学习用,应用于商业用途请购买正版。 转载于:https://www.cnblogs.com/jssy/archive/2007/07/21/826842.html 来源: https://blog.csdn.net/weixin_30876945/article/details/99359747

Alternatives to JavaScript eval() for parsing JSON

夙愿已清 提交于 2019-11-27 03:59:41
问题 Quick Question. Eval in JavaScript is unsafe is it not? I have a JSON object as a string and I need to turn it into an actual object so I can obtain the data: function PopulateSeriesFields(result) { data = eval('(' + result + ')'); var myFakeExample = data.exampleType } If it helps I am using the $.ajax method from jQuery. Thanks 回答1: Well, safe or not, when you are using jQuery, you're better to use the $.getJSON() method, not $.ajax(): $.getJSON(url, function(data){ alert(data.exampleType);

PHP函数使用详解

邮差的信 提交于 2019-11-27 03:32:05
1.eval() eval() 函数把字符串按照 PHP 代码来计算。必须是合法的 PHP 代码,且必须以分号结尾。 注意: 如果没有在代码字符串中调用 return 语句,则返回 NULL。如果代码中存在解析错误,则 eval() 函数返回 false。 例: 运行字符串形式的计算表达式 $str = '2*3*4'; $res = eval("return $str;"); print_r($res); //输出24 来源: https://blog.csdn.net/dongjinxin0621/article/details/99324895