DarkIrata Posted June 5, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 218 Reputation: 32 Joined: 05/29/12 Last Seen: February 13, 2024 Share Posted June 5, 2012 Hello, Is it possible to make a SQL Injection on a NPC where you cant put text? (The text will checked in a sql table) I tryed it few times without a success, but i think its still better if i ask before i use it ^^ Sry if there already a topic about it, nothing found so fast :/ Quote Link to comment Share on other sites More sharing options...
EvilPuncker Posted June 5, 2012 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 713 Reputation: 71 Joined: 11/08/11 Last Seen: December 25, 2024 Share Posted June 5, 2012 --------------------------------------- *escape_sql(<value>) Converts the value to a string and escapes special characters so that it is safe to use in query_sql(). Returns the escaped form of the given value. Example 1: set .@str$, "John's Laptop"; set .@esc_str$, escape_sql(.@name$); // Escaped string: John\'s Laptop --------------------------------------- 2 Quote Link to comment Share on other sites More sharing options...
DarkIrata Posted June 5, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 218 Reputation: 32 Joined: 05/29/12 Last Seen: February 13, 2024 Author Share Posted June 5, 2012 Ahh thank you, good thats i asked ^-^ Quote Link to comment Share on other sites More sharing options...
plankt Posted June 5, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 130 Reputation: 43 Joined: 12/11/11 Last Seen: July 16, 2017 Share Posted June 5, 2012 It's next to impossible to inject if they do not get to insert text. A possibility could exist depending on where it gathers it's information; like the name of character or a party name which could lead to an injection. 1 Quote Link to comment Share on other sites More sharing options...
DarkIrata Posted June 5, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 218 Reputation: 32 Joined: 05/29/12 Last Seen: February 13, 2024 Author Share Posted June 5, 2012 The problem is, i need to make a input. I know thats without thats, it would be impossible... (i can a little bit php) Quote Link to comment Share on other sites More sharing options...
Toshiro Posted June 5, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 106 Reputation: 29 Joined: 11/08/11 Last Seen: May 3 Share Posted June 5, 2012 The problem is, i need to make a input. I know thats without thats, it would be impossible... (i can a little bit php) There is no problem if you pass the input through escape_sql, it's completely safe then. input .@input$; query_sql("SELECT `char_id` FROM `login` WHERE `name` = '"+escape_sql(.@input$)+"' LIMIT 1", .@charid); 1 Quote Link to comment Share on other sites More sharing options...
Question
DarkIrata
Hello,
Is it possible to make a SQL Injection on a NPC where you cant put text?
(The text will checked in a sql table)
I tryed it few times without a success, but i think its still better if i ask before i use it ^^
Sry if there already a topic about it, nothing found so fast :/
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.