Skip to content

Commit bab132b

Browse files
authored
Merge pull request #225 from newlog/bugfix/print_to_stdout
Bugfix/print to stdout Former-commit-id: b4d7e75 [formerly 64d9cc7] Former-commit-id: 12c940af3c4c869548fc694ac0bddd643c89aa38
2 parents 41e6426 + 75cb54e commit bab132b

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
*.pyc
3+
venv

Linux/laZagne.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def verbosity():
7272
elif args['verbose'] >= 2: level = logging.DEBUG
7373

7474
formatter = logging.Formatter(fmt='%(message)s')
75-
stream = logging.StreamHandler()
75+
stream = logging.StreamHandler(sys.stdout)
7676
stream.setFormatter(formatter)
7777
root = logging.getLogger()
7878
root.setLevel(level)

Linux/lazagne/softwares/chats/pidgin.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,22 @@
55
from lazagne.config.constant import *
66
import xml.etree.cElementTree as ET
77
from lazagne.config import homes
8-
import dbus
98
import os
109

10+
try:
11+
import dbus
12+
except ImportError as e:
13+
dbus = None
14+
15+
1116
class Pidgin(ModuleInfo):
1217
def __init__(self):
1318
ModuleInfo.__init__(self, 'pidgin', 'chats')
1419

1520
# If pidgin is started, use the api to retrieve all passwords
1621
def check_if_pidgin_started(self):
22+
if not dbus:
23+
return False
1724
try:
1825
pwdFound = []
1926
bus = dbus.SessionBus()
@@ -38,7 +45,7 @@ def run(self, software_name=None):
3845
pwdFound = []
3946
try:
4047
pwdTab = self.check_if_pidgin_started()
41-
if pwdTab != False:
48+
if pwdTab:
4249
pwdFound = pwdTab
4350
except:
4451
pass

Linux/requirement.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pycrypto
22
pyasn1
33
https://github.com/n1nj4sec/memorpy/archive/master.zip
4+
psutil

Mac/laZagne.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def verbosity():
7171

7272
FORMAT = "%(message)s"
7373
formatter = logging.Formatter(fmt=FORMAT)
74-
stream = logging.StreamHandler()
74+
stream = logging.StreamHandler(sys.stdout)
7575
stream.setFormatter(formatter)
7676

7777
root = logging.getLogger()

Windows/laZagne.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def verbosity():
8383
elif args['verbose'] >= 2: level = logging.DEBUG
8484

8585
formatter = logging.Formatter(fmt='%(message)s')
86-
stream = logging.StreamHandler()
86+
stream = logging.StreamHandler(sys.stdout)
8787
stream.setFormatter(formatter)
8888
root = logging.getLogger()
8989
root.setLevel(level)

0 commit comments

Comments
 (0)