diff options
Diffstat (limited to 'contrib/tools')
-rw-r--r-- | contrib/tools/checkpid | 4 | ||||
-rw-r--r-- | contrib/tools/data2header.c | 41 | ||||
-rw-r--r-- | contrib/tools/httptest.pl | 195 | ||||
-rw-r--r-- | contrib/tools/myvc_install.bat | 1 | ||||
-rwxr-xr-x | contrib/tools/win2unix.sh | 2 |
5 files changed, 0 insertions, 243 deletions
diff --git a/contrib/tools/checkpid b/contrib/tools/checkpid deleted file mode 100644 index d5d4835c..00000000 --- a/contrib/tools/checkpid +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | |||
2 | echo "checking pid $1"; | ||
3 | |||
4 | while true; do echo -e "\33[2J\33[0;0H";cat /proc/$1/status ;done | ||
diff --git a/contrib/tools/data2header.c b/contrib/tools/data2header.c deleted file mode 100644 index 885a5a7b..00000000 --- a/contrib/tools/data2header.c +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * by Luis Figueiredo (stdio@netc.pt) | ||
3 | */ | ||
4 | #include <stdio.h> | ||
5 | #include <fcntl.h> | ||
6 | #include <stdlib.h> | ||
7 | #include <string.h> | ||
8 | #ifdef WIN32 | ||
9 | #include <io.h> | ||
10 | #endif | ||
11 | |||
12 | |||
13 | |||
14 | int main(int argc, char *argv[]) { // Johannes E. Schindelin | ||
15 | unsigned char ch; | ||
16 | char *vn; | ||
17 | unsigned int i=0; | ||
18 | if(argc<2) { | ||
19 | fprintf(stderr,"Need a name for VAR\n"); | ||
20 | exit(1); // Johannes E. Schindelin | ||
21 | }; | ||
22 | vn=malloc(strlen(argv[1])+1); | ||
23 | for(i=0;i<strlen(argv[1]);i++)vn[i]=toupper(argv[1][i]); | ||
24 | vn[i]='\0'; | ||
25 | printf("/*\n * by data2header by Luis Figueiredo (stdio@netc.pt)\n */\n"); | ||
26 | printf("#ifndef _%s_H_\n",vn); | ||
27 | printf("#define _%s_H_\n\n",vn); | ||
28 | free(vn); | ||
29 | i=0; | ||
30 | printf("char %s[]=\"",argv[1]); | ||
31 | while(read(0,&ch,1)) { | ||
32 | i++;if(i>25){i=0;printf("\"\n\"");}; | ||
33 | printf("\\x%X",ch); | ||
34 | }; | ||
35 | printf("\";\n\n"); | ||
36 | printf("#endif\n"); | ||
37 | return 0; // Johannes E. Schindelin | ||
38 | }; | ||
39 | |||
40 | |||
41 | |||
diff --git a/contrib/tools/httptest.pl b/contrib/tools/httptest.pl deleted file mode 100644 index 23360d28..00000000 --- a/contrib/tools/httptest.pl +++ /dev/null | |||
@@ -1,195 +0,0 @@ | |||
1 | #!/usr/bin/perl | ||
2 | |||
3 | |||
4 | |||
5 | use Socket; | ||
6 | sub newdata { | ||
7 | #my $self = shift; | ||
8 | my ($nfound,$timeout,$rin,$rout)=(0,0.2,""); | ||
9 | vec($rin,fileno(shift()),1)=1; | ||
10 | $nfound=select($rout=$rin,undef,undef,$timeout); | ||
11 | return $nfound; | ||
12 | }; | ||
13 | |||
14 | |||
15 | my $host = shift; | ||
16 | my $port = shift || 80; | ||
17 | print "\n\tWARNING: If program exit before msg that's mean that the server crashed or something happened to server\n\n"; | ||
18 | $saddr=sockaddr_in($port,inet_aton($host)); | ||
19 | $SIG{PIPE}=NULL; | ||
20 | |||
21 | |||
22 | socket(SOCK,AF_INET,SOCK_STREAM,6) or print "Died"; | ||
23 | print "a normal connection\n"; | ||
24 | <STDIN>; | ||
25 | connect(SOCK,$saddr) or exit; | ||
26 | print "Connected\n"; | ||
27 | $header="GET / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n"; | ||
28 | syswrite(SOCK,"$header"); | ||
29 | $keep=1; | ||
30 | while($keep) { | ||
31 | if(newdata(SOCK)) { | ||
32 | if(($data=<SOCK>)) { | ||
33 | print "Read: ".$data; | ||
34 | }else { | ||
35 | $keep=0; | ||
36 | }; | ||
37 | }; | ||
38 | }; | ||
39 | close(SOCK); | ||
40 | |||
41 | |||
42 | |||
43 | socket(SOCK,AF_INET,SOCK_STREAM,6) or exit; | ||
44 | print "Trying to send (nothing) press (enter) to continue\n"; | ||
45 | <STDIN>; | ||
46 | connect(SOCK,$saddr) or exit; | ||
47 | print "Connected\n"; | ||
48 | $header=""; | ||
49 | syswrite(SOCK,"$header"); | ||
50 | $keep=1; | ||
51 | while($keep) { | ||
52 | if(newdata(SOCK)) { | ||
53 | if(($data=<SOCK>)) { | ||
54 | print "Read: ".$data; | ||
55 | }else { | ||
56 | $keep=0; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
60 | close(SOCK); | ||
61 | |||
62 | |||
63 | socket(SOCK,AF_INET,SOCK_STREAM,6) or print "Died"; | ||
64 | print "a post (foo)value with 10000000 bytes press (enter) to continue\n"; | ||
65 | <STDIN>; | ||
66 | connect(SOCK,$saddr) or exit; | ||
67 | print "Connected\n"; | ||
68 | $header="POST / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\ndev=".("a"x1000000)."&teste=1\r\n\r\n"; #big values | ||
69 | syswrite(SOCK,"$header"); | ||
70 | $keep=1; | ||
71 | while($keep) { | ||
72 | if(newdata(SOCK)) { | ||
73 | if(($data=<SOCK>)) { | ||
74 | print "Read: ".$data; | ||
75 | }else { | ||
76 | $keep=0; | ||
77 | }; | ||
78 | }; | ||
79 | }; | ||
80 | close(SOCK); | ||
81 | |||
82 | socket(SOCK,AF_INET,SOCK_STREAM,6) or exit; | ||
83 | print "Trying to send a big data for ClientInfo\n"; | ||
84 | <STDIN>; | ||
85 | connect(SOCK,$saddr) or exit; | ||
86 | print "Connected\n"; | ||
87 | $header="GET / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: ".("a"x1000000)."\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n"; | ||
88 | syswrite(SOCK,"$header"); | ||
89 | $keep=1; | ||
90 | while($keep) { | ||
91 | if(newdata(SOCK)) { | ||
92 | if(($data=<SOCK>)) { | ||
93 | print "Read: ".$data; | ||
94 | }else { | ||
95 | $keep=0; | ||
96 | }; | ||
97 | }; | ||
98 | }; | ||
99 | close(SOCK); | ||
100 | |||
101 | socket(SOCK,AF_INET,SOCK_STREAM,6) or exit; | ||
102 | print "Change method by a big name\n"; | ||
103 | <STDIN>; | ||
104 | connect(SOCK,$saddr) or exit; | ||
105 | print "Connected\n"; | ||
106 | $header=("a"x1000000)." / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n"; | ||
107 | syswrite(SOCK,"$header"); | ||
108 | $keep=1; | ||
109 | while($keep) { | ||
110 | if(newdata(SOCK)) { | ||
111 | if(($data=<SOCK>)) { | ||
112 | print "Read: ".$data; | ||
113 | }else { | ||
114 | $keep=0; | ||
115 | }; | ||
116 | }; | ||
117 | }; | ||
118 | close(SOCK); | ||
119 | |||
120 | socket(SOCK,AF_INET,SOCK_STREAM,6) or exit; | ||
121 | print "big query value\n"; | ||
122 | <STDIN>; | ||
123 | connect(SOCK,$saddr) or exit; | ||
124 | print "Connected\n"; | ||
125 | $header="GET /?teste=".("a"x1000000)." / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n"; | ||
126 | syswrite(SOCK,"$header"); | ||
127 | $keep=1; | ||
128 | while($keep) { | ||
129 | if(newdata(SOCK)) { | ||
130 | if(($data=<SOCK>)) { | ||
131 | print "Read: ".$data; | ||
132 | }else { | ||
133 | $keep=0; | ||
134 | }; | ||
135 | }; | ||
136 | }; | ||
137 | close(SOCK); | ||
138 | |||
139 | socket(SOCK,AF_INET,SOCK_STREAM,6) or exit; | ||
140 | print "requestname filled w 0's\n"; | ||
141 | <STDIN>; | ||
142 | connect(SOCK,$saddr) or exit; | ||
143 | print "Connected\n"; | ||
144 | $header="GET /".("\0"x1000000)." HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n"; | ||
145 | syswrite(SOCK,"$header"); | ||
146 | $keep=1; | ||
147 | while($keep) { | ||
148 | if(newdata(SOCK)) { | ||
149 | if(($data=<SOCK>)) { | ||
150 | print "Read: ".$data; | ||
151 | }else { | ||
152 | $keep=0; | ||
153 | }; | ||
154 | }; | ||
155 | }; | ||
156 | close(SOCK); | ||
157 | |||
158 | socket(SOCK,AF_INET,SOCK_STREAM,6) or exit; | ||
159 | print "query filled w 0's\n"; | ||
160 | <STDIN>; | ||
161 | connect(SOCK,$saddr) or exit; | ||
162 | print "Connected\n"; | ||
163 | $header="GET /teste?teste=".("\0"x1000000)." HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n"; | ||
164 | syswrite(SOCK,"$header"); | ||
165 | $keep=1; | ||
166 | while($keep) { | ||
167 | if(newdata(SOCK)) { | ||
168 | if(($data=<SOCK>)) { | ||
169 | print "Read: ".$data; | ||
170 | }else { | ||
171 | $keep=0; | ||
172 | }; | ||
173 | }; | ||
174 | }; | ||
175 | close(SOCK); | ||
176 | |||
177 | socket(SOCK,AF_INET,SOCK_STREAM,6) or print "Died"; | ||
178 | print "a post (foo)value with 10000000 bytes press (enter) to continue\n"; | ||
179 | <STDIN>; | ||
180 | connect(SOCK,$saddr) or exit; | ||
181 | print "Connected\n"; | ||
182 | $header="POST / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\ndev=teste".("\0"x1000000)."&teste=1\r\n\r\n"; #big values | ||
183 | syswrite(SOCK,"$header"); | ||
184 | $keep=1; | ||
185 | while($keep) { | ||
186 | if(newdata(SOCK)) { | ||
187 | if(($data=<SOCK>)) { | ||
188 | print "Read: ".$data; | ||
189 | }else { | ||
190 | $keep=0; | ||
191 | }; | ||
192 | }; | ||
193 | }; | ||
194 | |||
195 | print "--------- END --------\n" | ||
diff --git a/contrib/tools/myvc_install.bat b/contrib/tools/myvc_install.bat deleted file mode 100644 index 9de7ccb3..00000000 --- a/contrib/tools/myvc_install.bat +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | copy ..\bin\libwebserver.lib "C:\Programas\Microsoft Visual Studio\VC98\Lib\libwebserver.lib" | ||
diff --git a/contrib/tools/win2unix.sh b/contrib/tools/win2unix.sh deleted file mode 100755 index 177bd27b..00000000 --- a/contrib/tools/win2unix.sh +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | for i in `find . -name "*" -xtype f`; do echo "Messing with $i";cat $i |tr -d \\r >.1; mv .1 $i ; done | ||