Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trying to make the script execute another executable jar

Featured Replies

Ok so here is the main class

package Chatter;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.attribute.PosixFilePermission;
import java.security.AccessController;
import java.security.Permission;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.osbot.rs07.api.ui.Message;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;




@ScriptManifest(name="Chatter", author="Chatter", version=1, info="Chatter", logo="")
public class Chatter extends Script{

	private Dialogue Dialogue;
	boolean said;
	int Index;
	
	public int onLoop() throws InterruptedException {
		if(said == true){
			try {
				Email(null);
			} catch (IOException e) {
				e.printStackTrace();
			}
			said = false;
		}
		return 500;
	}
	
	public void onMessage(Message m) throws InterruptedException {
			Dialogue = new Dialogue();
	     List<String> ReceivedSpeach = Dialogue.getNumberList();
		for (String word : ReceivedSpeach){
		    if (m.getMessage().contains(word)){
		    	Index = ReceivedSpeach.indexOf(word);
		    	said = true;
		    }
		}
    }
	public static void Email(String[] args) throws IOException {
		ProcessBuilder pb = new ProcessBuilder("java", "-jar", "C:\\Users\\hp\\Desktop\\Bot\\Scripts\\Ex jars\\Email.jar");
		Process p = pb.start();
	}
}

 

and this part 

try {
				Email(null);
			} catch (IOException e) {
				e.printStackTrace();
			}

causes this problem

Blocked permission: ("java.io.FilePermission" "<<ALL FILES>>" "execute")

is there anyway to grant the permission for script/Osbot to execute external executable jar?

Edited by kadiem

18 minutes ago, kadiem said:

is there anyway to grant the permission for script/Osbot to execute external executable jar?

No

I don't believe this would be allowed at all due to safety issues. Any user could have the script execute a malicious .jar and then OSBot would go to shit. Sorry mate :/

  • Author

ok so forget about the external jar can i implement this code in main class

public static void SendEmail(String[] args) {

		final String username = "Example@gmail.com"; // enter your mail id
		final String password = "Example";// enter ur password

		Properties props = new Properties();
		props.put("mail.smtp.auth", "true");
		props.put("mail.smtp.starttls.enable", "true");
		props.put("mail.smtp.host", "smtp.gmail.com");
		props.put("mail.smtp.port", "587");
		props.put("mail.smtp.ssl.trust", "smtp.gmail.com");
		
		
		Session session = Session.getInstance(props,
		  new javax.mail.Authenticator() {
			protected PasswordAuthentication getPasswordAuthentication() {
				return new PasswordAuthentication(username, password);
			}
		  });

		try {

			MimeMessage message = new MimeMessage(session);
			message.setFrom(new InternetAddress("Example@gmail.com")); // same email id
			message.setRecipients(MimeMessage.RecipientType.TO,
				InternetAddress.parse("Example2@gmail.com"));// whome u have to send mails that person id
			message.setSubject("Testing Subject");
			message.setText("Test.");

			Transport.send(message);

			System.out.println("Done");

		} catch (MessagingException e) {
			throw new RuntimeException(e);
		}
	}

and run SendEmail by this code

Chatter.SendEmail(null);

 

even though it uses different library than Osbot?

 

 

 

Edited by kadiem

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.