You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
3.1 KiB
87 lines
3.1 KiB
POST / HTTP/1.1
|
|
Host: localhost:11213
|
|
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0
|
|
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
|
|
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
|
|
Accept-Encoding: gzip, deflate
|
|
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
|
|
Connection: keep-alive
|
|
Referer: http://localhost:11213/
|
|
Content-Type: multipart/form-data; boundary=---------------------------2713599294882465121951036798
|
|
Content-Length: 2652
|
|
|
|
-----------------------------2713599294882465121951036798
|
|
Content-Disposition: form-data; name="submitter"
|
|
|
|
fooo
|
|
-----------------------------2713599294882465121951036798
|
|
Content-Disposition: form-data; name="pics"; filename="bar.c"
|
|
Content-Type: text/x-csrc
|
|
|
|
#include <stdio.h>
|
|
|
|
#define _B64(chr, ref) (chr)==_##ref?__##ref
|
|
#define B64(_) \
|
|
( _B64(_,A):_B64(_,B):_B64(_,C):_B64(_,D):_B64(_,E):_B64(_,F):_B64(_,G): \
|
|
_B64(_,H):_B64(_,I):_B64(_,J):_B64(_,K):_B64(_,L):_B64(_,M):_B64(_,N): \
|
|
_B64(_,O):_B64(_,P):_B64(_,Q):_B64(_,R):_B64(_,S):_B64(_,T):_B64(_,U): \
|
|
_B64(_,V):_B64(_,W):_B64(_,X):_B64(_,Y):_B64(_,Z):_B64(_,a):_B64(_,b): \
|
|
_B64(_,c):_B64(_,d):_B64(_,e):_B64(_,f):_B64(_,g):_B64(_,h):_B64(_,i): \
|
|
_B64(_,j):_B64(_,k):_B64(_,l):_B64(_,m):_B64(_,n):_B64(_,o):_B64(_,p): \
|
|
_B64(_,q):_B64(_,r):_B64(_,s):_B64(_,t):_B64(_,u):_B64(_,v):_B64(_,w): \
|
|
_B64(_,x):_B64(_,y):_B64(_,z):_B64(_,0):_B64(_,1):_B64(_,2):_B64(_,3): \
|
|
_B64(_,4):_B64(_,5):_B64(_,6):_B64(_,7):_B64(_,8):_B64(_,9): \
|
|
_B64(_,PLUS):_B64(_,SLASH):-1 )
|
|
|
|
|
|
#define B64_8(_) \
|
|
B64(_),B64(_+1),B64(_+2),B64(_+3),B64(_+4),B64(_+5),B64(_+6),B64(_+7)
|
|
|
|
#define B64_64(_) \
|
|
B64_8(_),B64_8(_+8), B64_8(_+16),B64_8(_+24), \
|
|
B64_8(_+32),B64_8(_+40),B64_8(_+48),B64_8(_+56)
|
|
|
|
#define IS_BASE64(ch) ( \
|
|
UCHAR_IN_RANGE((unsigned char)(ch)) \
|
|
&& 0 <= b64[(unsigned char)(ch)] )
|
|
|
|
|
|
static const char b64str[64] =
|
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
|
|
enum b64vals {
|
|
__A=0,__B,__C,__D,__E,__F,__G,__H,__I,__J,__K,__L,__M,__N,__O,__P,__Q,__R,
|
|
__S,__T,__U,__V,__W,__X,__Y,__Z,__a,__b,__c,__d,__e,__f,__g,__h,__i,__j,
|
|
__k,__l,__m,__n,__o,__p,__q,__r,__s,__t,__u,__v,__w,__x,__y,__z,__0,__1,
|
|
__2,__3,__4,__5,__6,__7,__8,__9,__PLUS,__SLASH
|
|
};
|
|
|
|
enum b64chars {
|
|
_A='A',_B='B',_C='C',_D='D',_E='E',_F='F',_G='G',_H='H',_I='I',_J='J',_K='K',
|
|
_L='L',_M='M',_N='N',_O='O',_P='P',_Q='Q',_R='R',_S='S',_T='T',_U='U',_V='V',
|
|
_W='W',_X='X',_Y='Y',_Z='Z',_a='a',_b='b',_c='c',_d='d',_e='e',_f='f',_g='g',
|
|
_h='h',_i='i',_j='j',_k='k',_l='l',_m='m',_n='n',_o='o',_p='p',_q='q',_r='r',
|
|
_s='s',_t='t',_u='u',_v='v',_w='w',_x='x',_y='y',_z='z',_0='0',_1='1',_2='2',
|
|
_3='3',_4='4',_5='5',_6='6',_7='7',_8='8',_9='9',_PLUS='+',_SLASH='/'
|
|
};
|
|
|
|
#define __46B(chr) __##chr
|
|
inline
|
|
char
|
|
__B64(int val)
|
|
{
|
|
return b64str[val];
|
|
}
|
|
|
|
int main()
|
|
{
|
|
int i=12;
|
|
char a='k';
|
|
|
|
//printf("i => %c | a => %d\n", __B64(12), __46B('k'));
|
|
printf("i => %c | a => %d\n", __B64(i), __46B(a));
|
|
}
|
|
|
|
// vim: set ts=4 sw=4:
|
|
|
|
-----------------------------2713599294882465121951036798--
|