quick fix for a bug reported by Kirill (AttributeError: 'NoneType' object has no attribute 'split')

This commit is contained in:
Miroslav Stampar 2011-04-01 11:14:24 +00:00
parent ee15988878
commit 60102209f6
2 changed files with 5 additions and 5 deletions

View File

@ -142,7 +142,7 @@ class Enumeration:
if Backend.getIdentifiedDbms() == DBMS.MYSQL: if Backend.getIdentifiedDbms() == DBMS.MYSQL:
self.getCurrentUser() self.getCurrentUser()
query = queries[Backend.getIdentifiedDbms()].is_dba.query % kb.data.currentUser.split("@")[0] query = queries[Backend.getIdentifiedDbms()].is_dba.query % (kb.data.currentUser.split("@")[0] if kb.data.currentUser else None)
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE) and user is not None: elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE) and user is not None:
query = queries[Backend.getIdentifiedDbms()].is_dba.query2 % user query = queries[Backend.getIdentifiedDbms()].is_dba.query2 % user
else: else:

View File

@ -323,7 +323,7 @@
</case> </case>
<case name="MSSQL (--technique=1 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump --threads=4)"> <case name="MSSQL (--technique=1 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump --threads=4)">
<switches> <switches>
<url value="http://windowsenv/sqlmap/mssql/iis/get_int.asp?id=1"/> <url value="http://windowsdev/sqlmap/mssql/iis/get_int.asp?id=1"/>
<isDba value="True"/> <isDba value="True"/>
<technique value="1"/> <technique value="1"/>
<getBanner value="True"/> <getBanner value="True"/>
@ -350,7 +350,7 @@
</case> </case>
<case name="MSSQL (--technique=2 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump)"> <case name="MSSQL (--technique=2 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump)">
<switches> <switches>
<url value="http://windowsenv/sqlmap/mssql/iis/get_int.asp?id=1"/> <url value="http://windowsdev/sqlmap/mssql/iis/get_int.asp?id=1"/>
<isDba value="True"/> <isDba value="True"/>
<technique value="2"/> <technique value="2"/>
<getBanner value="True"/> <getBanner value="True"/>
@ -376,7 +376,7 @@
</case> </case>
<case name="MSSQL (--technique=3 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump)"> <case name="MSSQL (--technique=3 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump)">
<switches> <switches>
<url value="http://windowsenv/sqlmap/mssql/iis/get_int.asp?id=1"/> <url value="http://windowsdev/sqlmap/mssql/iis/get_int.asp?id=1"/>
<isDba value="True"/> <isDba value="True"/>
<technique value="3"/> <technique value="3"/>
<getBanner value="True"/> <getBanner value="True"/>
@ -402,7 +402,7 @@
</case> </case>
<case name="MSSQL partial union (--technique=3 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump)"> <case name="MSSQL partial union (--technique=3 --is-dba --banner --current-user --current-db --dbs --tables -D testdb -T users --columns --dump)">
<switches> <switches>
<url value="http://windowsenv/sqlmap/mssql/iis/get_int_partialunion.asp?id=1"/> <url value="http://windowsdev/sqlmap/mssql/iis/get_int_partialunion.asp?id=1"/>
<isDba value="True"/> <isDba value="True"/>
<technique value="3"/> <technique value="3"/>
<getBanner value="True"/> <getBanner value="True"/>