General :: Convert Shell Logs - Incl. Escape Characters - To HTML?
Mar 6, 2010
Is there tool or a regexp that can convert shell escape characters to HTML code?
As an example, here is a logfile from GNU screen:
Which I would like to convert to something like this:
And send as HTML e-mail to an e-mail address, to archive my work.
Here is a related question, which shows how to convert it to regular text, but it would be nice to convert to HTML and not just throw the escape characters away.
View 1 Replies
ADVERTISEMENT
Apr 6, 2011
dhclient does not strip or escape shell meta-characters
Summary: dhclient doesn't strip or escape certain shell meta-characters in dhcpd responses, allowing a rogue server or party with with escalated privileges on the server to cause remote code execution on the client.
CVE:
ISC dhclient did not strip or escape certain shell meta-characters in responses from the dhcp server (like hostname) before passing the responses on to dhclient-script. Depending on the script and OS, this can result in execution of exploit code on the client.
CVSS Score:
For more information on CVSS scores, visit [url]
Workarounds:
On SUSE systems, it is possible to disable hostname update by setting DHCLIENT_SET_HOSTNAME="no" in /etc/sysconfig/network/dhcp.
Other systems may add following line to dhclient-script at the beginning of the set_hostname() function:
In environments where filters/acls can be put into place to limit clients to accessing only legitimate dhcp servers, this will protect clients from rogue dhcp servers deliberately trying to exploit this bug.
However, this will not protect from compromised servers.
Active exploits:
Solution:
Upgrade to 3.1-ESV-R1, 4.1-ESV-R2 or 4.2.1-P1. [url]
No patch is available for 4.0.x as it is EOL. Anyone running 4.1.x should upgrade to 4.1-ESV-R2.
Acknowledgments:
Revisions:
View 1 Replies
View Related
Aug 28, 2011
While modifying the definition of my PS1, I saw that "[" and "]" markers should be added to help bash to compute the right display lenght. Many exemples on the web do not use them or even mention them.I searched for a solution to add them automatically, like with sed, but I didn't find any example.Are they still needed and is there a recommandation not to use sed to define PS1?
View 1 Replies
View Related
Oct 20, 2009
Need little advice running this command.
watch -d 'ps aux | awk '{print $4" "$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr | head'
I get this error message from AWK. awk: cmd. line:1:
{print awk: cmd. line:1: ^ unexpected newline or end of string
I have tried all the usual by trying to escape the single and double quotes in the command but same result. The end result should be the a listing of memory hungry processes that are scanned every 2 seconds (watch default value).
View 2 Replies
View Related
Jan 22, 2010
Is it possible to remove the ESC sequences in GNU Screen's output file? Things such as colours, tabs and other escape characters make their way into the log files and become difficult to decipher.
I've tried Dr. Google & Co. as well as reading the manual, but haven't been able to find anything suitable.Perhaps I've overlooked something?
View 3 Replies
View Related
Feb 6, 2011
I wish to replace a new line with br (html) but it doesn't seem to work
Code:
message=$(echo ${FORM_message} | tr '
' '<br />' )
what it gives me seems to be ... b...? I am also having problem escaping hash sign in cut command:
Code:
list=$(echo "$line" | cut -d'#;#' -f1) ;
my intention is to split the line with "#;#"
View 5 Replies
View Related
Nov 11, 2010
My goal is to send escape characters from Linux to make scanner's LED blink. I've started with a simple "beep" command:
echo -e "�7"
and it worked. We are using WaveLink emulator and the escape sequences for the LED are
echo -e "�33%150;200;5L"
Linux returns me this: 150;200;5L
So, it doesn't work. What am I doing wrong for the LED sequences?
View 1 Replies
View Related
Nov 2, 2010
My question is: what option can I set in vim to see the colouring inside the editor as I would get it in my terminal (and switch off any additional syntax highlighting)?
View 1 Replies
View Related
Feb 23, 2010
info is the dufault document format. I am very like to read documents in this format.But, sometimes there is some articles or books are composed in html format.I wonder if there is some way to convert the html documents to the info ones.
View 3 Replies
View Related
Nov 11, 2009
I want to use an utility to convert word,pdf to html with same formatting. that utility able to run in commandline also. i want to integrate it in web page. so which utility is suitable for it
View 9 Replies
View Related
Jun 15, 2010
I need to convert a very large latex project (made up of many .tex and style files) into .html (or something similarly non-.pdf). Can someone recommend a quality converter program? Preferably, one that is:
[Code]....
View 1 Replies
View Related
May 7, 2010
I have a number of text files (26 per database x 100+ databases) which need 'correcting' in order to import into postgresql. I think that I have identified all the problem characters and I need to automate the process as much as possible. I have a script to convert the characters and I do them one by one (not effecient but easier to understand).
[Code].....
View 2 Replies
View Related
Jul 26, 2010
I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
View 1 Replies
View Related
Jan 5, 2011
I am trying to write a script that connects to a server and executes some commands on there. Something like this:
#!/bin/sh
telnet remote_machine
cd /home/some_directory
cat a_file_in_current_directory
Unfortunately after login/password I guess the script doesn't jump past the telnet command, until I exit. What do I need to do to make the script start executing commands in the remote shell?
View 1 Replies
View Related
Jul 13, 2011
I need to remove a large binary file(PDF file) from a large log file which is generated daily.This is seriously hogging space on our servers.I need to remove the large PDF from the logs to make the logs smaller and manageable
I need to take out the texts (or binary file) between the strings
<my:PDF> and </my:PDF>
<applicationForm> and </applicationForm>
<image> and </image>
<extractedSignature> and </extractedSignature>
I am not sure whether sed utility can do this, these are large files and need to be pruned .I am not seeking logrotation advice just a script or command that can strip these large logs of texts between the characters above . I am not sure how to do this.These files are rather large.I am not sure how to achieve this with sed , tail, head , tr or any other facility .
View 2 Replies
View Related
Feb 21, 2011
I need a shell script which will search and remove a javascript from all htm, html and php file.
Code:
<script type="text/javascript"> if (navigator.cookieEnabled) {var user = getCookie("seostop");if (user !=1){winchristop();setCookie("seostop", "1", 7,
[code]....
View 14 Replies
View Related
Mar 20, 2010
I recently installed Debian 5 04 AMD64, when I double-click on any HTML document it is rendered in very large characters.I guess one of the browsers installed (Iceweasel or Epiphany) is selected by default but I cannot find any clue as to which one.What puzzles me most is that I have not yet edited the Apache2 config files to give access to the directories where these files are stored, nor the user etc, and as far as I understand these HTML documents should not yet be available to Apache2 and the browser.
View 2 Replies
View Related
Jun 21, 2010
I need to convert the following .bat file to a linux shell script.experienced and kind linux folks:
:: Import database schema
echo off
echo.
[code]....
View 2 Replies
View Related
Aug 23, 2011
I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.
Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?
View 1 Replies
View Related
May 3, 2010
Kindly help me converting a batch file with following commands into shell script..I would like to have the same functionality with shell commands.
View 2 Replies
View Related
Mar 8, 2010
i'm trying to convert a html file into a text file when i simply run "html2text <filename>" the output displayed is the way we want but when i redirect the same using "-o" or ">>" the file is having extra characters in it. i even tried -ascii,but no much use.
View 4 Replies
View Related
Jan 8, 2010
Is there anyway to convert standard output to html ?
for example I wanna convert a colored file like this:
Code:
git diff -u --color-words --no-index ~/file1 ~/file2 > my_colorized_output
I wanna convert my_colorized_output ( or anything else ... ) to html format.
View 3 Replies
View Related
Jul 9, 2010
I have 2 GB of html files and i need to convert all of them at once to text files. Is there any way that I can do it. Converting each of them manually is really a pain and I want to convert all of them with a single command to text files.
View 5 Replies
View Related
Jul 12, 2010
I'm almost positive I've seen a program that runs on Ubuntu that can convert PDF files to HTML but I can't remember where I saw it and I have no idea what the name of it was
It would also be great if I could find a program that can convert PDFs to .odt or .doc or another format that works well with [URL] but thats not something I need right now
View 6 Replies
View Related
Jun 13, 2011
how to convert a html url to any image format in linux ? Is thereany free command line tool to do this ?
View 3 Replies
View Related
Jan 1, 2011
Im new to linux Iam pursuing bachelors in computer science engineering.... my final year project is to develop a "html to pdf converter using linux"... i have some basic knowledge of commands used in unix
1) Where can i get the basic idea about the existing converters... their pros and cons...
.... programming...
2) Any kind of material or source where i can get basic idea of programming used for converting html pages that are linked into a single pdf..
View 1 Replies
View Related
Aug 25, 2011
I have some checksums.md5 verification files from an ntfs external drive, but using windows notation: instead of /, spaces between file names (not escaped), reserved shell characters (like (, &, ', to name a few). The checksums.md5 has a bunch of checksums and filenames:
[code]...
I want to use this checksums.md5 to verify the files that I've copied to my machine: but I'm on a Linux, so I need to convert the names inside checksums.md5 from Windows to Linux to use the md5sum utility from the shell. The first line in my example would become: f12f75c1f2d1a658dc32ca6ef9ef3ffc My Windows & Files (2010)/[bak]/testing.wmv Is there some application for this (converting a file listing, from windows cmd notation, to linux shell notation) or will I need to create a bash script using sed that just "replaces" what is "wrong" with the filenames
View 1 Replies
View Related
Nov 25, 2010
I would like to know if there is an utility that converts a web tutorial made of html pages (like those about linux) to one single pdf or open-office document, so to easily print (or archive) it.
View 4 Replies
View Related
Mar 31, 2010
free program that can convert my webpages containing javascript and html code into a flowchart. also i dont mind if the program works on either windows or ubuntu as i have both.
View 1 Replies
View Related
Mar 13, 2009
I've spent a lot of time googling on this one, but could not really find anything that would convert HTML to images. Does anyone know if there are some command line tools that can do this? I need to convert simple HTML documents to images to be attached to Powerpoint presentations. Could firefox gecko be tapped into to do this without a GUI?
View 4 Replies
View Related