moeotterson Posted December 28, 2017 Share Posted December 28, 2017 I'm attempting to make a script to make and curate a database of usernames from friends/ignore lists using SQLITE. Is SQLITE supported at this time (outside libraries)? Also, any advice on the endeavor? Quote Link to comment Share on other sites More sharing options...
Deceiver Posted December 28, 2017 Share Posted December 28, 2017 13 minutes ago, moeotterson said: I'm attempting to make a script to make and curate a database of usernames from friends/ignore lists using SQLITE. Is SQLITE supported at this time (outside libraries)? Also, any advice on the endeavor? iirc; you can use anything to make ur webpanel with but i think you can only use the mysql/jdbc stuff in the main java api Quote Link to comment Share on other sites More sharing options...
Butters Posted December 28, 2017 Share Posted December 28, 2017 As far as I tried, OSBot blocks external dependencies (jars), like jdbc or whatever else. Correct me if I'm wrong. To bypass this you can either do calls via POST from your script to something which will parse your data, or can communicate via sockets to an external program. Quote Link to comment Share on other sites More sharing options...
Alek Posted December 28, 2017 Share Posted December 28, 2017 Sounds like something you can do locally? Write a csv. Quote Link to comment Share on other sites More sharing options...
battleguard Posted December 28, 2017 Share Posted December 28, 2017 (edited) 5 hours ago, nosepicker said: As far as I tried, OSBot blocks external dependencies (jars), like jdbc or whatever else. Correct me if I'm wrong. To bypass this you can either do calls via POST from your script to something which will parse your data, or can communicate via sockets to an external program. you can extract the jar inside your artifact to get around this problem. The main problem is it has a locked down security permissions so it might not be able to do everything you need it to do. Also if your making an SDN script I highly doubt the developers are going to approve of a script that has giant library's extracted into there main script jar. @Alek Is there anyway to fix this problem when running the jar where I cannot view the System Properties. This line here "System.getProperties();" will always throw this error -> Blocked permission: ("java.util.PropertyPermission" "*" "read,write"). I am using jxjava in a script but I am unable to do anything with time intervals because it requires making a scheduler from a SchedulerPoolFactory but on the static constructor of the class it blows up because it cannot access these properties (https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/internal/schedulers/SchedulerPoolFactory.java#L95) static { boolean purgeEnable = true; int purgePeriod = 1; Properties properties = System.getProperties(); if (properties.containsKey(PURGE_ENABLED_KEY)) { purgeEnable = Boolean.getBoolean(PURGE_ENABLED_KEY); } if (purgeEnable && properties.containsKey(PURGE_PERIOD_SECONDS_KEY)) { purgePeriod = Integer.getInteger(PURGE_PERIOD_SECONDS_KEY, purgePeriod); } PURGE_ENABLED = purgeEnable; PURGE_PERIOD_SECONDS = purgePeriod; start(); } Edited December 28, 2017 by battleguard Quote Link to comment Share on other sites More sharing options...
Chris Posted December 28, 2017 Share Posted December 28, 2017 39 minutes ago, battleguard said: you can extract the jar inside your artifact to get around this problem. The main problem is it has a locked down security permissions so it might not be able to do everything you need it to do. Also if your making an SDN script I highly doubt the developers are going to approve of a script that has giant library's extracted into there main script jar. @Alek Is there anyway to fix this problem when running the jar where I cannot view the System Properties. This line here "System.getProperties();" will always throw this error -> Blocked permission: ("java.util.PropertyPermission" "*" "read,write"). I am using jxjava in a script but I am unable to do anything with time intervals because it requires making a scheduler from a SchedulerPoolFactory but on the static constructor of the class it blows up because it cannot access these properties (https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/internal/schedulers/SchedulerPoolFactory.java#L95) static { boolean purgeEnable = true; int purgePeriod = 1; Properties properties = System.getProperties(); if (properties.containsKey(PURGE_ENABLED_KEY)) { purgeEnable = Boolean.getBoolean(PURGE_ENABLED_KEY); } if (purgeEnable && properties.containsKey(PURGE_PERIOD_SECONDS_KEY)) { purgePeriod = Integer.getInteger(PURGE_PERIOD_SECONDS_KEY, purgePeriod); } PURGE_ENABLED = purgeEnable; PURGE_PERIOD_SECONDS = purgePeriod; start(); } Speak to @Zach for security Quote Link to comment Share on other sites More sharing options...
jca Posted December 28, 2017 Share Posted December 28, 2017 (edited) 20 hours ago, moeotterson said: I'm attempting to make a script to make and curate a database of usernames from friends/ignore lists using SQLITE. Is SQLITE supported at this time (outside libraries)? Also, any advice on the endeavor? You can do it all with core Java if you build an API and run a POST request to an endpoint with account details. Then to parse data use Gson as a dependency and reference it like a normal object. But as Alek said, if you don't need to use it across servers just generate a local file. 6 hours ago, battleguard said: @Alek Is there anyway to fix this problem when running the jar where I cannot view the System Properties. This line here "System.getProperties();" will always throw this error -> Blocked permission: ("java.util.PropertyPermission" "*" "read,write"). I am using jxjava in a script but I am unable to do anything with time intervals because it requires making a scheduler from a SchedulerPoolFactory but on the static constructor of the class it blows up because it cannot access these properties (https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/internal/schedulers/SchedulerPoolFactory.java#L95) From what I've found with SystemProperties is it's the external environment that you're working in blocking the jar - which isn't OSBOT specific. Look at setting permissions on system. What are you trying to do? There's probably a simpler solution that doesn't require modifying permissions. Edited December 28, 2017 by jca Quote Link to comment Share on other sites More sharing options...
moeotterson Posted December 29, 2017 Author Share Posted December 29, 2017 Alright, thanks guys. I'll let you know if I come across something that works well based on suggestions. Quote Link to comment Share on other sites More sharing options...
battleguard Posted December 30, 2017 Share Posted December 30, 2017 On 12/28/2017 at 5:10 PM, jca said: You can do it all with core Java if you build an API and run a POST request to an endpoint with account details. Then to parse data use Gson as a dependency and reference it like a normal object. But as Alek said, if you don't need to use it across servers just generate a local file. From what I've found with SystemProperties is it's the external environment that you're working in blocking the jar - which isn't OSBOT specific. Look at setting permissions on system. What are you trying to do? There's probably a simpler solution that doesn't require modifying permissions. I am trying to modify the policy information so I can use rxjava in my local script. I looked into the permissions you suggested because it looks like you are correct and its not something in osbot at all. I tried changing my policy to allow everything and I tried manually specifying the policy file when loading up the jar with vm variables but nothing seems to work sadly. Quote Link to comment Share on other sites More sharing options...
Butters Posted December 30, 2017 Share Posted December 30, 2017 7 hours ago, battleguard said: I am trying to modify the policy information so I can use rxjava in my local script. I looked into the permissions you suggested because it looks like you are correct and its not something in osbot at all. I tried changing my policy to allow everything and I tried manually specifying the policy file when loading up the jar with vm variables but nothing seems to work sadly. As I mentioned before - OSBot blocks all external dependencies and correct me if I'm wrong. As someone mentioned you can extract the source of the external jar and place it in your script - should work but might be messy. I gave up playing around with this when I noticed that even simple JSON parser jars are blocked Quote Link to comment Share on other sites More sharing options...
battleguard Posted December 30, 2017 Share Posted December 30, 2017 12 hours ago, battleguard said: I am trying to modify the policy information so I can use rxjava in my local script. I looked into the permissions you suggested because it looks like you are correct and its not something in osbot at all. I tried changing my policy to allow everything and I tried manually specifying the policy file when loading up the jar with vm variables but nothing seems to work sadly. 4 hours ago, nosepicker said: As I mentioned before - OSBot blocks all external dependencies and correct me if I'm wrong. As someone mentioned you can extract the source of the external jar and place it in your script - should work but might be messy. I gave up playing around with this when I noticed that even simple JSON parser jars are blocked I didnt think of extracting the source thanks I will have to try that and let you know how it works. Quote Link to comment Share on other sites More sharing options...
jca Posted December 30, 2017 Share Posted December 30, 2017 6 hours ago, nosepicker said: As I mentioned before - OSBot blocks all external dependencies and correct me if I'm wrong. As someone mentioned you can extract the source of the external jar and place it in your script - should work but might be messy. I gave up playing around with this when I noticed that even simple JSON parser jars are blocked I've used a few dependencies with no issue.. for a basic JSON parser you can use google/gson. 14 hours ago, battleguard said: I am trying to modify the policy information so I can use rxjava in my local script. I looked into the permissions you suggested because it looks like you are correct and its not something in osbot at all. I tried changing my policy to allow everything and I tried manually specifying the policy file when loading up the jar with vm variables but nothing seems to work sadly. My question was referring to what you were trying to achieve with RxJava, maybe there's a simpler way without navigating permissions which can potentially open up your system to harm. Quote Link to comment Share on other sites More sharing options...
moeotterson Posted January 6, 2018 Author Share Posted January 6, 2018 Is there any way to access, print out, or read the "Message" or "Spell Name" of a widget (third level)? That's the first hurdle I'm hitting here. Quote Link to comment Share on other sites More sharing options...