Skip to content

Commit

Permalink
psr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rigidus committed Mar 30, 2012
1 parent 381766a commit ec4efcc
Show file tree
Hide file tree
Showing 3 changed files with 259 additions and 0 deletions.
39 changes: 39 additions & 0 deletions psr/test.php
@@ -0,0 +1,39 @@
<?php // This file is protected by copyright law and provided under license. Reverse engineering of this file is strictly prohibited.
$current_file=__FILE__;
$current_line=__LINE__;

$current_file="index.php";
$current_line=2;

$_88=88;

$fd_current_file=fopen($current_file,'rb');

while(--$current_line)
fgets($fd_current_file,1024);

fgets($fd_current_file,4096);

/* Читает зашифорванную строчку из открытого файла длинной 372 байта */
$local_f_read = fread($fd_current_file,372);

/* Замена подстроки */
$replaced_substring = strtr($local_f_read,'EnteryouwkhRHYKNWOUTAaBbCcDdFfGgIiJjLlMmPpQqSsVvXxZz0123456789+/=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/');

/* $OO00O00O0 Зашифрованный контейнер */
$crypto_container=(base64_decode($replaced_substring));
/* Исполнение зашифрованного контейнера */
/* eval($crypto_container); */

/* Вторая часть расшифровщика */

$new_container=ereg_replace('index.php',"'".$OOO0O0O00."'",(base64_decode(strtr(fread($O000O0O00,$OO00O0000),'EnteryouwkhRHYKNWOUTAaBbCcDdFfGgIiJjLlMmPpQqSsVvXxZz0123456789+/=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'))));

echo ($new_container);

fclose($O000O0O00);
/* eval($new_container); */

phpinfo();

?>
174 changes: 174 additions & 0 deletions storage/dao-test-1.html
@@ -0,0 +1,174 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!-- Created by htmlize-1.36 in css mode. -->
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251">
<title>*slime-repl sbcl*</title>
<style type="text/css">
<!--
body {
color: #00ff00;
background-color: #1f1f1f;
}
.slime-repl-input {
/* slime-repl-input-face */
font-weight: bold;
}
.slime-repl-inputed-output {
/* slime-repl-inputed-output-face */
color: #ff0000;
}
.slime-repl-output {
/* slime-repl-output-face */
color: #ffa07a;
}
.slime-repl-prompt {
/* slime-repl-prompt-face */
color: #00ffff;
}
.slime-repl-result {
}

a {
color: inherit;
background-color: inherit;
font: inherit;
text-decoration: inherit;
}
a:hover {
text-decoration: underline;
}
-->
</style>
</head>
<body>
<pre>; SLIME 2011-10-19
<span class="slime-repl-prompt">CL-USER&gt; </span><span class="slime-repl-input">(ql:quickload '(#:postmodern #:cl-json #:restas))
(defpackage #:test (:use #:cl #:postmodern))
(in-package #:test)</span>
<span class="slime-repl-output">To load "postmodern":
Load 1 ASDF system:
postmodern
; Loading "postmodern"
.
To load "cl-json":
Load 1 ASDF system:
cl-json
; Loading "cl-json"

To load "restas":
Load 1 ASDF system:
restas
; Loading "restas"
.......
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">#&lt;PACKAGE "TEST"&gt;</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(defvar *prod-id* 0
"Ïåðåìåííàÿ àâòîèíêðåìåíòà äëÿ product")
(defun *prod-id* ()
"Àâòîèíêðåìåíò äëÿ product"
(incf *prod-id*))
(defclass product ()
((id :col-type integer :initarg :id :accessor product-id)
(name :col-type string :initarg :name :accessor product-name))
(:metaclass dao-class)
(:keys id))
(defun add-product (name)
"Ïðîâåðêà íà äóáëèêàò â ÁÄ"
(make-dao 'product
:id (*prod-id*)
:name name))
(defvar *opname-id* 0
"Ïåðåìåííàÿ àâòîèíêðåìåíòà äëÿ opname")
(defun *opname-id* ()
"Àâòîèíêðåìåíò äëÿ opname"
(incf *opname-id*))
(defclass opname ()
((id :col-type integer :initarg :id :accessor opnamet-id)
(name :col-type string :initarg :name :accessor opname-name))
(:metaclass dao-class)
(:keys id))
(defun add-opname (name)
"Ïðîâåðêà íà äóáëèêàò â ÁÄ"
(make-dao 'opname
:id (*opname-id*)
:name name))
(defvar *option-id* 0
"Ïåðåìåííàÿ àâòîèíêðåìåíòà äëÿ option")
(defun *option-id* ()
"Àâòîèíêðåìåíò äëÿ option"
(incf *option-id*))
(defclass option ()
((pr-id :col-type integer :initarg :pr-id :accessor option-pr-id)
(op-id :col-type integer :initarg :op-id :accessor option-op-id)
(value :col-type string :initarg :value :accessor option-value))
(:metaclass dao-class)
(:keys pr-id op-id value))
(defun add-option (pr-name &amp;rest opt-list)
"opt-list äîëæåí áûòü plist-îì"
(unless (and opt-list
(evenp (length opt-list)))
(format t "íåïðàâèëüíûé opt-list")
(return-from add-option))
(let ((prod-list (car (select-dao 'product (:ilike 'name pr-name)))))
(when (null prod-list)
(setf prod-list (add-product pr-name)))
(loop :for i :from 0 :upto (1- (length opt-list)) :by 2
:do (let* ((op-key (nth i opt-list))
(op-val (nth (1+ i) opt-list))
(key-list (car (select-dao 'opname (:ilike 'name op-key)))))
(when (null key-list)
(setf key-list (add-opname op-key)))
(make-dao 'option
:pr-id (product-id prod-list)
:op-id (opnamet-id key-list)
:value op-val)))))</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">ADD-OPTION</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(connect-toplevel "ravtadb" "ravta" "ravta1111" "localhost")</span>
<span class="slime-repl-result">; No value</span>
<span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(execute (dao-table-definition 'product))</span>
<span class="slime-repl-output">WARNING:
Postgres warning: CREATE TABLE / PRIMARY KEY will create implicit index "product_pkey" for table "product"
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">0</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(execute (dao-table-definition 'opname))</span>
<span class="slime-repl-output">WARNING:
Postgres warning: CREATE TABLE / PRIMARY KEY will create implicit index "opname_pkey" for table "opname"
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">0</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(execute (dao-table-definition 'option))</span>
<span class="slime-repl-output">WARNING:
Postgres warning: CREATE TABLE / PRIMARY KEY will create implicit index "option_pkey" for table "option"
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">0</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(query "ALTER TABLE product ADD CONSTRAINT uq_p_name UNIQUE (name)")</span>
<span class="slime-repl-output">WARNING:
Postgres warning: ALTER TABLE / ADD UNIQUE will create implicit index "uq_p_name" for table "product"
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(query "ALTER TABLE product ADD CHECK (name &lt;&gt; '')")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(query "ALTER TABLE opname ADD CONSTRAINT uq_o_name UNIQUE (name)")
(query "ALTER TABLE opname ADD CHECK (name &lt;&gt; '')")
(query "ALTER TABLE option ADD FOREIGN KEY (pr_id) REFERENCES product(id)")</span>
<span class="slime-repl-output">WARNING:
Postgres warning: ALTER TABLE / ADD UNIQUE will create implicit index "uq_o_name" for table "opname"
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(query "ALTER TABLE option ADD FOREIGN KEY (op_id) REFERENCES opname(id)")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-product "oil")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">#&lt;PRODUCT {10041B0083}&gt;</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-product "ìàñëî A")
(add-product "ìàñëî B")
(add-opname "îáú¸ì")
(add-opname "âÿçêîñòü")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">#&lt;OPNAME {10041F5C53}&gt;</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-option "oil" "îáú¸ì" "3ë." "îáú¸ì" "4ë.")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-option "oil" "îáú¸ì" "3,5ë." "îáú¸ì" "4,5ë.")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-option "ìàñëî U" "âåñ" "7,5ã")</span>
<span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-option "ìàñëî U" "âåñ" "7,5ã" "gjh")</span>
<span class="slime-repl-output">íåïðàâèëüíûé opt-list
</span><span class="slime-repl-result"><span class="slime-repl-inputed-output">NIL</span></span><span class="slime-repl-result">
</span><span class="slime-repl-prompt">TEST&gt; </span><span class="slime-repl-input">(add-option "oil" "îáú¸ì" "3,5ë." "îáú¸ì" "4,5ë.")</span>
; Evaluation aborted on #&lt;CL-POSTGRES-ERROR:UNIQUE-VIOLATION {100459A933}&gt;.
<span class="slime-repl-prompt">TEST&gt; </span></pre>


</body></html>
46 changes: 46 additions & 0 deletions storage/jsonq.js
@@ -0,0 +1,46 @@
[
{
"attr":
{
"id":"tag_1",
"rel":"tag"
},
"data":"\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435",
"state":"closed"
},
{
"attr":
{
"id":"menu_category_1",
"rel":"menu"
},
"data":"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e",
"state":"closed"
},
"attr":
{
"id":"menu_category_2",
"rel":"bar"
},
"data":"\u0411\u0430\u0440",
"state":"closed"
},
{
"attr":
{
"id":"tag_2",
"rel":"tag"
},
"data":"\u0417\u0430\u0432\u0442\u0440\u0430\u043a",
"state":"closed"
},
{
"attr":
{
"id":"tag_3",
"rel":"tag"
},
"data":"\u041b\u0430\u043d\u0447","state":"closed"
},
{
"attr":{"id":"tag_4","rel":"tag"},"data":"\u0414\u0435\u0442\u0441\u043a\u043e\u0435 \u043c\u0435\u043d\u044e","state":"closed"},{"attr":{"id":"tag_5","rel":"tag"},"data":"\u0411\u0430\u043d\u043a\u0435\u0442\u043d\u043e\u0435 \u043c\u0435\u043d\u044e","state":"closed"}]

0 comments on commit ec4efcc

Please sign in to comment.