Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding color #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ds_store_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def process(self):
except Exception, e:
if e.code != 404:
self.lock.acquire()
print '[%s] %s' % (e.code, url)
print '\033[91m[%s]\033[00m %s' % (e.code, url)
self.lock.release()
continue

Expand All @@ -61,7 +61,7 @@ def process(self):
os.makedirs(folder_name)
with open(netloc.replace(':', '_') + path, 'wb') as outFile:
self.lock.acquire()
print '[%s] %s' % (response.code, url)
print '\033[92m[%s]\033[00m %s' % (response.code, url)
self.lock.release()
outFile.write(data)
if url.endswith('.DS_Store'):
Expand All @@ -79,7 +79,7 @@ def process(self):
d.close()
except Exception as e:
self.lock.acquire()
print '[!] %s' % str(e)
print '\033[93m[!]\033[00m %s' % str(e)
self.lock.release()
finally:
self.working_thread -= 1
Expand Down