From e9b4f0d9f16ff2d9367b3e9f0f2218a059cfacfd Mon Sep 17 00:00:00 2001 From: vlad902 <> Date: Fri, 30 Dec 2005 21:10:05 +0000 Subject: [PATCH] Fix a small bug and fix some comments git-svn-id: file:///home/svn/incoming/trunk@3284 4d416f70-5f16-0410-b530-b9f4589650da --- modules/nops/sparc/vlad902.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/nops/sparc/vlad902.rb b/modules/nops/sparc/vlad902.rb index 26a11e06e9..33064b78f2 100644 --- a/modules/nops/sparc/vlad902.rb +++ b/modules/nops/sparc/vlad902.rb @@ -70,8 +70,8 @@ class Vlad902 < Msf::Nop def initialize super( - 'Name' => 'Vlad902 SPARC', - 'Alias' => 'ppc_simple', + 'Name' => 'SPARC NOP generator', + 'Alias' => 'sparc_simple', 'Version' => '$Revision$', 'Description' => 'SPARC NOP generator', 'Author' => 'vlad902', @@ -134,13 +134,13 @@ class Vlad902 < Msf::Nop def get_dst_reg reg = rand(30) - reg += 1 if (reg >= 14) - reg += 1 if (reg >= 30) + reg += 1 if (reg >= 14) # %sp + reg += 1 if (reg >= 30) # %fp return reg.to_i end def get_src_reg - return rand(30).to_i + return rand(32).to_i end def ins_sethi(ref, len=0) @@ -187,8 +187,8 @@ class Vlad902 < Msf::Nop def ins_branch(ref, len) - # We jump to 1 instruction before the payload so in cases where the delay slot of a branch with the the anull bit set that is not taken the first instruction of the - # payload is not anulled. + # We jump to 1 instruction before the payload so in cases where the delay slot is another branch instruction that is + # not taken with the anull bit set the first bit of the payload is not anulled. len = (len / 4) - 1 return '' if len == 0