• Познакомьтесь с пентестом веб-приложений на практике в нашем новом бесплатном курсе

    «Анализ защищенности веб-приложений»

    🔥 Записаться бесплатно!

  • CTF с учебными материалами Codeby Games

    Обучение кибербезопасности в игровой форме. Более 200 заданий по Active Directory, OSINT, PWN, Веб, Стеганографии, Реверс-инжинирингу, Форензике и Криптографии. Школа CTF с бесплатными курсами по всем категориям.

А как из агента запускать процесс?

  • Автор темы rocsolanka
  • Дата начала
Статус
Закрыто для дальнейших ответов.
R

rocsolanka

Задача: Из агента(выполняющегося на сервере) запустить некую прогу, которая лежит на том же сервере, дождаться результата и, затем, что-то с результатом сделать. Подскажите, где копать? Насколько я поняла, при помощи LS это не сделаешь. Значит, Java? Где искать?
 

Medevic

Что это ? :)
Green Team
10.12.2004
3 334
1
BIT
4
Посмотри в дизайнере пример по функции Yield.
Возможно это то, что тебе надо.
Yield control to allow the user to perform one or more calculations. When the user is done, continue with the script.
The DoCalc sub uses a Shell statement to start the Windows calculator. The Shell statement returns the calculator task ID (also known as the module handle). In a While loop, the sub calls the GetModuleUsage Windows 3.1 API function, which returns the module reference count (how many instances of the calculator are currently running). The Yield statement yields control to the calculator. When the user closes the calculator, GetModuleUsage returns a reference count of 0, the While loop ends, and the sub displays an appropriate message.
If you remove the While loop (try it), the message box appears as soon as the calculator begins running. In other words, the script continues to execute without yielding control to the calculator.
' Declare the Windows 3.1 API function at the module level.
Declare Function GetModuleUsage Lib "Kernel" _
(ByVal taskID As Integer) As Integer
Sub DoCalc
Dim taskID As Integer
' Start the Windows calculator, returning its task ID.
taskID% = Shell("calc.exe", 1)
' As long as the module is still running, yield.
Do While GetModuleUsage(taskID%) > 0
Yield
Loop
' When the user closes the calculator, continue.
MessageBox "Calculations done"
End Sub
DoCalc ' Call the DoCalc sub.

Возможно, здесь вместо Shell надо использовать Shellid.
 
R

rocsolanka

<!--QuoteBegin-Medevic+20:12:2005, 16:57 -->
<span class="vbquote">(Medevic @ 20:12:2005, 16:57 )</span><!--QuoteEBegin-->Посмотри в дизайнере пример по функции Yield.
Возможно это то, что тебе надо.
Возможно, здесь вместо Shell надо использовать Shellid.
[snapback]28594" rel="nofollow" target="_blank[/snapback]​
[/quote]
Не то, не то :-( Мне нужно не просто дождаться окончания работы программы, а получить ее output.
Есть, конечно, вариант с временным файлом, но очень мне не хочется этого делать - слишком уж громоздко.
 

Medevic

Что это ? :)
Green Team
10.12.2004
3 334
1
BIT
4
Глянь вот здесь:
 
Статус
Закрыто для дальнейших ответов.
Мы в соцсетях:

Обучение наступательной кибербезопасности в игровой форме. Начать игру!