sed with several lines, how?

2010-11-27 Thread Arthur Bela
hyphen's [ - ] are just for marking the start/end of a pattern, but
there are _not in_ the pattern!
OUTPUT is what i want after seding the PATTERN#X's


so i for e.g.: need the first, and second magic
sed FIRSTMAGIC PATTERN#1
sed SECONDMAGIC PATTERN#2




PATTERN#1:

---
SOMETEXT#1
brfont size=3SOMETEXT#2/fontbr
brfont size=3SOMETEXT#3/fontbr
SOMETEXT#4
---

exact pattern, what is unique from the pattern:
---
/fontbr\nbrfont size=3
---

OUTPUT:
---
SOMETEXT#1
brfont size=3SOMETEXT#3/fontbr
SOMETEXT#4
---





and:

PATTERN#2:

---
SOMETEXT#1
brfont size=3SOMETEXT#2/fontbr
/font/div/body/html
SOMETEXT#3
---

exact pattern, what is unique from the pattern:
---
/fontbr\n/font/div/body/html
---

OUTPUT:
---
SOMETEXT#1
/font/div/body/html
SOMETEXT#3
---


i just can't figure it out, how to sed when having several lines
[nor in awk, perl..]

could anyone post a link, or some guide, how to write these two lines of sed?

Thank You! :\


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktintfczads7qwg4tnyqwbamp4v42ndx6czsel...@mail.gmail.com



Re: sed with several lines, how?

2010-11-27 Thread Arthur Bela
thank you, and sorry, if i had formulated wrong, but the SOMETEXT#X
is a random STRING, like:

$ cat testfile.txt
alsjflsajfkljasdf
brfont size=3asfklasjlkyxcvo/fontbr
brfont size=3kldfjlkasjdfasdf/fontbr
kasfjxcvklajdflas

yxcvkjasafjads
brfont size=3asdfjkldjlasj/fontbr
/font/div/body/html
uiyxzckjhasfsd
$



$ awk 'BEGIN {sawpattern=0} ^SOMETEXT, ^SOMETEXT {if (($0
~/brfont size=3SOMETEXT/ )  (sawpattern == 0)) {sawpattern=1}
else {sawpattern=0;print $0}}' testfile.txt
alsjflsajfkljasdf
brfont size=3asfklasjlkyxcvo/fontbr
brfont size=3kldfjlkasjdfasdf/fontbr
kasfjxcvklajdflas

yxcvkjasafjads
brfont size=3asdfjkldjlasj/fontbr
/font/div/body/html
uiyxzckjhasfsd
$

On 27 November 2010 12:39, Arthur Bela jozsi.avad...@gmail.com wrote:
 hyphen's [ - ] are just for marking the start/end of a pattern, but
 there are _not in_ the pattern!
 OUTPUT is what i want after seding the PATTERN#X's


 so i for e.g.: need the first, and second magic
 sed FIRSTMAGIC PATTERN#1
 sed SECONDMAGIC PATTERN#2




 PATTERN#1:

 ---
 SOMETEXT#1
 brfont size=3SOMETEXT#2/fontbr
 brfont size=3SOMETEXT#3/fontbr
 SOMETEXT#4
 ---

 exact pattern, what is unique from the pattern:
 ---
 /fontbr\nbrfont size=3
 ---

 OUTPUT:
 ---
 SOMETEXT#1
 brfont size=3SOMETEXT#3/fontbr
 SOMETEXT#4
 ---





 and:

 PATTERN#2:

 ---
 SOMETEXT#1
 brfont size=3SOMETEXT#2/fontbr
 /font/div/body/html
 SOMETEXT#3
 ---

 exact pattern, what is unique from the pattern:
 ---
 /fontbr\n/font/div/body/html
 ---

 OUTPUT:
 ---
 SOMETEXT#1
 /font/div/body/html
 SOMETEXT#3
 ---


 i just can't figure it out, how to sed when having several lines
 [nor in awk, perl..]

 could anyone post a link, or some guide, how to write these two lines of 
 sed?

 Thank You! :\



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktim+cy7x9wqntxpee4krsb6nqt=wamckttgn8...@mail.gmail.com



run program with another user how?

2010-11-25 Thread Arthur Bela
I want to use an application with wine, but not with the user logged
in - with another user [it would be a chroot ~like thing :D -
because i don't trust the app...]:

i set the permissions:

chmod 705 -R ANOTHERUSER/

gksu -u ANOTHERUSER xcalc

it asks for a password, i type in the correct passwd, but nothing happens.

What am i doing wrong? :(

it doesn't give any error messages, that i can google.. :\

thank you for any tips


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlkti=uyvje-b0vrfhes3sgdjx4r_eefunh7t7k9...@mail.gmail.com



Re: question regarding SSL

2010-11-25 Thread Arthur Bela
Thank you for the answer!

On 25 November 2010 00:50, Celejar cele...@gmail.com wrote:
 On Wed, 24 Nov 2010 22:45:59 +0100
 Arthur Bela jozsi.avad...@gmail.com wrote:

 If i use https, then my connection is safe, ok.

 I just want to know, that can someone see that what link i'm exactly 
 visiting?

 I mean, it can only see, that i'm visiting THISSITE.COM, or it can see
 THISSITE.COM/SOMELINK.html ?

 thank you for any info, link :\

 I'm no expert, and I may be totally wrong, but IIUC, the resource path
 is only sent within the HTTP request, as part of the request method
 (e.g. GET / HTTP/1.1[CRLF]), which is encapsulated within the SSL
 session, so it ought to be safe.

 Celejar
 --
 foffl.sourceforge.net - Feeds OFFLine, an offline RSS/Atom aggregator
 mailmin.sourceforge.net - remote access via secure (OpenPGP) email
 ssuds.sourceforge.net - A Simple Sudoku Solver and Generator


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/20101124185028.ce17b51a.cele...@gmail.com




-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktimo-azo4xriy3=yu_p7yj126yqmx7hk-difk...@mail.gmail.com



Re: question regarding SSL

2010-11-25 Thread Arthur Bela
Well, I think yes, the URI could be displayed/retrieved. It is registered
in plain text in web server logs.

I meant someone is sniffing the connection between my pc, and the
server, not the server admin. :O

So if someone is sniffing the connection it can only see that, i'm
visiting https://THISSITE.COM, and it can't see, that I visit
https://THISSITE.COM/SOMELINK.html

Thank you!

On 25 November 2010 12:01, Camaleón noela...@gmail.com wrote:
 On Wed, 24 Nov 2010 22:45:59 +0100, Arthur Bela wrote:

 If i use https, then my connection is safe, ok.

 Your connection is encrypted, which means if someone can get a raw dump
 of the transaction data, it will have to decypher the chunk of code.

 I just want to know, that can someone see that what link i'm exactly
 visiting?

 Mmmm...

 I mean, it can only see, that i'm visiting THISSITE.COM, or it can see
 THISSITE.COM/SOMELINK.html ?

 Well, I think yes, the URI could be displayed/retrieved. It is registered
 in plain text in web server logs.

 Greetings,

 --
 Camaleón


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/pan.2010.11.25.11.01...@gmail.com




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktimzwn+vxoc73dnunve6kq3_ilrqckdhothjs...@mail.gmail.com



Re: run program with another user how?

2010-11-25 Thread Arthur Bela
When i log in with the ANOTHERUSER, and start the app, it works.

http://pastebin.com/raw.php?i=v00dEEtF

when i log in with USER, i can't even start xcalc with gksu, so the
problem is not with wine, or the program

On 25 November 2010 11:52, Michal mic...@sharescope.co.uk wrote:
 On 25/11/10 10:51, Arthur Bela wrote:

 I want to use an application with wine, but not with the user logged
 in -  with another user [it would be a chroot ~like thing :D -
 because i don't trust the app...]:

 i set the permissions:

 chmod 705 -R ANOTHERUSER/

 gksu -u ANOTHERUSER xcalc

 it asks for a password, i type in the correct passwd, but nothing happens.

 What am i doing wrong? :(

 it doesn't give any error messages, that i can google.. :\

 thank you for any tips


 What happens if you su to that user, or even login as that user, does it
 work then?


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject
 of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/4cee4000.3010...@sharescope.co.uk




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinogx8t8_nz+otzv+jbgyv-dt99gexvpqtpv...@mail.gmail.com



Re: run program with another user how?

2010-11-25 Thread Arthur Bela
$ gksu -u mm5-user -l -d xcalc
No ask_pass set, using default!
xauth: /tmp/libgksu-8oLjeq/.Xauthority
STARTUP_ID: gksu/xcalc/10131-0-g_TIME24032970
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: mm5-user
cmd[7]: --
cmd[8]: xcalc
buffer: -GNOME_SUDO_PASS-
brute force GNOME_SUDO_PASS ended...
Yeah, we're in...
xauth: /tmp/libgksu-8oLjeq/.Xauthority
xauth_env: /var/run/gdm/auth-for-gbor-Gb8eBC/database
dir: /tmp/libgksu-8oLjeq
$


On 25 November 2010 16:59, Camaleón noela...@gmail.com wrote:
 On Thu, 25 Nov 2010 15:06:08 +0100, Arthur Bela wrote:

 On 25 November 2010 11:52, Michal wrote:

 What happens if you su to that user, or even login as that user, does
 it work then?

 When i log in with the ANOTHERUSER, and start the app, it works.

 http://pastebin.com/raw.php?i=v00dEEtF

 when i log in with USER, i can't even start xcalc with gksu, so the
 problem is not with wine, or the program

 Try:

 gksu -u user -l -d xcalc

 Greetings,

 --
 Camaleón


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/pan.2010.11.25.15.59...@gmail.com




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinxuc6ouspvz27xdueigcq+ifd1aq2s-9l4b...@mail.gmail.com



Re: run program with another user how?

2010-11-25 Thread Arthur Bela
gksu -u mm5-user -l -d -w xcalc

it worked!!! thank you!!

On 25 November 2010 19:17, Camaleón noela...@gmail.com wrote:
 On Thu, 25 Nov 2010 17:52:23 +0100, Arthur Bela wrote:


 On 25 November 2010 16:59, Camaleón wrote:

 (...)

 gksu -u user -l -d xcalc

 $ gksu -u mm5-user -l -d xcalc
 No ask_pass set, using default!
 xauth: /tmp/libgksu-8oLjeq/.Xauthority STARTUP_ID:
 gksu/xcalc/10131-0-g_TIME24032970 cmd[0]: /usr/bin/sudo
 cmd[1]: -H
 cmd[2]: -S
 cmd[3]: -p
 cmd[4]: GNOME_SUDO_PASS
 cmd[5]: -u
 cmd[6]: mm5-user
 cmd[7]: --
 cmd[8]: xcalc
 buffer: -GNOME_SUDO_PASS-
 brute force GNOME_SUDO_PASS ended...
 Yeah, we're in...
 xauth: /tmp/libgksu-8oLjeq/.Xauthority xauth_env:
 /var/run/gdm/auth-for-gbor-Gb8eBC/database dir: /tmp/libgksu-8oLjeq
 $

 Mmm... it works fine here:

 t...@debian:~$ gksu -u test2 -l -d xcalc
 xauth: -a195bd96819834793354c82655505b8a
 -
 display: -:0.0-
 final xauth: -a195bd96819834793354c82655505b8a
 -
 final display: -:0.0-
 STARTUP_ID: gksu/xcalc/2002-0-debian_TIME0
 gksu_context_run: buf: -Contraseña: -
 no password on keyring
 DEBUG (run:after-pass) buf: -Contraseña: -
 -EBUG (run:post-after-pass) buf: -
 -EBUG (run:post-after-pass) buf: -gksu: waiting
 -EBUG (gksu: waiting) buf: -gksu: waiting

 And xcalc is launched.

 I've noted you are using sudo, but maybe you can try to enforce
 su (using -w modifier):

 gksu -u mm5-user -l -d -w xcalc

 Greetings,

 --
 Camaleón


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/pan.2010.11.25.18.17...@gmail.com




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktik8aredjoow_l2vyepwx=7xu16gwmao5eoyx...@mail.gmail.com



question regarding SSL

2010-11-24 Thread Arthur Bela
If i use https, then my connection is safe, ok.

I just want to know, that can someone see that what link i'm exactly visiting?

I mean, it can only see, that i'm visiting THISSITE.COM, or it can see
THISSITE.COM/SOMELINK.html ?

thank you for any info, link :\


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin++rkseu8ayhwx+hrtxu+q8ltkf=k4xrkkg...@mail.gmail.com



need a quick hashing method

2010-11-22 Thread Arthur Bela
HDD#1
HDD#2

I copy files between HDD#1 and HDD#2.

When i finish, i need a quick hasing method - i just want to check,
that the copy was 100% ok.

md5sum, sha256sum is slow - are there any very fast hash algoritms?
- just for checking if the copied file is corrupt or not [i just need
to know, if there were even 1 Byte error when copying]

i can write the script, that checks the files, i just need a hash
algoritm [software/command], that is fast enough.

Thank you!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinzuyqrsdjpydg+gvl_svs1ubz795fud7k=j...@mail.gmail.com



what to use besides selinux?

2010-11-21 Thread Arthur Bela
I

apt-get install selinux

Ok. Reboot. So I'm better protected now, or i have to set a few things?

I read that selinux is good for post-exploitation situations. What do
i have to google to search for solutions protecting me
before-exploitations?


*exploitations ~ intrusions, penetrations, sry4the english :P

thank you:\


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktikgxrkqbchuusjywrrrkd5ht=tjlgxwcnrk9...@mail.gmail.com



how to kill a process that is defunct?

2010-11-21 Thread Arthur Bela
I tried to:

kill -9 3341

but it's still there, and it's using 100% cpu :\

I only tried to download a few linux iso's, so i can seed them back a
couple of times [about ~20 at a time :O ] but transmission just
freezez

I tried to log out, and log in, when i log back, it's still there :O
only when i reboot my pc...only then it will dissapear..

Is there a way to kill that process?

Thank you :O
attachment: defunct.png

Re: what to use besides selinux?

2010-11-21 Thread Arthur Bela
just a normal desktop. [no server function on it]. on a plain notebook.

On 21 November 2010 14:23, Camaleón noela...@gmail.com wrote:
 On Sun, 21 Nov 2010 11:27:09 +0100, Arthur Bela wrote:

 I

 apt-get install selinux

 Ok. Reboot. So I'm better protected now, or i have to set a few things?

 Congrats. Now your odessy starts by here :-P

 http://wiki.debian.org/SELinux

 I read that selinux is good for post-exploitation situations. What do i
 have to google to search for solutions protecting me
 before-exploitations?

 http://www.debian.org/doc/manuals/securing-debian-howto/

 But you should be more specific. What services are you running? are all
 that services providing remote functionalities? Have you setup a
 firewall, IPS, IDS...? What are your requirements (server, home,
 workstation usage)?

 Greetings,

 --
 Camaleón


 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/pan.2010.11.21.13.23...@gmail.com




--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktink+bxmtmscmdadvd9-7fl7a9yue59hoqacg...@mail.gmail.com



encrypt file names zip

2010-11-19 Thread Arthur Bela
i can recursively zip a folder with password with:

zip -re some-folder.zip some-folder/

but how can i encrypt the filenames in the zip file? cause i can see
them, i just only can't extract them!

or there isn't any way? 7-zip under windows can do it :O

ubuntu 10.10

Thank you for any answer!


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlkti=dhy3zwxacqs3tekq-v2ran0ofqzunn_65v...@mail.gmail.com



how to generate pi in c

2010-11-05 Thread Arthur Bela
Does anyone has a generate-pi.c source code?

Thanks.. :D :\


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinw53os6zrdwmnyvmx6mo5fwf_jetvdw4l9g...@mail.gmail.com