I need to use hooks without using theme and module
Yes, hooks must be implemented in a module or theme.

The only other options would be:


Hack at the core functionality until it does what you want. This is bad for many reasons.
Use the PHP filter module, and hope that it's compatible with the place(s) you need to inject your custom code. This is even worse than the first method.


Moral of the story: 

Drupal provides hooks in themes and/or modules to extend its functionality.

If you need to extend Drupal's functionalality, use hooks in themes and/or modules.