Re: [sqlite] Abuse of the SQLite website

2007-01-30 Thread David Pitcher

You could adapt this ruleset used to block ssh bruteforce attacks:

( quoting from http://www.la-samhna.de/library/brutessh.html )
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set \
--name SSH -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 
60 --hitcount 4 --rttl \

--name SSH -j LOG --log-prefix "SSH_brute_force "
iptables -A INPUT -p tcp --dport 22 -m recent --update --seconds 60 \
--hitcount 4 --rttl --name SSH -j DROP
For whitelisting, a possible variation (also described by Andrew Pollock) 
would be:


(1) Create a custom chain for whitelisting first:

iptables -N SSH_WHITELIST
(2) Whitelist any host(s) that you like:

iptables -A SSH_WHITELIST -s TRUSTED_HOST_IP -m recent --remove --name 
SSH -j ACCEPT

(3) Add the blocking rules:

iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set \
--name SSH
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_WHITELIST
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update 
\
--seconds 60 --hitcount 4 --rttl --name SSH -j ULOG --ulog-prefix 
SSH_brute_force
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update 
\

--seconds 60 --hitcount 4 --rttl --name SSH -j DROP
David. 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Proposed 3.3.0 changes. Was: 5/2==2

2005-11-02 Thread David Pitcher

Am I alone in thinking that a division operator that does
different things depending on the declared datatype of a
column is an abomination?


Absolutely not.

Of course he won't be alone, doesn't make him ( or you ) correct or in fact 
incorrect.


I think allowing mathematical operators built into databases in the first 
place is an absurdity, but many will disagree with me ... and agree with me. 
So what?


I'd much rather used a stored procedure for implementing my own tightly 
coupled operations that rely on database providers to continue to expand 
their products into a realm where subjectivity plays such a big part.


However, the mere thought that someone would use an operation where two 
declared Integer values used in that operation could create a Real value 
without explicity declaring that you are using Real operators to do it makes 
me shudder. Operators are always, without fail, contextual, when they exist 
for multiple types. Whether you keep the same name or not for the operator 
is an issue that is best addressed by a standards body, IMHO.


Use a hammer for hammering, and a screwdriver for screwing ( screws ).

Dave. 



Re: [sqlite] Proposed 3.3.0 changes. Was: 5/2==2

2005-11-02 Thread David Pitcher

Well, since you put it that way.  May I go one step farther and

request

that this new Dynamic Type also adhere to "Bankers Rounding" commonly
implemented as BCD in other so equipped databases.


Please, no.  I'll handle rounding in my application, I don't need it on
the database.  Not all database applications are banking applications.



A type for every occasion perhaps? ;-)

Dave.


Re: [sqlite] Proposed 3.3.0 changes. Was: 5/2==2

2005-11-02 Thread David Pitcher

1/3.

Store that mysql ;-) Or what about PI? Or the square root of 10?

Not all reals can be represented as fractions either. Surd-tastic. Whilst 
computers are finite state machines such approximations are the most 
reasonable compromise between accuracy and performance. Or should that be 
practicality and stupidity?


Changing to some super-duper as yet undefined and nebulous system is an 
entertaining thought, but impractical. Besides, discrete integer based 
models are perfectly valid and require representation in databases.


I believe however that reducing the boundaries between integer and real 
might have its real world drawbacks. Seems to me a flexible 'number' format 
might be more appropriate. Worrying about number formats is something thats 
really only truly important when you use mathematical operations in the 
virtual machine. If one couldn't distinguish between the outcome of basic 
operations based on its type, then one needs to distinguish between them by 
name.


Regards

Dave. 



Re: [sqlite] Running in memory only

2005-08-31 Thread David Pitcher

Salut Benjamin,

Simplest way to make that happen is to use a ram disk, google for 'RamDisk' 
and the platform you are using. Then you can use the existing sqlite 
binary/library but all I/O occurs in memory.


When you want to persist, you just copy it to a hard disk...

D.