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

Identification des scriptblocks #117

Open
LxLeChat opened this issue Nov 11, 2021 · 0 comments
Open

Identification des scriptblocks #117

LxLeChat opened this issue Nov 11, 2021 · 0 comments

Comments

@LxLeChat
Copy link
Owner

j'aimerai pouvoir représenter les trucs dans les scriptblock, ici un foreach-object car ça peut contenir beaucoup de code

$a = [scriptblock]::Create({if ( $x) {$true};$a= get-process | foreach { $_.name}})

$sc = $a.Ast.FindAll({$args[0] -is [System.Management.Automation.Language.ScriptBlockExpressionAst]},$true)
$named = $a.ast.Find({$args[0] -is [System.Management.Automation.Language.NamedBlockAst]},$false)
$sc.parent.parent.Parent.parent -eq $named

un début d'idée .. maintenant il faut être capable de bien représenter ça sur le graph ... donc remonter jusqu'a l'assignation de la variable.. à voir !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant