-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend tamper scripts to support decoders for processing responses #512
Conversation
How can we merge this? This can't go into the master branch. You say "extend tamper scripts" while you are making "decoding functions". I need to drop this one. |
I see what is your idea, but this is not a proper implementation for it. |
I was aiming at having a minimal impact on the existing code. What specifically do you object to? |
Why are you using tampering script mechanism while handling and naming
|
I modified the tamper script mechanism because it does most of what I needed, i.e., it imports additional python code and stores the function references somewhere. For my purpose, the only difference is that I don't need to modify requests, but responses (which could probably still be called "tampering" in a way). So, my idea was to support an additional function name (I picked decode(), but it could also be called tamper_response() or anything else) when importing a tamper script, store references to these functions in a list other than kb.tamperFunctions and to use them to process anything returned from Connect.getPage(). What are your thoughts on this general procedure? Do you have any suggestions for an alternate solution to do what I want? |
Sorry for waiting. Problem is of a general matter. If we are talking about encoding/decoding we can enlist them as:
Introducing only one of those, while neglecting the rest, is a little bit clumsy. Also, this moment I can't think of a way how to make a support for all those situations without making gazzilion new switches and/or xyz scripts. |
So what would you think of using the existing tamper script mechanism and extend it to provide support for more general hooks? It already supports 2), my patches introduce basic support for 3), maybe 1) can be added as well. The existing mechanism may have to be changed somewhat, e.g. to use more consistent function names for 1)-3) but it could possibly be done while retaining backwards compatibility for existing tamper scripts for now. |
Issue #25 |
I recently ran into the issue of an SQL-injectable application returning data in a format that sqlmap didn't handle too well. I therefore extended the tamper script logic to also support adding decoders that process responses returned from getPage() before the rest of sqlmap's logic takes over. As I'm not very familiar with the sqlmap codebase I would certainly welcome review of this patch.