Remove sleep and constant usage warnings
parent
334a93af45
commit
7b0acd238e
11
HACKING
11
HACKING
|
@ -36,12 +36,6 @@ lock up the entire module when called from other interfaces. If you
|
|||
need user input, you can either register an option or expose an
|
||||
interactive session type specific for the type of exploit.
|
||||
|
||||
3. Don't use "sleep". It has been known to cause issues with
|
||||
multi-threaded programs on various platforms running an older version of
|
||||
Ruby such as 1.8. Instead, we use "select(nil, nil, nil, <time>)" or
|
||||
Rex.sleep() throughout the framework. We have found this works around
|
||||
the underlying issue.
|
||||
|
||||
4. Always use Rex sockets, not ruby sockets. This includes
|
||||
third-party libraries such as Net::Http. There are several very good
|
||||
reasons for this rule. First, the framework doesn't get notified on
|
||||
|
@ -92,11 +86,6 @@ and libraries. If you need a "global" within a specific class, you can
|
|||
use @@class_variables, but most modules should use @instance variables
|
||||
to store information between methods.
|
||||
|
||||
10. Do not define CONSTANTS within individual modules. This can lead to
|
||||
warning messages when the module is reloaded. Try to keep constants
|
||||
inside libraries and mixins instead.
|
||||
|
||||
|
||||
Creating New Modules
|
||||
====================
|
||||
|
||||
|
|
Loading…
Reference in New Issue