hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

Full Version: File Cleaner
alexsen
Is there a file cleaner or a pipe command in linux that will clean the text like this :

ip - text
xxx.xxx.xxx.xxx text
xxx.xxx.xxx.xxx text

to just remove the text ?

i am askiing strange things tongue.gif
OneNight
I usually do stuff like that with mirc (/filter command and $left, in ur case). So if ur familiar with mirc scripting i suggest you use it!

But i am sure whater language you are experienced with will do the job.
alexsen
that is the problem i haven't started any language yet, i will soon thought i got some nice eBooks.
mrBob
ehm, copy/paste the text in notepad and replace ' text' with nothing?
then copy/paste it back huh.gif
dR4g0N
those things u can make with perl :> a friend wrote me an perl script some times ago, that pings the xray sql results and wrote it in another txt with user/pass.

usage: perl sql_ping.pl ???1.txt ???2.txt
alexsen
sorry but i always got an error on line 5 but thanks a lot smile.gif
dR4g0N
hmm lil example:

when u have a txt called scan.txt (with xray sql results) - so u must use it:

perl sql_ping.pl scan.txt scanresults.txt

---

instead of scanresults.txt u can choose lala.txt ^^

ahh and u need a perl interpreter
FLW
Logged in as root, from the cmd line "rm -rf /etc/filename.ext | touch /etc/filename.ext" .

The only issue I can think of is permissions. This would depend on what the file is for and is it dynamically accessed or just on boot up.

The other is if the file is not very long, open your text editor of choice and just delete the lines and save. No permission issues.

I would also steer clear of using someone elses scripts of any language unless you know the language. Even with positive intent on the script writers part, on the wrong disto it could be a disaster or could mislead you as to the cause of your problem. This is a point for any issue you may incounter. This would also apply to command line statements like the one above. i.e rm=remove rf=recursively force which will delete any sub direcories as well as files. rm -rf can be the kiss of death to your OS if accidently used incorrectly.

You need to have a basic understanding of the cmd line before any real scripting so you understand "other" reasons it may work or fail.
dozolax
good post
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.