This repository has been archived by the owner on Oct 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME
123 lines (92 loc) · 4.57 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
DESCRIPTION
testcookie-flash-processor is a simple web server generating SWF for cookie installation.
Server can be used with testcookie-nginx-module for setting cookie via flash plugin.
NOTE
This project is Proof-of-Contept for those people, who ask me to add "Flash functionality" to testcookie-nginx-module.
Check the "doc" directory for the list of things you can do yourself.
INSTALLATION
Grab and install libraries:
1) My fork of libming (http://github.com/kyprizel/libming.git), don't forget to compile and install Python extension
2) Fapws (https://github.com/william-os4y/fapws3)
3) Swfobject (http://code.google.com/p/swfobject/)
Build nginx with testcookie-nginx-module, use example configuration.
Run testcookie-flash-processor, run nginx.
EXAMPLE CONFIGURATION
server {
listen 80;
server_name domain.com;
testcookie off;
testcookie_name BPC;
testcookie_secret keepmescret;
testcookie_session $remote_addr;
testcookie_arg attempt;
testcookie_max_attempts 3;
testcookie_fallback /cookies.html?backurl=http://$host$request_uri;
testcookie_get_only on;
testcookie_redirect_via_refresh on;
testcookie_refresh_template '<html><body><script type="text/javascript" src="/swfobject.js"></script><script type="text/javascript">swfobject.embedSWF("/testcookie.swf", "cookie_installer", "100", "100", "9.0.0", "/expressInstall.swf", {"nexturl":"$testcookie_nexturl"});</script><div id="cookie_installer"></div></body></html>';
location = /cookies.html {
root /var/www/public_html;
}
location = /swfobject.js {
testcookie off;
gzip on;
gzip_min_length 1000;
gzip_types text/plain;
root /usr/local/nginx/root;
}
location = /expressInstall.swf {
testcookie off;
gzip on;
gzip_min_length 1000;
gzip_types text/plain;
root /usr/local/nginx/root;
}
location = /testcookie.swf {
testcookie var;
proxy_pass http://127.0.0.1:1234/;
proxy_set_header Testcookie-Value $testcookie_set;
proxy_set_header Testcookie-Valid $testcookie_ok;
proxy_set_header Testcookie-Name "BPC";
}
location / {
testcookie on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080;
}
}
SOURCES
Available on github at kyprizel/testcookie-flash-processor
(<http://github.com/kyprizel/testcookie-flash-processor>).
BUGS
Feel free to report bugs and send patches to kyprizel@gmail.com
or use github's issue tracker(<http://github.com/kyprizel/testcookie-flash-processor/issues>).
CONTRIBUTION
Thanks to Vlad Roskov (aka vos) for helping me with Flash debugging.
COPYRIGHT & LICENSE
Copyright (C) 2012 Eldar Zaitov (kyprizel@gmail.com).
All rights reserved.
This module is licenced under the terms of BSD license.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the authors nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.