Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function (c, a) //usage t:#s.username.target, page:"0"
- {
- var curr_args={}
- var reCnD=/(?:access directory with )(\w+):\"(\w+)/ //Gets the command && directory
- var results=a.t.call(curr_args) //Call with empty arguments
- var matches=reCnD.exec(results) //Uses the regex to find matches in the string
- var cmd=matches[1] //matches[1]=first capturing group
- var dir=matches[2] //matches [2]=second capturing group
- var reNnM=/(?:from engaging in criminal activity\.\n)(\w+) \| (\w+)/ //Gets the names of the news page and the mission statement page
- results=a.t.call() //Call with no arguments
- matches=reNnM.exec(results) //Uses the regex to find matches in the string
- var nws=matches[1] //matches[1]=first capturing group
- var mss=matches[2]//matches [2]=second capturing group
- curr_args[cmd]=nws //Changes current arguments to be {<command to open stuff>:"<name of news page>"}
- var rePr=/(?:project |Look for |new developments on |Work continues on |release date for )([\w\d()]+\.?[\w\d()]+)/g //Gets project names
- results=a.t.call(curr_args)
- matches=rePr.exec(results) //Gets the first match if one exists, has value null if one doesn't
- var projects=[] //Initializes array to store projects
- while (matches!=null) //While there still is a match...
- {
- projects.push(matches[1]) //Throw that match onto the pile
- matches=rePr.exec(results) //And try to find another one; plurals are used even though there is only one because I'm too lazy to delare a new variable
- }
- projects=projects.slice(a.page*40,a.page*40+40) //Cut it up into a slice of fourty; different values of i give different slices
- curr_args[cmd]=mss //Changes current arguments to be {<command to open stuff>:"<name of mission statement page>"}
- var regPW=/(?:tegy )(\S+)/ //Matches the name of the strategy, which also happens to be the password for the directory
- var password=regPW.exec(a.t.call(curr_args))[1] //Grabs the password; [1] at the end follows same logic as above
- curr_args["p"]=password //Changes current args so that it contains {...,p:<password we obtained>,...}
- curr_args["pass"]=password
- curr_args["password"]=password
- curr_args[cmd]=dir
- var locs=[]
- for (var project in projects) { //Note that we declare project inside the parentheses
- curr_args["project"]=projects[project] //Look at a new project
- results=a.t.call(curr_args) //Call target with new arguments
- if (typeof(results) == "string")
- {
- results = results.split("\n")
- }
- locs.push(results) //Put the results in the loc array
- }
- return locs //Return loc array
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement