Yoko

All sides of Injection
It is currently 2026-01-16 07:08:10

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2005-02-08 17:57:37 
Offline

Joined: 2005-02-05 22:28:14
Posts: 5
Hey there..
I would like you to evaluate these scripts and tell me if they are really ok :D!


This one is about separating string such as "abc cdf aaa"
The output would be :
sArray[0] = Count of separated strings (3 on the sample)
sArray[1] = abc
sArray[2] = cdf
sArray[3] = aaa

Code:
Sub SeparateString(string,sArray)

var LastAdd = 1
var tempString = ""
var i
for i = 0 to Len(string)

   If not string[i] == " " then
      tempString = tempString + string[i]
   End if
   If string[i] == " " or Len(string) == i then
      If not tempString == "" then
         sArray[LastAdd] = tempString
         tempString = ""
         LastAdd = LastAdd + 1
      End if
   End if
   
next
sArray[0] = LastAdd - 1
return sArray
End sub



Ok, this next one is about finding a substring on a fullstring..
I haven't found any injection function for that, and then i decided to do it myself..
Example: InString("what","ha"), InString("staff","af")
It returns 1 because it's found there..

Code:
Sub InString(string,what)

var i
var ii
var i2 = 0
var tempString = ""
var tMax = Len(string)
tempString = ""   
For i = 0 to max
   For ii = i to max
      
      While ii


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited