Tag:eval

  • Introduction to the use of evil Eval and new function

    Time:2022-5-24

    code: Copy codeThe code is as follows: //Friendly reminder: for the safety of your fingers, please run it under chrome ‘alert(“hello”)’.replace(/.+/, eval); ‘alert(“hello”)’.replace(/.+/, function(m){new Function(m)();}); var i = 0; eval(new Array(101).join(‘alert(++i);’)); var i = 0; new Function(new Array(101).join(‘alert(++i);’))(); Explanation:1、string. Replace (regexp, replacement): replacement can be function In this case, the function is invoked for each […]

  • Perl Eval function usage instance

    Time:2021-12-24

    As a scripting language, Perl can generate and execute code in real time. This feature can delay the compilation of code until runtime, so it is also called “dynamic code”. In addition, Perl also provides exception handling mechanism like Java and C + +. This article will discuss the function of dynamic code and exception […]

  • Usage example of Eval in shell

    Time:2021-12-24

    Function Description: tell the shell to take out the parameters of Eval and re calculate the contents of the parameters.Syntax: Eval [parameter]Supplementary note: Eval can read a series of parameters, and then execute them according to the characteristics of the parameters themselves.Parameters: unlimited number of parameters, separated by semicolons.1. Scan the command line twice before […]

  • How to intercept dynamic code based on JS

    Time:2021-2-10

    This article mainly introduces the JS injection Eval, function system functions and intercept dynamic code, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to text Now many websites have all kinds of front-end anti crawling means. No matter what […]

  • Analysis of several usages of Eval, an important function of Python

    Time:2021-1-3

    This article mainly introduces the python important function Eval a variety of usage analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to 1. The parameter will be parsed and evaluated as a python expression (technically a condition list) […]

  • Mongodb Eval executing server-side script

    Time:2020-1-27

    On the server side, JavaScript script can be executed through db.eval function, or JavaScript script can be saved in database, and then called in other database commands. 1、 Db.eval execute server-side script Using the db.eval function, you can execute JavaScript script on the mongodb server. This function first passes the given JavaScript string to the […]

  • Some optimizations and precautions of using Lua in redis

    Time:2020-1-18

    Eval, evalsha command RedisAvailable from version 2.6.0evalCommand, via the built-inLuaInterpreter, which allows the user to execute a paragraphLuaScript and return data. becauseRedisThe characteristics of single thread model can guarantee theAtomicity(Lua is only used in recent projects). Please move to official documents for detailed usage. Script performance RedisIt ensures the atomicity of script execution, so before […]

  • Introduction to Eval and New Function

    Time:2019-9-21

    Code: Copy codeThe code is as follows: // Friendly Reminder: For your finger safety, please run under Chrome‘alert(“hello”)’.replace(/.+/, eval); ‘alert(“hello”)’.replace(/.+/, function(m){new Function(m)();}); var i = 0; eval(new Array(101).join(‘alert(++i);’)); var i = 0; new Function(new Array(101).join(‘alert(++i);’))(); Interpretation:1. string. replace (regexp, replacement): replacement can be a function. In this case, the function is invoked for each match, […]

  • Explanation of the usage of the Linux command Eval

    Time:2019-9-9

    1. eval command-line Where command-line is a common command line typed on the terminal. When Eval is placed in front of it, however, the result is that the shell scans it twice before executing the command line. Such as: pipe=”|” eval ls $pipe wc -l When the shell scans the command line for the first […]

  • Detailed description of instance_eval method in Ruby and its comparison with class_eval

    Time:2019-7-4

    Instance_eval method This Basic Object instance_eval is somewhat similar to the bind method in JS. In different cases, bind passes this into the object, while instance_eval passes the code block (context probe Context Probe) into the specified object, one is a passing object and the other is an executing body. In this way, variables in […]

  • Php5.x disables Eval

    Time:2019-7-1

    This time, we’re going to talk about how to prohibit Eval functions from being executed in PHP code. We thought it would be enough to modify disable_function in php.ini directly.~ But the reality is often not so satisfactory. Looking at GG, we find that Eval is not a function, but a feature provided by the […]