Skip to content

Commit

Permalink
Check posh & project directories end with slash in Config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
riskydissonance committed Jul 30, 2020
1 parent 680c641 commit f495bab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion poshc2/client/reporting/HTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def graphviz():
time.sleep(1)


Gdef generate_table(table):
def generate_table(table):
HTMLPre = """<script>
function resizableGrid(e){var t=e.getElementsByTagName("tr")[0],n=t?t.children:void 0;if(n){e.style.overflow="hidden";for(var i=e.offsetHeight,o=0;o<n.length;o++){var r=s(i);n[o].appendChild(r),n[o].style.position="relative",d(r)}}function d(e){var t,n,i,o,r;e.addEventListener("mousedown",function(e){n=e.target.parentElement,i=n.nextElementSibling,t=e.pageX;var d=function(e){if("border-box"==l(e,"box-sizing"))return 0;var t=l(e,"padding-left"),n=l(e,"padding-right");return parseInt(t)+parseInt(n)}(n);o=n.offsetWidth-d,i&&(r=i.offsetWidth-d)}),e.addEventListener("mouseover",function(e){e.target.style.borderRight="2px solid #0000ff"}),e.addEventListener("mouseout",function(e){e.target.style.borderRight=""}),document.addEventListener("mousemove",function(e){if(n){var d=e.pageX-t;i&&(i.style.width=r-d+"px"),n.style.width=o+d+"px"}}),document.addEventListener("mouseup",function(e){n=void 0,i=void 0,t=void 0,r=void 0,o=void 0})}function s(e){var t=document.createElement("div");return t.style.top=0,t.style.right=0,t.style.width="5px",t.style.position="absolute",t.style.cursor="col-resize",t.style.userSelect="none",t.style.height=e+"px",t}function l(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)}}
Expand Down
6 changes: 6 additions & 0 deletions poshc2/server/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@

# Directory & file locations
PoshInstallDirectory = config["PoshInstallDirectory"]
if not PoshInstallDirectory.endswith("/"):
PoshInstallDirectory = PoshInstallDirectory + "/"

PoshProjectDirectory = config["PoshProjectDirectory"]
if not PoshProjectDirectory.endswith("/"):
PoshProjectDirectory = PoshInstallDirectory + "/"

ResourcesDirectory = "%sresources%s" % (PoshInstallDirectory, os.sep)
PayloadTemplatesDirectory = "%spayload-templates%s" % (ResourcesDirectory, os.sep)
BeaconDataDirectory = "%sbeacon-data%s" % (ResourcesDirectory, os.sep)
Expand Down

0 comments on commit f495bab

Please sign in to comment.