Good, so I'm not very familiar with using the / F function. I can change it if the file is static and has a given number of lines that I can skip and then extract the data. I am currently trying to modify a .XML file. The file will have different numbers of lines, but will always have the following
</SyncWindow> </AutoSyncWindows> <SyncServiceConnections /> <DaysToRetainRecordedData>90</DaysToRetainRecordedData> <SyncRestartRequired>false</SyncRestartRequired> - <LastGroupsSynced>
The value of <DaysToRetainRecordedData>90</DaysToRetainRecordedData> may be different, for example <DaysToRetainRecordedData>30</DaysToRetainRecordedData>
Using tokens, what is the most efficient way to find this .XML file for this string and overwrite it with <DaysToRetainRecordedData>0</DaysToRetainRecordedData>
I cannot overwrite the entire .XML file, as they have unique server keys that will differ from machine to machine. So I need to find this line and change the value to 0. Any suggestions? If For / F is not the most efficient way, I can upgrade to VBS if necessary. But it will need to be called from pure shellcode and make things a little more complicated.
source share