Skip to content

Encode parameters with specific encoding #4066

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

Closed
doraeric opened this issue Jan 9, 2020 · 1 comment
Closed

Encode parameters with specific encoding #4066

doraeric opened this issue Jan 9, 2020 · 1 comment
Assignees

Comments

@doraeric
Copy link

doraeric commented Jan 9, 2020

quote_from_bytes('SELECT * FROM 表格'.encode('utf-8'))
# 'SELECT%20%2A%20FROM%20%E8%A1%A8%E6%A0%BC'
quote_from_bytes('SELECT * FROM 表格'.encode('big5'))
# 'SELECT%20%2A%20FROM%20%AA%ED%AE%E6'

Something like curl $url --data 'id=SELECT%20%2A%20FROM%20%AA%ED%AE%E6' will work.

When using sqlmap, it encodes requests with utf-8 even --encoding=big5 is set.

I think the issue is similar to #25 , not sure whether they are the same.

stamparm added a commit that referenced this issue Jan 9, 2020
@stamparm
Copy link
Member

stamparm commented Jan 9, 2020

A) Hi @doraeric. I've made a related "patch", but you haven't said anything about your case, hence, I am not sure if I managed to "reconstruct" what the author wanted to say. For example, I am not sure whether you are having problems with providing --sql-query custom SQL queries, or in case of dumping (i.e. --dump) tables with non-latin names,... Also, I don't know which DBMS or technique are related to this issue
B) Anyway, please update to the latest revision and retry. If the problem "persists" please write more details (like you've been presented inside the template when creating the Issue in the first place)
C) By default, sqlmap does the "escaping" of strings (e.g. "a" -> 0x61), which adds more "unknowns" to this whole issue as I would expect your "issue" to happen in regular, non-enumeration requests. Anyway, lots of unknowns. Maybe the latest revision will solve it auto-magically for you

@stamparm stamparm self-assigned this Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants