emlog

面路径include/model/log_model.php将原生页面代码修改成美化页面代码哦也就是修改405~431行代码哦将原来函数里的if($pwd!==addslashes($logPwd)){echo<<<EOT<html><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><title>emlogmessage</title><styletype="text/css"><!--body{background-color:#F7F7F7;font-family:Arial;font-size:12px;line-height:150%;}.main{background-color:#FFFFFF;margin-top:20px;font-size:12px;color:#666666;width:580px;margin:10px200px;padding:10px;list-style:none;border:#DFDFDF1pxsolid;}--></style></head><body><divclass="main"><formaction=""method="post">请输入该文章的访问密码<br><inputtype="password"name="logpwd"/><inputtype="submit"value="进入.."/><br/><br/><ahref="$url">«返回首页</a></form></div></body></html>EOT;if($cookiePwd){setcookie('em_logpwd_'.$logid,'',time()-31536000);}```htmlif($pwd!==addslashes($logPwd)){echo<<<EOT<html><head><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/><title>emlogmessage</title><styletype="text/css"><!--body{background-color:#F7F7F7;font-family:Arial;font-size:12px;line-height:150%;}.main{background-color:#FFFFFF;margin-top:20px;font-size:12px;color:#666666;width:580px;margin:10px200px;padding:10px;list-style:none;border:#DFDFDF1pxsolid;}--></style></head><body><divclass="main"><formaction=""method="post">请输入该文章的访问密码<br><inputtype="password"name="logpwd"/><inputtype="submit"value="进入.."/><br/><br/><ahref="$url">«返回首页</a></form></div></body></html>EOT;if($cookiePwd){setcookie('em_logpwd_'.$logid,'',time()-31536000);}替换为如下代码即可:if($pwd!==addslashes($logPwd)){?><html><head><metahttp-equiv="Content-Type"content="text/html;charset=UTF-8"><metacharset="UTF-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="renderer"content="webkit"><metaname="viewport"content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"><title>该文章已被加密</title></head><body><divclass="main"><imgclass="alert"alt="文章已被加密"src="https://xujiuyi.xyz/content/templates/FLY/img/mima.png"><formaction=""method="post"class="mk-side-form"><h2class="pw-tip">该文章已被加密</h2><inputtype="password"name="logpwd"placeholder="请输入访问密码查看"required><buttontype="submit">提交</button><?phpif($postPwd):?><pid="pw-error">Oops!密码不对哦~</p><script>setTimeout(function(){document.getElementById("pw-error").style.display="none"},2000);</script><?phpendif;?></form><ahref="<?phpecho$url;?>"class="return-home"title="点击回到网站首页">-返回首页-</a></div><styletype="text/css">*{font-family:"MicrosoftYahei",微软雅黑,"HelveticaNeue",Helvetica,"HiraginoSansGB","WenQuanYiMicroHei",sans-serif;box-sizing:border-box;margin:0px;padding:0px;font-size:14px;-webkit-transition:.2s;-moz-transition:.2s;-ms-transition:.2s;-o-transition:.2s;transition:.2s}html,body{width:100%;height:100%}body{background-color:#F4F6F9;color:#768093}input,button{font-size:1em;border-radius:3px;-webkit-appearance:none}input{width:100%;padding:5px;box-sizing:border-box;border:1pxsolid#e5e9ef;background-color:#f4f5f7;resize:vertical}input:focus{background-color:#fff;outline:none}button{border:0;background:#6abd09;color:#fff;cursor:pointer;opacity:1;user-select:none}button:hover,button:focus{opacity:.9}button:active{opacity:1}.main{width:100%;max-width:500px;height:300px;padding:30px;background-color:#fff;border-radius:2px;box-shadow:010px60px0rgba(29,29,31,0.09);transition:all.12sease-out;position:absolute;left:0;top:0;bottom:0;right:0;margin:auto;text-align:center}.alert{width:80px}.mk-side-form{margin-bottom:28px}.mk-side-forminput{float:left;padding:2px10px;width:77%;height:37px;border:1pxsolid#ebebeb;border-right-color:transparent;border-radius:2px002px;line-height:37px}.mk-side-formbutton{position:relative;overflow:visible;width:23%;height:37px;border-radius:02px2px0;text-transform:uppercase}.pw-tip{font-weight:normal;font-size:26px;text-align:center;margin:25pxauto}#pw-error{color:red;margin-top:15px;margin-bottom:-20px;}.return-home{text-decoration:none;color:#b1b1b1;font-size:16px}.return-home:hover{color:#1E9FFF;letter-spacing:5px}</style></body></html><?phpif($cookiePwd){setcookie('em_logpwd_'.$logid,'',time()-31536000);}本文转载来自孟坤博客:http://tx7.co/ylmm5f

emlog

emlog后台登录地址的目录名称默认为admin,并且官方没有提供自定义后台登录入口名字的功能,这多少让我们觉得有些不安全,毕竟暴露一个网站的后台不是一件安全的事,今天就给您说下修改方法,增加一下网站的安全性。虽然我们进入后台的地址是/admin,但其实真实的地址还是/admin/index.php。那么就先从这个文件开始下手,打开这/admin/index.php这个文件后,看到第7行require_once‘globals.php’;这一句,也就是说在index.php运行之前会先加载globals.php这个文件,由文件路径可以看出这个文件是处于当前文件夹中,找到并打开它。发现它又加载了一文件,是根目录的init.php。先不管它,先来看下面的,第9行define(‘TEMPLATE_PATH’,EMLOG_ROOT.’/admin/views/‘);定义了一个后台模板路径的常量,这个路径经过登录接口目录,所以我们把它修改成你想要的名称,比如修改成我的ID,即define(‘TEMPLATE_PATH’,EMLOG_ROOT.’/sheli/views/‘);现在先不预览,因为可能还有没有修改的地方,免得会报错。继续往下看。登录验证,没什么问题。退出,这个让我想到了平时点退出的时候,地址是/admin?action=logout,这里可以看到,它是在admin上加了一个logout的动作,所以我仔细看了一下它,但是没看出可以修改的地方。那么我们开始看刚才引入的那个文件:init.php。打开这个文件。由这个文件开头的注释:全局项加载,我们了解到,从现在开始,要开始大规模加载东西了,我想,如果下面还有需要修改的地方的,那修改会变得很麻烦,所以我就此先打住,先测试一下,以现在的修改,有没有成功的可能性。我先是把后台登录的文件夹名称改成admin1,然后打开浏览器输入http://localhost/admin1,打开后台入口,没有任何错误,接着输入账号密码登录,没有报错,我试着进行了各项操作,包括写日志等等,没有出现异常,也就是说后台登录入口的修改至此成功。上面的内容是一堆废话可以不必理会,重点在这里,其实就两步:1、修改根目录下admin的名称define('TEMPLATE_PATH',EMLOG_ROOT.'/admin/views/');//后台当前模板路径把其中的admin改为第一步更改的名称就ok了,3、千万不要用记事本来修改核心文件,否则后果很严重原文地址:http://www.shuyong.net/iemlog/428.html

Python

之前使用的是pycharm4,今天升级安装最新版PythonIDEforProfessionalDevelopersPycharm最新版下载地址:http://www.jetbrains.com/pycharm/download一、安装都是正常安装软件的过程,其中会选择x86或者64位的版本,同时如果没有安装过JRE,那么需要勾选安装JRE。二、激活1.修改hostsMac、linux下在:etc打开文件夹下的文件hosts,在文件末尾添加如下图所示一行0.0.0.0account.jetbrains.com2.激活注册如果在安装的过程中运行了软件,会弹出注册那个对话框,此时不要动,一定要先修改并保存hosts文件后再进行这一步!复制粘贴如下激活码,即可激活!K71U8DBPNEeyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAxOS0wNS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gyG8oiNDyNEoAbsR3lOpI7grUYSvkB/xVy/VoklPCK2h0f0GJxFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQC9WZuYgQedSuOc5TOUSrRigMw4/+wuC5EtZBfvdl4HT/8vzMW/oUlIP4YCvA0XKyBaCJ2iX+ZCDKoPfiYXiaSiH+HxAPV6J79vvouxKrWg2XV6ShFtPLP+0gPdGq3x9R3+kJbmAm8w+FOdlWqAfJrLvpzMGNeDU14YGXiZ9bVzmIQbwrBA+c/F4tlK/DV07dsNExihqFoibnqDiVNTGombaU2dDup2gwKdL81ua8EIcGNExHe82kjF4zwfadHk3bQVvbfdAwxcDy4xBjs3L4raPLU3yenSzr/OEur1+jfOxnQSmEcMXKXgrAQ9U55gwjcOFKrgOxEdek/Sk1VfOjvS+nuM4eyEruFMfaZHzoQiuw4IqgGc45ohFH0UUyjYcuFxxDSU9lMCv8qdHKm+wnPRb0l9l5vXsCBDuhAGYD6ss+Ga+aDY6f/qXZuUCEUOH3QUNbbCUlviSz6+GiRnt1kA9N2Qachl+2yBfaqUqr8h7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG++2+wNWP+HtBhVxMRNTdVhSm38AknZlD+PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK+pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog三、安装结束激活成功后,即可无限制使用,之后也不要修改hosts对应那一行代码,后面的环境什么的自己配置就好了~

2019-5-21 94 0