Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:linuxapps [2021/04/24 09:00] – [Links2 Web Browser] - typo mortifis | howto:linuxapps [2022/02/08 07:03] (current) – [Links2 Web Browser] Added a "security considerations" section for the Links2 script. Andre | ||
---|---|---|---|
Line 17: | Line 17: | ||
$ sudo apt-get install links2 | $ sudo apt-get install links2 | ||
</ | </ | ||
+ | |||
+ | === Links2 Security Considerations === | ||
+ | |||
+ | :!: Note that links2 can give access to the host OS, such as with "OS Shell" from the File menu, which gives the BBS user a shell as the OS user the BBS runs as. At the very least this will likely give someone access to your [[util: | ||
+ | |||
+ | Using the script below, anyone with a sysop [[access: | ||
+ | |||
+ | Anyone without a sysop security level will run Links2 with the " | ||
+ | |||
+ | < | ||
+ | -anonymous | ||
+ | Restrict links so that it can run on an anonymous account. No local file browsing. No downloads. Executing of viewers is allowed, but user can't add or modify entries in association table. | ||
+ | </ | ||
+ | |||
+ | This may be sufficient to secure the BBS' host system, but the user will still be allowed to browse the web from your system, potentially doing questionable things that could be attributed to your IP address. | ||
=== Add links2 to SBBS === | === Add links2 to SBBS === | ||
Line 48: | Line 63: | ||
=== Add to Synchronet Command Shell === | === Add to Synchronet Command Shell === | ||
- | edit your *.src command shell script and add: | + | edit your *.src [[custom: |
ie: cmdkey /B | ie: cmdkey /B | ||
exec_bin " | exec_bin " | ||
Line 80: | Line 95: | ||
console.pause(); | console.pause(); | ||
google = google.replace(' | google = google.replace(' | ||
- | + | | |
- | bbs.exec(' | + | bbs.exec(' |
+ | | ||
+ | | ||
console.putmsg(' | console.putmsg(' | ||
mswait(1000); | mswait(1000); | ||
Line 93: | Line 110: | ||
if (v < 0) { | if (v < 0) { | ||
url = ' | url = ' | ||
- | mswait(1000); | + | |
- | + | ||
- | | + | |
console.putmsg(' | console.putmsg(' | ||
console.putmsg(' | console.putmsg(' | ||
console.pause(); | console.pause(); | ||
url = url.replace(' | url = url.replace(' | ||
- | bbs.exec(' | + | |
+ | if(user.is_sysop) | ||
+ | bbs.exec(' | ||
+ | else | ||
+ | | ||
console.putmsg(' | console.putmsg(' | ||
mswait(1000); | mswait(1000); | ||
Line 111: | Line 130: | ||
exit(); | exit(); | ||
break; | break; | ||
+ | } | ||
+ | </ | ||
- | case '^M': | + | ===== WeeChat IRC Client ===== |
- | console.putmsg(' | + | |
+ | WeeChat (Wee Enhanced Environment for Chat) makes for a decent IRC client alternative to the stock irc.js client. | ||
+ | |||
+ | First, install Weechat under Debian type: | ||
+ | |||
+ | $ sudo apt-get install weechat | ||
+ | |||
+ | add WeeChat as an external program similar to Links2 | ||
+ | ( the script's bbs.exec('whatever', | ||
+ | |||
+ | add a cmdkey ... end_cmd entry in your command shell similar to links2 above, if desired. | ||
+ | |||
+ | === example weechat js === | ||
+ | |||
+ | Weechat looks for a configuration file in / | ||
+ | so wee need to setup a new config for each user/ | ||
+ | |||
+ | < | ||
+ | load(" | ||
+ | |||
+ | var enable; | ||
+ | var server; | ||
+ | var port; | ||
+ | var chan; | ||
+ | var lusr = user.alias; | ||
+ | |||
+ | var quit_msg = system.name+' | ||
+ | |||
+ | var irc = load(" | ||
+ | |||
+ | if(irc.enabled == undefined) enabled = true; | ||
+ | else enabled = irc.enabled; | ||
+ | if(irc.chan === undefined) chan = '# | ||
+ | else chan = irc.chan; | ||
+ | if(irc.server === undefined) servers = ' | ||
+ | else server = irc.servers; | ||
+ | |||
+ | var infile = system.ctrl_dir+' | ||
+ | var outfile = system.ctrl_dir+' | ||
+ | var weechat = '/ | ||
+ | var wc_bup = '/ | ||
+ | var save_prefs = system.data_dir+' | ||
+ | |||
+ | if(!file_exists(weechat) || !enabled) { | ||
+ | | ||
+ | writeln(' | ||
+ | } else { | ||
+ | writeln(' | ||
+ | mswait(500); | ||
+ | writeln(' | ||
+ | load(" | ||
+ | exit(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | var line; | ||
+ | var count; | ||
+ | |||
+ | var inf = new File(infile); | ||
+ | var out = new File(outfile); | ||
+ | |||
+ | writeln(' | ||
+ | writeln(' | ||
+ | writeln(' | ||
+ | writeln(' | ||
+ | writeln(' | ||
+ | |||
+ | var cont = console.noyes(' | ||
+ | if(cont) { | ||
+ | console.putmsg(' | ||
+ | exit(0); | ||
+ | } | ||
+ | |||
+ | console.putmsg(' | ||
+ | var goon = console.getkey().toUpperCase(); | ||
+ | if(goon != " | ||
+ | switch(goon) { | ||
+ | case ' | ||
+ | writeln(' | ||
mswait(1000); | mswait(1000); | ||
exit(); | exit(); | ||
- | | + | break; |
+ | |||
+ | case ' | ||
+ | console.putmsg(' | ||
+ | var chan1 = console.getstr(); | ||
+ | if(chan1 != '' | ||
+ | chan = chan1; | ||
+ | console.putmsg(' | ||
+ | var lusr1 = console.getstr(); | ||
+ | if(lusr1 != '' | ||
+ | lusr = lusr1; | ||
+ | console.putmsg(' | ||
+ | mswait(1000); | ||
+ | | ||
} | } | ||
+ | |||
+ | inf.open(" | ||
+ | out.open(" | ||
+ | |||
+ | count = 0; | ||
+ | |||
+ | while(!inf.eof) { | ||
+ | line = inf.readln().trim(); | ||
+ | if(line.toUpperCase() !== " | ||
+ | out.writeln(line); | ||
+ | count++; | ||
+ | } | ||
+ | else { // found [server] , this section needs to be replace with sbbs user credentials | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(' | ||
+ | out.writeln(); | ||
+ | count += 41; | ||
+ | console.pause(); | ||
+ | out.close(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | inf.close(); | ||
+ | out.close(); | ||
+ | file_rename(weechat, | ||
+ | file_copy(outfile, | ||
+ | bbs.exec(' | ||
+ | |||
+ | console.pause(); | ||
+ | writeln(' | ||
+ | mswait(1000); | ||
</ | </ | ||
+ | ===== ===== | ||
+ | |||
===== See Also ===== | ===== See Also ===== | ||
* [[: | * [[: |