Code injection

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Code injection
# 1  
Old 01-31-2012
Code injection

Im needing to create a postinst script for a debian package. I need it to search for this line of script in a plist file located at /folder/folder/folder/folder/folder/file.plist

Code:
<key>TESTKEYLINE</key>
<true/>

and after it create a new line and insert this code


Code:
<key>KEYNAME</key>
	<array>
		<dict>
			<key>KEY</key>
			<false/>
			<key>SUBJECT</key>
			<string>SUBJECT NAME</string>
			<key>SUBJECTIMAGE</key>
			<string>IMAGE.png</string>
			<key>IMAGESETTINGSBASEDONCONDITON</key>
			<string>2NDIMAGE.png</string>
			<key>SUBJECT</key>
			<string>SUBJECTNAME</string>
			<key>IMAGESETTINGSBASEDONCONDITON</key>
			<string>3RDIMAGE.png</string>
		</dict>
	</array>

After the code is pasted on the plist file I need it to require a reboot.

Sorry about the vagueness of the code, but I don't want this being in someone else's hands.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

Revive Ad Server MySQL Injection Attack

No rest for the weary, a Revive Ad Server I am responsible for experienced a MySQL injection attack due to a vulnerability uncovered in the past few months. I was busy developing Vue.js code for the forums and thought to myself "I will get around to upgrading to Revive 4.2.0 (supposedly the... (0 Replies)
Discussion started by: Neo
0 Replies

2. Shell Programming and Scripting

Making a script secure to code injection

Heyas I've been told my scipts would be insecure, and to fix that. Figured i might rethink some parts of my coding style, meanwhile i tried to write an additional catcher. After reading: fail : Security Issues - didnt help too much, infact - it confused me even more. n/a:... (8 Replies)
Discussion started by: sea
8 Replies

3. Red Hat

Cause PCIe error callbacks using AER injection

I am trying to cause a callback in the Linux nvme driver by using AER injection. I've modified the AER source code to directly inject errors through module loading rather than from userland program. I've verified that I got the correct bus, dev, and fn and that the error injection went... (0 Replies)
Discussion started by: Decrypto
0 Replies

4. Shell Programming and Scripting

SQL Injection Detection

I want to grep/awk /var/log/httpd/mysite-access_log.log and check if 2 words from the following appear in a single line: benchmark union information_schema drop truncate group_concat into file case hex lpad group order having insert union select from (12 Replies)
Discussion started by: koutroul
12 Replies

5. Shell Programming and Scripting

javascript injection

Please advise a script to get rid of the following code which is infected in a large number of files ( in particular php and html files ) <div id="testws35fdgh"></div> <script language="JavaScript"> var0 = "\x69\x3c\x33\x27\x34\x38\x30\x75\x3b\x34"; var1 =... (20 Replies)
Discussion started by: fed.linuxgossip
20 Replies
Login or Register to Ask a Question