About random command, and some string functions.

General Injection issues

Moderators: Murderator+, Murderator

Post Reply
Psyny
Posts: 22
Joined: 2004-07-06 07:03:29
Contact:

About random command, and some string functions.

Post by Psyny »

Hello ! Long time i dont brother here =)

Well. Iam with 2 problems:

1-When i use a random command inside a loop... the randomered give the same value...

Exemple:

Code: Select all

var temp
for temp=1 to 10
 uo.print(str( uo.random(20) ) )
next


if the first time it return "13", the another 9 times it will return "13" too.

How i can solve it ?

--------------------------------

2- Whats the string functions that injection uses ?

I need to do something like that:

String: "Vendor Joe: Hello, what u need ?"

a: Take only the text before the " : " and after that remove the "vendor" title.

b: The string after " : " is the question that can change.

c: give the answer based in the question: "Hello Joe, i need to buy something"

in PHP i can use the functions "left" , "right" , "string pos" to do that. But how i can do that here ?
Edred
Expert!
Posts: 2544
Joined: 2004-04-03 17:36:29
Location: Saint-Petersburg

Re: About random command, and some string functions.

Post by Edred »

Psyny wrote:in PHP i can use the functions "left" , "right" , "string pos" to do that. But how i can do that here ?


You can use left(), right(), mid() in injection's scripts...
Psyny
Posts: 22
Joined: 2004-07-06 07:03:29
Contact:

Post by Psyny »

oh my god... iam blind...

hehehe ok.. thx
Post Reply