So, When I am taking an exam that requires me to read a full PDF, and in this case 400+ pages. I found this neat little trick. https://pdf2jpg.net Convert’s any PDF less than 25MB to thumbnail images. Using this way, I then target the folder full of the pictures and it dumps all the data …
Category Archives: Uncategorized
Who logged onto this machine?
So, A day or so ago. I was in progress of a server retirement and was required to do some minor investigation as to see who may have been using the server if anyone at all. I found this pretty neat little script that is much like UPTIME to see who may have recently logged …
Submitting SOAP request to create users within EPIC EMR
WSDL: https://EpicServer/Interconnect-REL-EDI/wcf/Epic.Security.GeneratedServices/PersonnelManagement.svc?wsdl REQUEST:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Epic-com:Security.2014.Services.PersonnelManagement" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:urn1="urn:Epic-com:Security.2012.Services.PersonnelManagement"> <soapenv:Header/> <soapenv:Body> <urn:CreateUser> <urn:UserInternalID>*</urn:UserInternalID> <urn:Name>Hall, Nicholas A</urn:Name> <urn:ContactDate>T</urn:ContactDate> <urn:ContactComment>Initial Entry</urn:ContactComment> <urn:SystemLoginID>12345</urn:SystemLoginID> <urn:IsActive>0</urn:IsActive> <urn:UserDictionaryPath>\\epic-files\User_Dictionaries\12345dictionary.tlx</urn:UserDictionaryPath> <urn:LinkedTemplatesConfig> <urn:AppliedTemplateID> <urn1:ID>T1595999</urn1:ID> <urn1:Type>external</urn1:Type> </urn:AppliedTemplateID> <urn:AvailableLinkableTemplates> <urn:AvailableTemplateSetup> <urn:LinkedTemplateID> <urn1:ID>T1595999</urn1:ID> <urn1:Type>external</urn1:Type> </urn:LinkedTemplateID> </urn:AvailableTemplateSetup> <urn:AvailableTemplateSetup> <urn:LinkedTemplateID> <urn1:ID>T2101700303</urn1:ID> <urn1:Type>external</urn1:Type> </urn:LinkedTemplateID> </urn:AvailableTemplateSetup> </urn:AvailableLinkableTemplates> <urn:DefaultTemplateID> <urn1:ID>T1595999</urn1:ID> <urn1:Type>external</urn1:Type> </urn:DefaultTemplateID> </urn:LinkedTemplatesConfig> <urn:UserSubtemplateIDs> <urn1:IndexedRecordIn> <urn1:Identifier> <urn1:ID>T00063</urn1:ID> <urn1:Type>external</urn1:Type> </urn1:Identifier> <urn1:Index>1</urn1:Index> </urn1:IndexedRecordIn> <urn1:IndexedRecordIn> <urn1:Identifier> <urn1:ID>ST5089456</urn1:ID> <urn1:Type>external</urn1:Type> </urn1:Identifier> <urn1:Index>2</urn1:Index> </urn1:IndexedRecordIn> </urn:UserSubtemplateIDs> <urn:CustomUserDictionaries> <urn1:IndexedString> <urn1:Index>1</urn1:Index> <urn1:Value>\\epic-files\User_Dictionaries\12345Ddictionary.tlx</urn1:Value> </urn1:IndexedString> </urn:CustomUserDictionaries> <urn:ExternalIdentifiers> <urn1:ExternalIdentifier> <urn1:Identifier>e12345</urn1:Identifier> <urn1:IdentifierType>EMC Mckesson Document Imaging</urn1:IdentifierType> <urn1:IsActive>true</urn1:IsActive> </urn1:ExternalIdentifier> </urn:ExternalIdentifiers> </urn:CreateUser> </soapenv:Body> </soapenv:Envelope> |
RESPONSE:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <CreateUserResponse xmlns="urn:Epic-com:Security.2014.Services.PersonnelManagement"> <CreateUserResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Messages xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <a:string/> <a:string/> <a:string>User name automatically formatted to HALL, NICHOLAS</a:string> </Messages> <UserIDs xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"> <a:IDType> <a:ID>12131</a:ID> <a:Type>External</a:Type> </a:IDType> <a:IDType> <a:ID>12131</a:ID> <a:Type>Internal</a:Type> </a:IDType> <a:IDType> <a:ID>HALL, NICHOLAS</a:ID> <a:Type>Name</a:Type> </a:IDType> <a:IDType> <a:ID>12345</a:ID> <a:Type>SystemLogin</a:Type> </a:IDType> </UserIDs> </CreateUserResult> </CreateUserResponse> </s:Body> </s:Envelope> |
REQUEST:
|
1 2 3 4 5 6 7 8 9 10 |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Epic-com:Security.2014.Services.PersonnelManagement"> <soapenv:Header/> <soapenv:Body> <urn:ViewUser> <urn:UserID>12345</urn:UserID> <urn:UserIDType>SystemLogin</urn:UserIDType> </urn:ViewUser> </soapenv:Body> </soapenv:Envelope> |
RESPONSE:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <ViewUserResponse xmlns="urn:Epic-com:Security.2014.Services.PersonnelManagement"> <ViewUserResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <AuthenticationConfigurationID xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"/> <BlockStatus xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"> <a:Comment/> <a:IsBlocked>false</a:IsBlocked> <a:Reason/> </BlockStatus> <CategoryReportGrouper1 xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <CategoryReportGrouper2 xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <CategoryReportGrouper3 xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <CategoryReportGrouper4 xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <CategoryReportGrouper5 xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <CategoryReportGrouper6 xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <ContactComment>Initial Entry</ContactComment> <CustomUserDictionaries xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"> <a:IndexedString> <a:Index>1</a:Index> <a:Value>\\Serverfiles\User_Dictionaries\12345Ddictionary.tlx</a:Value> </a:IndexedString> </CustomUserDictionaries> <DefaultLoginDepartmentID xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"/> <EmployeeDemographics/> <EndDate i:nil="true"/> <ExternalIdentifiers xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"/> <InBasketClassifications xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <IsActive>false</IsActive> <IsPasswordChangeRequired>false</IsPasswordChangeRequired> <LDAPOverrideID/> <LinkedProviderID xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"/> <LinkedTemplatesConfig> <AppliedTemplateID xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"> ...... </AppliedTemplateID> <AvailableLinkableTemplates> <AvailableTemplateSetupOut> <EndDate/> ...... <LoginTypes xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/> <StartDate/> </AvailableTemplateSetupOut> </AvailableLinkableTemplates> <DefaultTemplateID xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"> ..... </DefaultTemplateID> </LinkedTemplatesConfig> <Name>Nicholas Hall</Name> <Notes/> <PrimaryManager xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"/> <ProviderAtLoginOption/> <ReportGrouper1/> <ReportGrouper2/> <ReportGrouper3/> <Sex/> <StartDate i:nil="true"/> <UserAlias/> <UserComplexName> .... </UserComplexName> .... <UsersManagers xmlns:a="urn:Epic-com:Security.2012.Services.PersonnelManagement"/> </ViewUserResult> </ViewUserResponse> </s:Body> </s:Envelope> |
CEH 07/18/2018 – Class
Yesterday, I ended up giving a 90-minute talk in the Certified Ethical Hacker course and found that my colleagues required a little bit from brushing up on the network foundation. In the course of the hour and a half, I noted the following bullet points. TOPIC: OSI Layers and ARP Poisoning Things to note on …
Pulling Data from Workday with powershell for Active Employees.
Grab a copy of Workday Powershell API here at GitHub and place it in your “Program Files\WindowsPowerShell\Modules” folder.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
Remove-Variable * -ErrorAction SilentlyContinue; Remove-Module *; $error.Clear(); Clear-Host function WriteXmlToScreen ([xml]$xml) { $StringWriter = New-Object System.IO.StringWriter; $XmlWriter = New-Object System.Xml.XmlTextWriter $StringWriter; $XmlWriter.Formatting = "indented"; $xml.WriteTo($XmlWriter); $XmlWriter.Flush(); $StringWriter.Flush(); Write-Output $StringWriter.ToString(); } function Get-XPath($n) { if ( $n.GetType().Name -ne 'XmlDocument' ) { "{0}/{1}" -f (Get-XPath $n.ParentNode), $n.Name } } $scriptpath = $MyInvocation.MyCommand.Path $dir = Split-Path $scriptpath Push-Location $dir $user = 'ISU_INT001_Provisioning' $SecretPassword = 'Pazzsw0rdGoezHere' $pair = "$($user):$($SecretPassword)" $where = 'https://services1.myworkday.com/ccx/service/customreport1/[YOUR TENANT]/ISU_INT001_Provisioning/RPT_INT001_Provisioning_Active_Workers_Data_Outbound?format=simplexml' $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair)) $basicAuthValue = "Basic $encodedCreds" $Headers = @{ Authorization = $basicAuthValue } [xml]$myxml = Invoke-WebRequest -Uri $where -Headers $Headers WriteXmlToScreen $myxml [string]$CreatePipedFile = "" [string]$ModifyPipedFile = "" #$nodes = $myxml.SelectNodes('//*') $nodes = $myxml.SelectNodes('//*') foreach ($node in $nodes) { #if ($node.Name -ne "wd:Report_Data" -AND $node.name -ne "wd:Report_Entry") if ($node.Name -ne "wd:Report_Data") { if ($node.name -eq "wd:Report_Entry") { <# Write-Host "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" Write-Host "Name: " $node.Name Write-Host "Worker:" $node.Worker Write-Host "Worker_Type:" $node.Worker_Type switch($node.Worker_Type.ToLower()) { "yes" { $_ = "y" } "employee" {$Worker_Type = "EMP"} "contingent worker" { $Worker_Type = "CONT" } default { "You entered No." } } Write-Host "Emp_ID:" $node.Emp_ID Write-Host "Dep-Cd:" $node.Dep_Cd Write-Host "Dep_Name:" $node.Dep_Name Write-Host "Position_ID:" $node.Position_ID Write-Host "Position_Title:" $node.Position_Title Write-Host "L_Name:" $node.L_Name Write-Host "M_Name:" $node.M_Name Write-Host "F_Name:" $node.F_Name Write-Host "Entity:" $node.Entity Write-Host "Manager_ID:" $node.Manager_ID Write-Host "Director_ID:" $node.Director_ID Write-Host "Perf_Name:" $node.Pref_Name Write-Host "Leaving:" $node.LV_St_dt Write-Host "Return:" $node.Est_Ret_frm_leave Write-Host "Active:" $node.Active Write-Host "SSN: ***-**-****" Write-Host "Hire_Date:" $node.Hire_Date Write-Host "WorkEmail:" $node.WorkEmail Write-Host "`n" #> #Fix Date without '-' #Add leave dates to be added, fix 'AC' value #FT10 FT08 etc etc #Append hire date to end [datetime]$HireDate = $node.Hire_Date [datetime]$HireCompDate = $node.Hir_Comp_Dttm if (($HireDate -gt (Get-Date) -and $HireDate -lt (Get-Date).AddDays(14)) -or ($HireCompDate -lt (Get-Date).AddDays(1) -and $HireCompDate -gt (Get-Date).AddDays(-14))) #Testing for Newhire / Create { if ([string]::IsNullOrEmpty($node.WorkEmail)) { $PipedFile += "BLANK!" } $CreatePipedFile += "!CREATE_USER|" + $node.Emp_ID + "|" + $node.Dep_Cd + "|" + $node.Position_ID + "|" + $node.F_Name + "|" + $node.M_Name + "|" + $node.L_Name + "|" + $node.Entity + "|" + $node.Director_ID + "|" + $node.Dep_Name + "|" + $node.Position_title + "|" + ($node.Hire_Date -replace '-','') + "|" + ($node.SSN -replace '-','') + "|" + $node.Emp_Type + "|" + $node.WorkEmail + "|" + $node.Worker_Type +"`r`n" #$Worker_Type } ElseIf ($HireDate -gt (Get-Date).AddDays(14)) { Write-Host "User is in the future!" $node.Emp_ID " - " $HireDate } else { if ([string]::IsNullOrEmpty($node.WorkEmail)) { $PipedFile += "BLANK!" } $ModifyPipedFile += "!MODIFY_USER|" + $node.Emp_ID + "|" + $node.Dep_Cd + "|" + $node.Dep_Name + "|" + $node.Position_ID + "|" + $node.Position_title + "|" + $node.L_Name + "|" + $node.M_Name + "|" + $node.F_Name + "|" + $node.Entity + "|" + $node.Director_ID + "|" + $node.Pref_Name + "|" + ($node.LV_St_dt -replace '-','') +"|" + ($node.Est_Ret_frm_leave -replace '-','') + "|AC|" + ($node.SSN -replace '-','') + "|" + ($node.Hire_Date -replace '-','') + "|" + $node.Emp_Type + "|" + $node.WorkEmail + "|" + $node.Worker_Type +"`r`n" } #" =-=-=-=-= " $node.InnerText " | " } #Get-XPath($node) #$sid = $node.attributes['wd:Worker'].value #$dispName = $node.attributes['wd:Emp_ID'].value #$obj = new-object psobject -prop @{SID=$sid;DISPNAME=$dispName} #$objs += $obj } } #$objs Pop-Location Write-Host $CreatePipedFile Write-Host $ModifyPipedFile $CreatePipedFile | Set-Content 'C:\RecentHires.txt' $ModifyPipedFile | Set-Content 'C:\BeenHereAwhile.txt' |