Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function read_query(packet)
- if packet:byte() ~= proxy.COM_QUERY then return end
- local query = packet:sub(2)
- --if query:match('INSERT') then
- --local tokens = proxy.tokenize(query)
- --if tokens[3]['text'] == 'envdata_met'
- -- and tokens[10]['text'] == '1' then
- -- print("match! " .. query)
- -- os.execute('echo "/home/user/Documents/Scripts/sql-to-4store.sh ' .. tokens[6]['text']"')
- --end
- query=string.gsub(query, "`", "")
- os.execute('/usr/local/src/hlapi.sh "' .. query .. '"')
- --end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement