eval

How can I de-obfuscate or decode this Perl code?

给你一囗甜甜゛ 提交于 2019-12-06 10:49:35
I found this code and I think it's encoded. I tried to understand how it's encoded or how can read it. Does anyone have an idea to decode this code? #!/usr/bin/perl eval unpack u=>q{_<')I;G0@(EQN7&5<>#5"7'@S,UQX,S-<>#9$7'@U-UQX-C%<>#<R7'@V15QX-CE<>#9%7'@V-UQX,C!<>#4Y_7'@V1EQX-S5<>#(P7'@T1%QX-C%<>#<Y7'@R,%QX-$5<>#8U7'@V-5QX-C1<>#(P7'@U-%QX-D9<>#(P7'@T_.5QX-D5<>#<S7'@W-%QX-C%<>#9#7'@V0UQX,C!<>#<S7'@V1EQX-D1<>#8U7'@P05QX,C!<>#(P7'@R,%QX_,C!<>#(P7'@R,%QX,C!<>#(P7'@R,%QX-$1<>#9&7'@V-%QX-S5<>#9#7'@V-5QX-S-<>#!!7'@R,%QX,C!<_>#(P7'@R,%QX,C!<>#(P7'@R,%QX,C!<>#(P7'@T.%QX-C5<>#<R7'@V-5QX,C!<>#8Y7'@W,UQX

Function name and dynamic binding in Common Lisp

孤者浪人 提交于 2019-12-06 10:09:59
I'm reading Peter Norvig's Paradigms of AI . In chapter 6.2, the author uses code like below ( not the original code, I picked out the troubling part ): Code Snippet: (progv '(op arg) '(1+ 1) (eval '(op arg))) As the author's original intent, this code should return 2 , but in sbcl 1.1.1 , the interpreter is apparently not looking up op in the environment, throwing out op: undefined function . Is this implementation specific? Since the code must have been tested on some other lisp. p.s Original code You probably mean (progv '(op arg) '(1+ 1) (eval '(funcall op arg))) Edit(2013-08-21): PAIP was

关于无限试用JetBrains产品的方案

本小妞迷上赌 提交于 2019-12-06 09:40:49
JetBrains免费试用期限为30天,通过对其试用机制的设想,找到了其破解试用机制的方案,具体如下: 在选择试用JetBrains产品的时候,它会在 C:\Users\用户名\对应产品\config\eval 下生成一个密钥文件, 格式为 产品名+主版本号.evaluation.key 例如: IntelliJ IDEA 2018.2.1 版本的试用密钥为:idea182.evaluation.key 当试用期结束后,只要删除对应目录下的相应的试用文件即可,它是根据什么算法生成的密钥不重要。如:C:\Users\Microsoft\.IntelliJIdea2018.2\config\eval 然后关闭软件,重新打开选择试用即可,这时试用期又是30天(一个月激活删除一次可能比较麻烦,不过可以写一个简单的批处理命令,例如:del /f /s C:\Users\用户名\.IntelliJIdea2018.2\config\eval\*.key 如果你安装的产品比较多,那么就多写几条好了,试用期到了就运行一下,或者在系统任务中添加此命令,并设定一个运行周期也是一样的)。可能方法太过简单,以至于我都有点怀疑,不过我通过修改系统时间测试是有效的,应该不是特例。 注:当使用其他方式激活时,也会自动生成对应的密钥文件,如:C:\Users\用户名\.IntelliJIdea2018.2

(SyntaxError): missing ] after element list when using eval

…衆ロ難τιáo~ 提交于 2019-12-06 09:40:11
I get following error (SyntaxError): missing ] after element list when using eval function. Returned JSON is pretty simple, so I don't undestand where is error. [{"title":"sfsdf","id":1}{"title":"m356","id":12}] As an answer for completeness. Your JSON is invalid. You need a comma between the Objects like so: [{"title":"sfsdf","id":1},{"title":"m356","id":12}] First you have lost the comma between the Object,the Second Jquery will parse the Object automaticly. i suggest you don't use this method. i also meet thie question,but there're some difference from yours. 来源: https://stackoverflow.com

How do I call the Tamarin ESC Compiler from AS3 Code?

故事扮演 提交于 2019-12-06 09:25:07
问题 I'm trying to call Tamarin's ESC Compiler from AS3 code. I've got the ESC Compiler byte code loaded in Flash Player, but when I call it, the ESC Compiler always returns the same do nothing byte code, no matter what source code I feed it. The human readable ESC code looks like this: function compileStringToBytes(input, context="(string)", start_line=1) { let [_,_,res] = compile( (function () input), (function (abc) abc.getBytes()), context, start_line ); return res; } I'm calling it using the

Allowing the repr() of my class's instances to be parsed by eval()

南笙酒味 提交于 2019-12-06 08:31:28
Say I have defined a class myself and I defined a __repr__ method for it. I want to about convert it back to my object. I know that object serialization may be a good way of doing so (using the json module) but is there anyway I can use the built-in eval function to achieve this? Write your __repr__() so it creates a valid Python expression for instantiating your object. class MyClass(object): def __init__(self, a, b): self.a = a self.b = b def __repr__(self): return "%s(%r, %r)" % (type(self).__name__, self.a, self.b) Obviously this relies on the values you're using having their own

Eval and lexical variables

我的未来我决定 提交于 2019-12-06 08:18:18
I'm doing a small project just for fun, and I added eval support for it to make debug easier. But later I found a problem: (let ((x 1)) (eval (1+ x))) (defun foo (x form) (eval form)) (foo 1 '(1+ x)) Code above won't work. Could someone please explain why and how to work it around? Thanks very much. First, though (let ((x 1)) (eval (1+ x))) may look like it does work (it certainly does something), it is likely not doing, what you intend it to do. eval is a regular function, so it receives its arguments evaluated by the caller. Effectively, you are calling eval with an integer value of 2 --

eval() with variables from an object in the scope

廉价感情. 提交于 2019-12-06 07:33:35
how can I execute a string as code (using eval() ) and give it some variables? For example, I've got an object named vars and want each of its properties to be accessible for the code without exciplitely specifying the objects name. Something like this: function evalWithVariables(func, vars) { //some magic here return eval(func); } function test() { var retval = evalWithVariables("a>5", {"a":7}); console.log(retval); } Oh, and the code is trusted, it comes from the same server as the script, it is not user-generated and I'm pretty sure that eval is the right tool here (and I know that eval is

js学习:函数

拈花ヽ惹草 提交于 2019-12-06 07:21:38
概述 函数的声明 JavaScript 有三种声明函数的方法 function 命令 function命令声明的代码区块,就是一个函数。function命令后面是函数名,函数名后面是一对圆括号,里面是传入函数的参数。函数体放在大括号里面。 这叫做函数的声明(Function Declaration)。 function print(s) { console.log(s); } 函数表达式 除了用function命令声明函数,还可以采用变量赋值的写法。 var print = function(s) { console.log(s); }; 这种写法将一个匿名函数赋值给变量。这时,这个匿名函数又称函数表达式(Function Expression),因为赋值语句的等号右侧只能放表达式。 采用函数表达式声明函数时,function命令后面不带有函数名。如果加上函数名,该函数名只在函数体内部有效,在函数体外部无效。 var print = function x(){ console.log(typeof x); }; x // ReferenceError: x is not defined print() // function 上面代码在函数表达式中,加入了函数名x。这个x只在函数体内部可用,指代函数表达式本身,其他地方都不可用。这种写法的用处有两个,一是可以在函数体内部调用自身

14 内置函数(一)

喜夏-厌秋 提交于 2019-12-06 07:09:27
13. 前 方 高能 - 内置函数 一 一. 本节主要内容: 1. 内置函数 什什么是内置函数? 就是python给你提供的. 拿来直接 用的函数, 比如print., input等等. 截 止到python版本3.6.2 python 一共提供了了68个内置函数. 他们就是python直接提供给我们的. 有 一些我们已经 用过了了. 有 一些还没有 用过. 还有 一些需要学完了了 面向对象才能继续学习的. 今天我们就认识 一下python的内置函数. abs() dict() help() min() setattr() all() dir() hex() next() slice() any() divmod() id() object() sorted() ascii() enumerate() input() oct() staticmethod( bin() eval() int() open() str() bool() exec() isinstance() ord() sum() bytearray() filter() issubclass() pow() super() bytes() float() iter() print() tuple() callable() format() len() property() type() chr()