-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
11 changed files
with
86 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ plaso (1.4.1-1) unstable; urgency=low | |
|
||
* Auto-generated | ||
|
||
-- Log2Timeline <[email protected]> Fri, 16 Sep 2016 06:46:44 +0200 | ||
-- Log2Timeline <[email protected]> Sat, 17 Sep 2016 19:49:02 +0200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# -*- coding: utf-8 -*- | ||
"""This file contains functions for certain platform specific operations.""" | ||
import sys | ||
|
||
|
||
# Windows-only imports | ||
try: | ||
import msvcrt | ||
import win32api | ||
import win32con | ||
except ImportError: | ||
msvcrt = None | ||
win32api = None | ||
win32con = None | ||
|
||
|
||
def DisableWindowsFileHandleInheritance(file_descriptor): | ||
"""Flags a Windows file descriptor so that child processes don't inherit it. | ||
Args: | ||
file_descriptor (int): file handle descriptor, as returned by fileno() and | ||
similar methods. | ||
""" | ||
if msvcrt and win32api and win32con: | ||
os_handle = msvcrt.get_osfhandle(file_descriptor) | ||
win32api.SetHandleInformation(os_handle, win32con.HANDLE_FLAG_INHERIT, 0) | ||
return | ||
raise RuntimeError | ||
|
||
|
||
def PlatformIsDarwin(): | ||
"""Checks if the current platform is Windows. | ||
Returns: | ||
bool: True if Python is running on Darwin. | ||
""" | ||
return sys.platform.startswith(u'darwin') | ||
|
||
|
||
def PlatformIsLinux(): | ||
"""Checks if the current platform is Windows. | ||
Returns: | ||
bool: True if Python is running on Windows. | ||
""" | ||
return sys.platform.startswith(u'linux') | ||
|
||
|
||
def PlatformIsWindows(): | ||
"""Checks if the current platform is Windows. | ||
Returns: | ||
bool: True if Python is running on Windows. | ||
""" | ||
return sys.platform.startswith(u'win') or sys.platform.startswith(u'cygwin') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters