Added: Analyze stealth mode. See all traffic, but dont answer (-A cli). Minor bugs also fixed.

This commit is contained in:
lgandx 2014-01-29 19:14:25 -05:00
commit 9bb2f81044
2 changed files with 173 additions and 68 deletions

View file

@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import re,sys,socket,struct
import re,sys,socket,struct,string
from socket import *
from odict import OrderedDict
@ -101,13 +101,14 @@ class SMBSessionFingerData(Packet):
def OsNameClientVersion(data):
lenght = struct.unpack('<H',data[43:45])[0]
pack = tuple(data[47+lenght:].split('\x00\x00\x00'))[:2]
var = [e.replace('\x00','') for e in data[47+lenght:].split('\x00\x00\x00')[:2]]
OsVersion, ClientVersion = tuple(var)
print "[+] Os version is:",OsVersion
print "[+] ClientVersion is:", ClientVersion
return OsVersion, ClientVersion
try:
lenght = struct.unpack('<H',data[43:45])[0]
pack = tuple(data[47+lenght:].split('\x00\x00\x00'))[:2]
var = [e.replace('\x00','') for e in data[47+lenght:].split('\x00\x00\x00')[:2]]
OsVersion, ClientVersion = tuple(var)
return OsVersion, ClientVersion
except:
return "Could not fingerprint Os version.", "Could not fingerprint LanManager Client version"
def RunSmbFinger(host):
s = socket(AF_INET, SOCK_STREAM)