Quote from: FrOzeN on April 04, 2006, 02:19 AM
Yeah well, iago beat you to it.
http://www.x86labs.org:81/forum/index.php/topic,4680.0.html
Great!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: FrOzeN on April 04, 2006, 02:19 AM
Yeah well, iago beat you to it.
http://www.x86labs.org:81/forum/index.php/topic,4680.0.html
select flags, flags_mask, commands, commands_mask from users where username='blah'
union select flags, flags_mask, commands, commands_mask from clients where client='WAR3'
union select flags, flags_mask, commands, commands_mask from wildcards where 'blah' like pattern
union select flags, flags_mask, commands, commands_mask from groups where groupname in
(select groupname from users_groups where username='blah');
//Matches string against a pattern and returns
//true if the string matches. Returns false if
//the length of the pattern is > 1024.
bool AccessDatabase::wcMatch(const char *pattern, const char *string) {
char *p;
char *pString;
char buffer[1024];
memset(buffer, 0, 1024);
if (!strcmp(pattern, "*"))
return true;
if (strlen(pattern) > 1024)
return false;
//filter out repeat '*' from the pattern
p = buffer + 1;
buffer[0] = *pattern;
for (char *pTmp = (char *)(pattern + 1); *pTmp; ++pTmp) {
if (!(*pTmp == '*' && *(pTmp - 1) == '*'))
(*p++) = *pTmp;
}
p = buffer;
pString = (char *)string;
for (p = buffer; *p; ++p) {
if (*p == '?') {
if (!*pString) return false;
++pString;
}else if (*p == '*') {
char next = *(p + 1);
if (!next) {
return true;
}else if (next == '?') {
next = *(p + 2);
if (!next) return false;
}
while (*pString != next && *pString)
++pString;
if (!pString)
return false;
}else if (*p == *pString) {
++pString;
}else {
return false;
}
}
return true;
}
Quote from: J on March 30, 2006, 09:58 AM
I bet the filter has something to do with checking the magic bytes in the torrent file, and thats what causes the file to not download even if it's no longer a .torrent. Try changing the magic bytes and writing a small processing program to change it back to normal on the other end, asuming this isn't working out.
f7 04 8a 00 73 00 0c
00 ff 02 01 00 00 04 01 64
01 64 02 00 00 01 04 01 64
00 ff 00 00 00 02 04 00 64
00 ff 01 00 00 03 04 00 64
00 ff 01 00 00 04 04 00 64
00 ff 01 00 00 05 04 00 64
00 ff 02 01 01 06 08 01 64
00 ff 01 00 01 07 08 00 64
00 ff 01 00 01 08 08 00 64
00 ff 01 00 01 09 08 00 64
00 ff 01 00 01 0a 08 00 64
00 ff 01 00 01 0b 08 00 64
37 f3 a5 00 03 0c 02 02 00
76 0f 45 a9 12 07 00 00 00
00 00 00 00 00
Quote from: rabbit on March 29, 2006, 04:42 PM
That's theoretical, though. A hashtable with O(1) efficiency assumes the hash is perfect (IE: no collisions ever) which doesn't exist. Depending on the type of hash you use as the key, a hashtable can be extremely inefficient.
Page created in 0.166 seconds with 16 queries.