Skip to content

Commit

Permalink
Adding a shortcut that can be used in a unit test. Not the right appr…
Browse files Browse the repository at this point in the history
…oach but gets it off the ground.
  • Loading branch information
mrajweir committed Jan 25, 2023
1 parent 13839cf commit 440614d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LnkAnalyser
A Python module for the forensic analysis of Windows shortcuts (they're surYpprisingly useful.) This package is parses
shortcuts against the [Windows MS-SHLLINK standard](https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-SHLLINK/%5bMS-SHLLINK%5d.pdf]).
A Python module for the forensic analysis of Windows shortcuts (they're surprisingly useful.) This package is parses
shortcuts against the [Windows MS-SHLLINK standard](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/16cb4ca1-9339-4d0c-a68d-bf1d6cc0f943]).

## Usage

Expand Down
Binary file added tests/Desktop.lnk
Binary file not shown.
20 changes: 18 additions & 2 deletions tests/test_LnkAnalyser.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
import unittest
from LnkAnalyser import lnkanalyser

class TestLnkAnalyser(unittest.TestCase):

def test_Init(self):
self.assertEqual('foo'.upper(), 'FOO')

def travis_ci_test(self):
self.assertEqual(1, 1)
def test_shortcut(self):
shortcut = lnkanalyser.go("Desktop.lnk")

print(shortcut["header_size"])
print(shortcut["link_class_id"])
print(shortcut["link_flags"])
print(shortcut["file_attributes"])
print(shortcut["creation_time_of_link_target"])
print(shortcut["access_time_of_link_target"])
print(shortcut["write_time_of_link_target"])
print(shortcut["target_file_size"])
print(shortcut["icon_index"])
print(shortcut["expected_window_state"])
print(shortcut["hot_key"])
print(shortcut["reserved_one"])
print(shortcut["reserved_two"])
print(shortcut["reserved_three"])

0 comments on commit 440614d

Please sign in to comment.