Thread brute force suche (5 answers)
Opened by Resys at 2004-12-13 17:45

esskar
 2004-12-13 18:15
#49964 #49964
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sub indexex
{
my ($str, $substr, $position) = @_;

my $start = $position || 0;
my $len = length $str;
my $sublen = length $substr;
my @retval = ();

return @retval unless $sublen;
while($start + $sublen < $len)
{
if(substr($str, $start, $sublen))
{
push @retval, $start;
}
$start++;
}

return @retval;
}

View full thread brute force suche