getpwd.ash: locate PWD, other useful data

Alphonse Kane

New member
I wrote this simple, mostly-redundant script because there are some things requiring the PWD that visit_url just doesn't do right, like parsing information from the chat pane. It alone doesn't seem to work for my purposes, but I have still made use of it in other scripts. Returns PWD as a string.

This script works based on the assumptions that the PWD is listed in the character pane, that it is 32 characters long, and that it starts 11 characters after "pwdhash" is located in the code. These assumptions seemed correct at the time of coding.

Code:
String get_pwd() {
 String CharPane = visit_url("charpane.php");
 String FinalPWD = "Not Found";
 print("Extracting PWD from character pane...");
 int pwdStart = index_of(CharPane,"pwdhash")+11;
 int pwdFinish = index_of(CharPane,"pwdhash")+43;
 FinalPWD = subtring(CharPane, pwdStart ,pwdFinish);
 return FinalPWD
}
 

Alphonse Kane

New member
Probably. I only know what's on the wiki, and I couldn't find it there. Like I said, it's probably redundant.

Edit: Hey, look at that, my_hash() DOES work :O

Thanks for telling me. I also checked ashref, which saved me from reinventing around six other wheels :p
 
Last edited:
Top