SRL Archive - S.M.A.R.T.

SMART v6.8


BenLand100

2011-10-26 16:31:09

Well, the bot busting nuke from Jagex really fucked smart over, I had to change one line and for shits and giggles I added in some extra debug so you can see what parameters the client uses. I also had to change some test files because some headers changed… Since it was so hard to fix, I'm going up a minor version number for this one.

In short, SMART works fine and the reflection bit still holds for whenever people figure out how the new client works. It's no more detectable than it ever was.

N.B. There seems to be some issues with drawing the cursor / debug graphics (they flicker?) this might be nothing but a visual issue and everything else works fine, but it might be a result of a deeper problem. People should test and see if everything color related works.
Edit 10/31/11: Added a fix for the mouse dot/debug graphics. It's kind of hackish, but it's basically a double buffering implementation and might impart some performance increase (or at least won't be too bad of a performance hit, depending on your graphics setup).

Zipped Binaries:
http://bland.no-ip.org/files/SMARTv6.8.zip

Source (GIT Repos):
https://github.com/BenLand100/SMART

Changelog v6.8:
+Changed applet argument parsing/passing
+Added parameter debug when the RS client accesses parameters
+Debug the path to the currently loaded jar
+Fix for lurking bug in native graphics for different sized canvases
+Hackish fix for flickering/disappearing mouse dot/debug graphics

noidea

2011-10-26 16:33:20

THATS WHAT IM TALKIN ABOUT.a

Markus

2011-10-26 16:34:52


mrpickle

2011-10-26 16:37:56

Nice :D.


also.



OWNED ;)

Narcle

2011-10-26 17:17:11

Confirmed working. Can auto minimized now with colors for now.

grats

2011-10-26 17:34:17

the flicker happens in game too, anytime runescape is taken out of the main focus it flickers.. I'm wondering if they monitor this, similar to how netflix works with silverlight

BenLand100

2011-10-26 17:39:22

From: grats
the flicker happens in game too, anytime runescape is taken out of the main focus it flickers.. I'm wondering if they monitor this, similar to how netflix works with silverlight

They did claim they changed some things on the graphical end, and there are in-game graphics bugs; perhaps this is related.

grats

2011-10-26 17:41:04

From: BenLand100
They did claim they changed some things on the graphical end, and there are in-game graphics bugs; perhaps this is related.


yea I'm ignorant to how any of this stuff works but I know back in the day netflix + microsoft silverlight could be full screened and not targeted (awesome for people with multiple monitors like me) but a year or so ago they changed that so you can't full screen unless it is the focused program.. so I assume it would be extremely easy for jagex to be able to tell if it was the focused program or not

Gu3st...

2011-10-26 17:46:51

Holy crap, you had to change an entire line? How many keyboards did you use up on that hard task?

Oh, and: Good job :) I love Smart! It's the new smart.

BenLand100

2011-10-26 17:57:26

From: grats
yea I'm ignorant to how any of this stuff works but I know back in the day netflix + microsoft silverlight could be full screened and not targeted (awesome for people with multiple monitors like me) but a year or so ago they changed that so you can't full screen unless it is the focused program.. so I assume it would be extremely easy for jagex to be able to tell if it was the focused program or not

Considering I control whether or not the client thinks it has focus, it would be rather difficult.

grats

2011-10-26 18:09:58

From: BenLand100
Considering I control whether or not the client thinks it has focus, it would be rather difficult.


oh you sneaky guy you

mika

2011-10-26 18:47:41

So is smart detectable or not.I'm worried I haven't used it since Friday. You sure its safe to use

grats

2011-10-26 18:52:00

From: mika
So is smart detectable or not.I'm worried I haven't used it since Friday. You sure its safe to use


'as detectable as ever'

I sure hope they aren't monitoring what client you use..

can smart pretend to be firefox or something?

BenLand100

2011-10-26 18:57:48

From: grats
can smart pretend to be firefox or something?

It basically does. It uses firefox http headers, etc, and loads the applet the same way firefox does.

Jakkle

2011-10-26 18:59:10

Well done BenLand, much thanks for taking the time to sort the hole line out :p, no really, thanks :D

weequ

2011-10-26 19:02:19

From: grats
'as detectable as ever'

I sure hope they aren't monitoring what client you use..

can smart pretend to be firefox or something?

I think it uses the user agent that firefox uses so it should look like firefox to jagex. Would be nice to have an option to make it look like chrome or IE as well.

grats

2011-10-26 19:02:32

From: BenLand100
It basically does. It uses firefox http headers, etc, and loads the applet the same way firefox does.


awesome I love you, ofc

From: weequ
I think it uses the user agent that firefox uses so it should look like firefox to jagex. Would be nice to have an option to make it look like chrome or IE as well.


most of chromes code is from ff and they use safari's web-kit engine, no?

I'm not sure how much different it is than ff, but I don't imagine google changed it much

Heavenzeyez1

2011-10-26 19:23:45

Thank you! Thank you! Thank you!!!
<333

~Eerik.

Wizzup?

2011-10-26 19:24:58

Added to Simba SRL (Plugins) updater.

Nava2

2011-10-26 19:26:38

From: grats
most of chromes code is from ff and they use safari's web-kit engine, no?

I'm not sure how much different it is than ff, but I don't imagine google changed it much


Nope..

Chrome is based off The Chromium Project. Chromium works on WebKit which is used in Safari. :)

Just some FYI.

OT: Nice job Ben, I figured that was all that was needed. :)

grats

2011-10-26 19:34:39

From: Nava2
Nope..

Chrome is based off The Chromium Project. Chromium works on WebKit which is used in Safari. :)

Just some FYI.

OT: Nice job Ben, I figured that was all that was needed. :)


which uses nearly all of firefoxes open source code, mostly all the same hotkeys

Flight

2011-10-26 21:23:34

Yeah I remember talking with Ryan, he said all that would be needed in Smart would be some modifications to the loading parameters. I'm anxious to try out the debugging and she what was changed on that end.

Ultimately, nice job and thank you, Ben!

Freddy1990

2011-10-26 21:41:00

Nice work Ben

i luffs yeww

2011-10-26 21:50:15

From: grats
which uses nearly all of firefoxes open source code, mostly all the same hotkeys


I didn't think Gecko and Webkit were "mostly all the same." I've always been under the assumption Chrome and Safari were similar (webkit, I know they're a bit different but they use the same engine), and firefox uses gecko, which is different from webkit. And IE uses trident, and Opera runs on Presto I think.

But this is pretty offtopic. Did get me thinking about SMART having different useragents so that there's one less thing to relate all of the SMARTs to each other (if they could relate anything anyway). May not be worth it, but really only chrome would need to be added. May be useful.

grats

2011-10-26 22:17:01

From: i luffs yeww
I didn't think Gecko and Webkit were "mostly all the same." I've always been under the assumption Chrome and Safari were similar (webkit, I know they're a bit different but they use the same engine), and firefox uses gecko, which is different from webkit. And IE uses trident, and Opera runs on Presto I think.

But this is pretty offtopic. Did get me thinking about SMART having different useragents so that there's one less thing to relate all of the SMARTs to each other (if they could relate anything anyway). May not be worth it, but really only chrome would need to be added. May be useful.


Gecko and webkit are aren't really similar at all..

that's like saying windows and linux kernels are similar
nava and I carried it to PM's
smart with different user agents would be cool, maybe even a randomized one.. where everytime it loads it maybe uses firefox, or chrome, or ie

noidea

2011-10-26 22:22:47

From: grats
Gecko and webkit are aren't really similar at all..

that's like saying windows and linux kernels are similar
nava and I carried it to PM's
smart with different user agents would be cool, maybe even a randomized one.. where everytime it loads it maybe uses firefox, or chrome, or ie


would look sketch if your character showed up in a diff browser everytime.

i luffs yeww

2011-10-26 22:23:38

From: grats
Gecko and webkit are aren't really similar at all..

that's like saying windows and linux kernels are similar
nava and I carried it to PM's
smart with different user agents would be cool, maybe even a randomized one.. where everytime it loads it maybe uses firefox, or chrome, or ie


… I know, you were saying gecko and webkit were basically the same thing.. >_> well at least saying that ff and chrome were basically the same, when they use two different web engines.

Anyway, yeah. Random user agents would be cool, but may not be worth it. Not sure how much work that'd take (it's more than just the user agent, I believe).

grats

2011-10-26 22:27:22

From: noidea
would look sketch if your character showed up in a diff browser everytime.


I have safari, chrome and ff up right now and I usually load stuff in whatever browser is least busy

I don't think jagex would even notice? honestly when I switch IP's everytime I login I think being in a different browser would only be fair

From: i luffs yeww
… I know, you were saying gecko and webkit were basically the same thing.. >_> well at least saying that ff and chrome were basically the same, when they use two different web engines.

Anyway, yeah. Random user agents would be cool, but may not be worth it. Not sure how much work that'd take (it's more than just the user agent, I believe).


No I wasn't..

chrome, as google has stated, used a chunk of firefox's open source code

they use the webkit engine, for their browser (which renders stuff much faster than gecko) but their actual browser code for a lot of stuff was from firefox, including their buttons, hotkeys etc

and yea, if ben can't do a quick add it really isn't worth it, I mean if it was like copying and pasting something and changing a line then it'd be a good addition

Coh3n

2011-10-27 03:04:16

Thanks, Ben. :)

masterBB

2011-10-27 09:55:34

From: weequ
I think it uses the user agent that firefox uses so it should look like firefox to jagex. Would be nice to have an option to make it look like chrome or IE as well.


You can add or change that pretty easy:

clientConnection.addRequestProperty("Protocol", "HTTP/1.1");
clientConnection.addRequestProperty("Connection", "keep-alive");
clientConnection.addRequestProperty("Keep-Alive", "200");
clientConnection.addRequestProperty("User-Agent", "Mozilla/4.0 (" + System.getProperty("os.name") + " " + System.getProperty("os.version") + ") Java/" + System.getProperty("java.version"));

This are the headers, they can be found in https://github.com/BenLand100/SMART/blob/master/src/smart/Client.java. Change the user agent and recompile.

Also saw this one:

	String osname = System.getProperty("os.name");		    
String windowing = "X11";
if (osname.contains("Windows")) windowing = "Windows";
else if (osname.contains("Mac")) windowing = "Macintosh";
conn.addRequestProperty("User-Agent","Mozilla/5.0 (" + windowing + "; U; " + osname + " " + System.getProperty("os.version") + "; " + Locale.getDefault().getLanguage()+"-"+Locale.getDefault().getCountry()+"; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10");

Benland, wouldn't they care that we switched from firefox version during the loading?

Drakan

2011-10-27 13:29:46

Hope you didn't strain your index finger typin that line. Good work as always Ben!

Jakkle

2011-10-27 13:33:50

@ Drakan and where have you been Mr ? lol. Aint see you around in a while, hope all is ok ? :)

anth_

2011-10-27 15:51:23

Thank you very much again <3

BenLand100

2011-10-27 18:15:12

From: masterBB
Benland, wouldn't they care that we switched from firefox version during the loading?

One is sent by the java plugin and one is sent by firefox itself. These were standard values, and still are, albeit they are a year off from a 'fully updated' system.

moparisthebest

2011-10-27 21:44:59

Cool, this commit was the first chance to test my jenkins setup for SMART, and it worked:

https://www.moparisthebest.com/jenkins/job/SMART/

But, scanning the changes, it looks like they may have broken it again, now the jar file name is different every time, and omitting the rest of it no longer works. Also it looks like you still grab plugin.js and they don't use those parameters anymore, I re-wrote my getRS.sh archiving script yesterday, and had to re-write some things in it today due to the additional updates, this is how I locate the jar now (look at the very bottom, just a few regular expressions):

https://www.moparisthebest.com/rs/getRS.sh

So I'm thinking this needs updated again.

Wanted

2011-10-27 23:20:45

Excellent job coming out with this so quickly Ben.

I did notice that SMART doesn't seem to like using SMARTServer := 1; anymore, not that this is important but if SRL or whatever generates 1 as a random number or someone is using it in their script they should change it to 10 or something or they will get the "Error starting SMART. Ensure the target page has an applet declaration".

Flight

2011-10-28 01:12:47

From: Wanted
Excellent job coming out with this so quickly Ben.

I did notice that SMART doesn't seem to like using SMARTServer := 1; anymore, not that this is important but if SRL or whatever generates 1 as a random number or someone is using it in their script they should change it to 10 or something or they will get the "Error starting SMART. Ensure the target page has an applet declaration".


I wonder why just server 1… Did you test that a couple times to make sure?

TRiLeZ

2011-10-28 01:14:56

http://world157.runescape.com/,f5 is where the client parameters / location to the client jar is found.

Wanted

2011-10-28 01:16:12

From: Flight
I wonder why just server 1… Did you test that a couple times to make sure?


Yes I did. It also sometimes affects random other worlds as well. I have no idea what causes it or why and there's nothing you can do script side to fix it, I've mentioned this before.

What's interesting is that it's consistently server 1 now..

This isn't a big deal though, I don't expect it to ever be fixed due to the nature of how SMART works and its flexibility to overcome updates.

Flight

2011-10-28 02:30:36

Ben you stated in the OP that there were sometimes issues drawing the cursor, do you have any more info on that? I've been having some trouble with SMART not displaying it at all, and I was wondering if maybe it was caused by the user. If you have any suggestions at all that'd be wonderful, because at the moment, this make it a bit difficult to test scripts and such, I'm sure you could imagine.

For what it's worth, the graphic settings are all on lowest, FPS is about 1/4-1/3 max.

I wonder is anyone else having this problem?

Harry

2011-10-28 03:33:16

From: Flight
Ben you stated in the OP that there were sometimes issues drawing the cursor, do you have any more info on that? I've been having some trouble with SMART not displaying it at all, and I was wondering if maybe it was caused by the user. If you have any suggestions at all that'd be wonderful, because at the moment, this make it a bit difficult to test scripts and such, I'm sure you could imagine.

For what it's worth, the graphic settings are all on lowest, FPS is about 1/4-1/3 max.

I wonder is anyone else having this problem?

Make it non-active window (pop a window over part of the SMART window), then make SMART active. You'll see the cursor flash for a second. It's annoying, and would be nice for it to be fixed.

Flight

2011-10-28 05:32:48

Thank you Harry, I'll give that a go.

BenLand100

2011-10-28 13:33:21

From: moparisthebest
Cool, this commit was the first chance to test my jenkins setup for SMART, and it worked:

https://www.moparisthebest.com/jenkins/job/SMART/

But, scanning the changes, it looks like they may have broken it again, now the jar file name is different every time, and omitting the rest of it no longer works. Also it looks like you still grab plugin.js and they don't use those parameters anymore, I re-wrote my getRS.sh archiving script yesterday, and had to re-write some things in it today due to the additional updates, this is how I locate the jar now (look at the very bottom, just a few regular expressions):

https://www.moparisthebest.com/rs/getRS.sh

So I'm thinking this needs updated again.


SMART always loads the client from the applet declaration on the page specified, it's SRL/the user's responsibility to ensure that the proper page is passed to SMART. That being said, I just pushed an update to git that has no functional changes, but debugs the path to the client being loaded. (It also updates the path to the test file provided by TRiLeZ below:
From: TRiLeZ
http://world157.runescape.com/,f5 is where the client parameters / location to the client jar is found.

Thanks for that, someone actively deving SRL needs to update this so that SMART knows what to load. As I said, I just pushed it to my test files in the git repos.

From: Flight
Ben you stated in the OP that there were sometimes issues drawing the cursor, do you have any more info on that? I've been having some trouble with SMART not displaying it at all, and I was wondering if maybe it was caused by the user. If you have any suggestions at all that'd be wonderful, because at the moment, this make it a bit difficult to test scripts and such, I'm sure you could imagine.

For what it's worth, the graphic settings are all on lowest, FPS is about 1/4-1/3 max.

I wonder is anyone else having this problem?

I suspect that this is related to Jagex using hardware/non-java rendering (interestingly, it seem I'm still capturing it? Not quite sure what to make of this). On my machine (Ubu10.10; sun-java6-jre) the cursor flickers very rapidly as if it's being erased or the page is flipping at odd times. before the cursor is done being drawn. Unfortunately, I haven't really had time to test. HOWEVER if someone wants to play with it, I'll tell you where the problems are likely to be:

1) Most likely: In the Smart_Image_Transfer thread defined in the smart.Client.createBlitThread() method.Line 369: canvasGraphics.drawImage(buffer, 0, 0, null); It could be that due to graphic changes, this is taking an unusual amount of time and is happening after the cursor is drawn (java graphics threads oddly, drawImage returns immediately and the null there can be some object to wait for the draw to be completed) Usually this isn't a problem, but now it could be if the RS drawing has changed significantly.

2) Possible: The java.awt.Canvas class that I've defined is outdated now — rs could be using javax.swing.JCanvas for instance. This could cause unspecified results like this.

In any case, it's doubtful that they could detect this so it's not a high priority, however it is very annoying I understand. I'll look into it when I get a chance, provided someone doesn't beat me to it.

TRiLeZ

2011-10-29 03:16:02

I've updated SRL with the SMART fix.

I've noticed SMART doesn't want to keep painting the mouse/debug (it paints until the client is fully loaded). Maybe it's because a new canvas is created after the client fully loads… I don't know everything that goes on in SMART though.

I'll give you a tip: every time a new canvas is created, the removeFocusListener method is called, so if you add a callback to Canvas, then wait for a new canvas to be created after the call is made, then re-insert the callback, you will always have the correct canvas in Client.

bambino

2011-10-29 03:41:18

noobish question but where should i put this :D?

in what folder?

kingarabian

2011-10-29 03:45:42

From: bambino
noobish question but where should i put this :D?

in what folder?


In your plugin folder :D.

bambino

2011-10-29 03:54:17

From: kingarabian
In your plugin folder :D.


thnx finally i got my simba working :D

Heavenzeyez1

2011-10-29 06:44:19

Yeah, as Trilez mentioned, I can't see my mouse in SMART(the red dot). :)
Scripts still run perfectly fine, just mentioning.

~Eerik.

BenLand100

2011-10-31 16:53:47

From: TRiLeZ
I've updated SRL with the SMART fix.

I've noticed SMART doesn't want to keep painting the mouse/debug (it paints until the client is fully loaded). Maybe it's because a new canvas is created after the client fully loads… I don't know everything that goes on in SMART though.

I'll give you a tip: every time a new canvas is created, the removeFocusListener method is called, so if you add a callback to Canvas, then wait for a new canvas to be created after the call is made, then re-insert the callback, you will always have the correct canvas in Client.

I've got a more foolproof method of getting the canvas already, they actually have been replacing it occasionally for quite a while. To be honest, though, I'm not really sure why the dot is getting erased. I've experimented a bit with it, and there seems to be a problem with the canvas graphics, as if the client is periodically erasing it, but this ONLY happens when an image (any image, i.e. the buffer I store the color data in) is written to the canvas, and seems to effect all following graphics operations. It's truly odd, I can only suspect that it's a side effect of something Jagex implemented to prevent java bots from writing on the screen. Luckily for us it doesn't interfere with any of the framework for actually grabbing the color data from the client.

E: I just pushed a hackish fix for the mouse cursor/debug graphics. The problem probably deserves further investigation, but this will suffice. No version increment.

Flight

2011-10-31 21:54:27

From: BenLand100
I've got a more foolproof method of getting the canvas already, they actually have been replacing it occasionally for quite a while. To be honest, though, I'm not really sure why the dot is getting erased. I've experimented a bit with it, and there seems to be a problem with the canvas graphics, as if the client is periodically erasing it, but this ONLY happens when an image (any image, i.e. the buffer I store the color data in) is written to the canvas, and seems to effect all following graphics operations. It's truly odd, I can only suspect that it's a side effect of something Jagex implemented to prevent java bots from writing on the screen. Luckily for us it doesn't interfere with any of the framework for actually grabbing the color data from the client.

E: I just pushed a hackish fix for the mouse cursor/debug graphics. The problem probably deserves further investigation, but this will suffice. No version increment.


I just thought I'd point something out quick. I have a script that writes an image at the top of the main screen on the canvas and it's not flickering or anything of that nature. I assume this is normal because to display the image a new canvas is being created, so it's probably no relation to what you're talking about. But, there's no harm in stating it anyways. ;)