Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Help 

What type of coding is it to perform actions on a site?

If I needed to perform certain actions on a website, such as clicking "New thread" "New Post" and performing an action, and then looping it a few times - What's the best type of code for this?
(Apr 29, 2020 10:45 AM)Social Engineer Wrote:  If I needed to perform certain actions on a website, such as clicking "New thread" "New Post" and performing an action, and then looping it a few times - What's the best type of code for this?

I would definitely vote JavaScript. Have a look at userscripts for a start ;)
JavaScript (and many other languages for that matter, some are only a browser-plugin away, even though that solution is rather ugly) can be executed inside browsers. Here's an example of a project that displays an alert when a button is clicked, using JavaScript:
https://jsfiddle.net/fqnmbkxw/

Code
// Retrieve the DOM element
const btnHello = document.getElementById("btnHello");

// Add an event listener that will execute when the element is clicked
btnHello.addEventListener("click", () => {
 alert("Hello world!");
});

Additionally, there are various other languages that you can utilize to make an interactive website, including but not limited to:
  • TypeScript

  • Java

  • Silverlight (ew and deprecated, don't use this)

  • Adobe Flash (ew and deprecated, don't use this)

  • Dart

  • C# (Razor)

  • CoffeeScript



The most popular "alternative" at the moment would be TypeScript, but do keep in mind that most of these languages (including TypeScript) are translated/"compiled" into JavaScript in the end and delivered to the client as such. Anyway, to answer your question, this type of programming is called webdevelopment.
[Image: vp6iypF.gif]
As mentioned, JavaScript is your friend here. Although judging from your question JavaScript is your friend period.

For you particular application depending on how much of, let's call it, "real browser usage simulation" you want to achieve you can start off with either of these:

- Selenium
- Puppeteer

If you want something less bulky with a simple goal of automating some tasks then CJS/"Custom Javascript for websites" (can't tell if it's actually branded as CJS) is your friend. Basically an extension for Chrome that lets you store and run JavaScript scripts.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by SchizoidJan 5, 2024 10:27 AM 4 233 Jan 5, 2024 10:27 AM
Last Post: Realizm
[Tutorial] by n4xiiiMay 21, 2019 10:38 AM 8 307 May 21, 2019 10:38 AM
Last Post: n4xiii
by WhalecumJan 3, 2018 07:49 PM 0 111 Jan 3, 2018 07:49 PM
Last Post: Whalecum