eval

2019-11-22:xss绕过笔记

谁说胖子不能爱 提交于 2019-12-05 06:29:44
xss变形 大小写混合,sCRipt 重复写,scrscriptipt 通过某些标签来src属性,构造pyload,src找不到数据源的时候内部会出错,此时使用onerror触发,或iframe标签,<iframe scr="javascript:alert(1)">,svg标签,<svg/onload=alert(a)> 通过一些属性,background,data,code,posters等属性 通过某些时间,onclick,onload,onerror,onstart等 有圆括号限制的,<a onmouseover="javascript:window.onerror=alert;throw 1>123</a> <img src=x onerror="javascript:window.onerror=alert;throw 1"> xss运行条件 1,独立的script标签 2,某些标签内部 js伪协议 伪协议不同于因特网上所真实存在的如http://,https://,ftp://,而是为关联应用程序而使用的.如:tencent://(关联QQ),data:(用base64编码来在浏览器端输出二进制文件),还有就是javascript: 这个特殊的协议类型声明了URL的主体是任意的javascript代码,它由javascript的解释器运行。如果javascript

PhpStudy BackDoor2019 深度分析

北慕城南 提交于 2019-12-05 06:27:50
笔者《Qftm》原文发布《合天》: https://mp.weixin.qq.com/s?__biz=MjM5MTYxNjQxOA==&mid=2652852661&idx=1&sn=1dd018a6694b79e18087e31ac44d44fa&chksm=bd592d788a2ea46eae02350200b61e29bb944c5c444bd5c1282d58a3d43557104deb31c1d214&mpshare=1&scene=23&srcid=&sharer_sharetime=1574268683033&sharer_shareid=8f1d1cefeab55e526c6752e59ae2efde#rd 关于《PhpStudy BackDoor》风波已经过去有一段时间了,由于,前段时间一直忙于其它事情QAQ,今天有时间对该事件重新回溯&深度分析。 *严正声明:本文仅限于技术讨论与分享,严禁用于非法途径 背景分析 2019年9月20日,杭州市公安局举行新闻通报会,通报今年以来组织开展打击涉网违法犯罪暨“净网2019”专项行动战果,通报内容中提到国内著名的PHP调试环境程序集成包Phpstudy软件遭受到以马某为首的国内黑客团伙攻击并被植入后门。 Phpstudy集成环境包在国内的使用用户逾百万,据悉,此次后门攻击事件可追溯到2016年

Pythonic way to eval all octal values in a string as integers

泄露秘密 提交于 2019-12-05 04:49:51
So I've got a string that looks like "012 + 2 - 01 + 24" for example. I want to be able to quickly (less code) evaluate that expression... I could use eval() on the string, but I don't want 012 to be represented in octal form (10), I want it to be represented as an int (12). My solution for this works, but it is not elegant. I am sort of assuming that there is a really good pythonic way to do this. My solution: #expression is some string that looks like "012 + 2 - 01 + 24" atomlist = [] for atom in expression.split(): if "+" not in atom and "-" not in atom: atomlist.append(int(atom)) else:

Python - Evaluate math expression within string [duplicate]

馋奶兔 提交于 2019-12-05 03:57:59
This question already has answers here : Evaluating a mathematical expression in a string (11 answers) Closed 4 months ago . I have a question concerning evaluation of math expression within a string. For example my string is following: my_str='I have 6 * (2 + 3) apples' I am wondering how to evaluate this string and get the following result: 'I have 30 apples' Is the any way to do this? Thanks in advance. P.S. python's eval function does not help in this case. It raised an error, when trying to evaluate with the eval function. Burhan Khalid Here's my attempt: >>> import string >>> s = 'I have

Use of eval in Python, MATLAB, etc [duplicate]

佐手、 提交于 2019-12-05 03:37:55
This question already has answers here : Why is using 'eval' a bad practice? (8 answers) Closed 6 years ago . I do know that one shouldn't use eval . For all the obvious reasons (performance, maintainability, etc.). My question is more on the side – is there a legitimate use for it? Where one should use it rather than implement the code in another way. Since it is implemented in several languages and can lead to bad programming style, I assume there is a reason why it's still available. First, here is Mathwork's list of alternatives to eval . You could also be clever and use eval() in a

postman引入外部js文件

落花浮王杯 提交于 2019-12-05 03:18:51
1、启动tomcat,确定路径: http://localhost:8080/d/forgeJS.js 2、postman Pre-request Script console.log(pm.environment.get("variable_key1")); if(!pm.globals.has("forgeJS")){ pm.sendRequest('http://localhost:8080/d/forgeJS.js', function (err, res) { if (err) { console.log(err);} else { pm.globals.set("forgeJS", res.text());} })} eval(postman.getGlobalVariable("forgeJS")); 来源: https://www.cnblogs.com/mobies/p/11902223.html

tensorflow零起点快速入门(3)

不问归期 提交于 2019-12-05 02:57:11
创造并运行数据 创造了-3到3的32条数据,然后通过sess.run获取并显示输出数据。 x=tf.linspace(-3.0,3.0,32) print(x) sess=tf.Session() result=sess.run(x) print(result) 运行数据的另一种方法是使用eval(),括号里面添加session部分,否则失效报错: (xsum=tf.summary.FileWriter(".",sess.graph)只是一条额外的语句用于保存图) xsum=tf.summary.FileWriter(".",sess.graph) xss=x.eval(session=sess) print(xss) sess.close()    运行数据的另一种方式 使用互动会话模式可以在eval中,不用添加session参数而运行。 另外可阅读: https://blog.csdn.net/jiaoyangwm/article/details/79248535 sess=tf.InteractiveSession() xss=x.eval() print(xss)    使用tensorflow定义函数表达式 延续之前的代码,这里定义了函数: 参阅网址: https://baijiahao.baidu.com/s?id=1621087027738177317&wfr

when to use DataFrame.eval() versus pandas.eval() or python eval()

蹲街弑〆低调 提交于 2019-12-05 00:44:56
I have a few dozen conditions (e.g., foo > bar ) that I need to evaluate on ~1MM rows of a DataFrame , and the most concise way of writing this is to store these conditions as a list of strings and create a DataFrame of boolean results (one row per record x one column per condition). (User input is not being evaluated.) In the quest for premature optimization, I am trying to determine whether I should write these conditions for evaluation within DataFrame (e.g., df.eval("foo > bar") or just leave it to python as in eval("df.foo > df.bar") According to the documentation on enhancing eval

Perl: $SIG{__DIE__}, eval { } and stack trace

这一生的挚爱 提交于 2019-12-05 00:31:33
I have a piece of Perl code somewhat like the following (strongly simplified): There are some levels of nested subroutine calls (actually, methods), and some of the inner ones do their own exception handling: sub outer { middle() } sub middle { eval { inner() }; if ( my $x = $@ ) { # caught exception if (ref $x eq 'ARRAY') { print "we can handle this ..."; } else { die $x; # rethrow } } } sub inner { die "OH NOES!" } Now I want to change that code so that it does the following: print a full stack trace for every exception that "bubbles up" all the way to the outermost level ( sub outer ).

ASP .NET - What's going on behind an Eval()?

烂漫一生 提交于 2019-12-05 00:16:33
问题 I'm trying to understand how Eval() works for a specific purpose. I'm working on a project I don't really know and I need to read some data and put them in drop down list. These data are already read and are displayed inside an ItemTemplate. I noticed there are read using the Eval() method. Something like: <ItemTemplate> <a href="...=<%# Eval("foo") %>></a> </ItemTemplate> I need to know where Eval is getting these data from in order to discover where I should read them for my drop down list!