r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Core] Discuss core issues

Micha
5-Jun-2005
[1192x4]
jak napisaæ serwer  tunel : client - socks - http proxy - serwer 
?
how to write server  tunnel : client - socks - http proxy - server 
?
1. firefox  connet socks serwer .
2. socks serwer connett proxy serwer .
3. proxy serwer connet internet
to pass someone code of such application maybe ?
Gabriele
6-Jun-2005
[1196x2]
Guest: you can try: port: make port! http://yoururlopen port  
 (after pressing esc you can access port/locals/list)
otherwise, just try with trace/net on. you'll get a lot of output 
but surely the answer will be there somehow.
Ammon
6-Jun-2005
[1198]
Does anyone else find the fact that encloak/decloak CHANGES the 'data 
value passed to them confusing?  It sure has caused me quite a bit 
of headache!
Vincent
6-Jun-2005
[1199]
encloak/decloak : I think it's a good thing for security. You don't 
want having both encrypted and unencrypted data in memory. Modifying 
the data assure that the unencrypted string isn't available anymore 
(if you don't explicitly copy it.)
Ammon
6-Jun-2005
[1200]
Ah, I see.  That makes sense.
Sunanda
6-Jun-2005
[1201]
And it works the same way as replace or uppercase -- directly on 
the data.
Guest
6-Jun-2005
[1202]
rebol newby needs pop script to delete 1000 bounces from mailer daemon 
(was spam attacked) need to be able to delete emails based on subject 
or from to pattern. Thanks for any pointers or direction to sample 
script
Graham
6-Jun-2005
[1203x3]
the problem with the standard rebol pop protocol is that it doesn't 
allow you to download the headers only.
DideC has a script somewhere that allows you to examine your mail 
box and delete selected email.
I do too, but mine is part of a larger anti-spam package.
http://membres.lycos.fr/didec/rebsite/delete-emails/delete-emails3.0.0.html
Guest
7-Jun-2005
[1206]
thanks Graham. this looks pretty neat . i may be able to use some 
of this code. i just need a simple script that connects to pop, loops 
through emails and checks each one for pattern in subject and deletes 
it if it matches. thanks again.
Graham
7-Jun-2005
[1207x2]
your're welcome guest
In most cases, where some spam has been bounced back to you as the 
account does not exist, the first line of the email says something 
like

Return-Path: <>

The <> is a special null email address to stop mail loops.


So, if you check all your email for this first line, then you should 
be able to delete all the automated bounces.
yeksoon
10-Jun-2005
[1209]
what is the correct way to handle vector arithmeitc? Or rather, is 
there an easy way to show vector arithmetic

eg.
2 * [2, 3, 4] .... results should be [6, 8, 10]
MikeL
10-Jun-2005
[1210]
You could use Andrew Martin's map function to achieve this

do http://www.rebol.org/library/scripts-download/arguments.r; 
Needs

do http://www.rebol.org/library/scripts-download/map.r; Instantiate
map func [a][2 * a] [1 2 3 4 5 6] ; supply the function to map
>>[2 4 6 8 10 12]
Gregg
10-Jun-2005
[1211]
You might also check out Ladislav's matrix functions: http://www.fm.vslib.cz/~ladislav/rebol/#section-6
MichaelAppelmans
11-Jun-2005
[1212x4]
trying to open a pop mailbox with nonstandard password with the following 
code:
REBOL []
 mailbox: open [
        scheme: 'pop
        user: "myname"
        pass: "%$100k"
        host: "mydomain.com"
    ]

foreach message mailbox [
    print message
    ask "Next? "
]
close mail
I get the following error when I do this: ** Script Error: foreach 
expected data argument of type: series
** Near: foreach message mailbox [
    print message
    ask "Next? "
]
close
this is from a simple example in the script library with the only 
modification being an open block instead of a single line open. Thanks 
for any insight.
Graham
11-Jun-2005
[1216x2]
that would happen if mailbox = none
try 

print type? mailbox before you use the foreach
MichaelAppelmans
11-Jun-2005
[1218]
thanks Graham, I get " type has no value" does this mean that rebol 
is unable to open this pop account? I know my domain, user and pwd 
are correct
Graham
11-Jun-2005
[1219x2]
don't you need to specify the port id/
try setting 

trace/net on

before you open the port and see what happens
BrianH
11-Jun-2005
[1221]
No, it means that you used type instead of type? (with the question 
mark)
MichaelAppelmans
11-Jun-2005
[1222]
right  you are Brian, I had type ? not type? which returns port. 
so it is opening the mailbox but isn't mailbox a series?
Graham
11-Jun-2005
[1223]
I think some of the documentation on pop is incorrect as you have 
found.
MichaelAppelmans
11-Jun-2005
[1224]
aha. I think my understanding of using pop is flawed. i need some 
zzzzz's for now will play with this on the morrow. thanks for the 
help. gnight
Graham
11-Jun-2005
[1225]
user:[pass-:-mail-:-example-:-com]
remove at mailbox 22
close mailbox

this example I'm pretty sure doesn't work
MichaelAppelmans
11-Jun-2005
[1226]
complication is i have a password with special chars % and $ so i 
have to use the block form of the url
Graham
11-Jun-2005
[1227]
that's not the problem
MichaelAppelmans
11-Jun-2005
[1228x2]
i think i figured out what the problem was, I had a pop block, with 
open mailbox: open [scheme: 'pop ...etc
i tried mailbox: read [scheme: 'pop and it's running but I expect 
to run out of heap space as I have 800 emails  ;)
Graham
11-Jun-2005
[1230x2]
; open mailbox

len: length? mailbox
bounces: copy []

for i 1 len 1 [
	email: import-email raw: pick mailbox i
	if email/reply-to = "<>" [
		append bounces i
		print [ "Bounce at" i ]
	]
]

; remove bounces

reverse bounces
foreach num bounces [
	mailbox: head mailbox
	mailbox: skip mailbox ( num - 1 )
	remove mailbox
]

close mailbox
untested ... :)
MichaelAppelmans
11-Jun-2005
[1232]
wow, I'm impressed, I might have to stay awake for this ;)!!
Gregg
11-Jun-2005
[1233]
Graham is the mail master, along with Phil. :-)
Graham
11-Jun-2005
[1234]
Hey, it's untested .... !!
MichaelAppelmans
11-Jun-2005
[1235x2]
this is a great example. at this time I'm going to be moving bounces 
into another mailbox instead of deleting them as I need them for 
forensic evidence. We have just received word that the ISP is forcing 
the subscriber offline as the spam constitues a breach of contract
thanks I'll  kick this around a bit but it's a great start for someone 
who's having trouble wrapping his head around the rebol paradigm, 
too many decades of procedural programming, I'm afraid.
Graham
11-Jun-2005
[1237]
this is rather brute force as each email is downloaded ...
better to use one of the top hacks to just get the headers
MichaelAppelmans
11-Jun-2005
[1238]
good idea, some of the emails are huge'
Graham
11-Jun-2005
[1239]
I reversed the series so that you remove them from the end backwards

as otherwise I guess the numbering changes if you remove from the 
head instead
MichaelAppelmans
11-Jun-2005
[1240]
any idea if there is a way to read emails and forward them to another 
inbox without altering the header? it would be nice if I could move 
them from one account to another without affecting the to/from.
Graham
11-Jun-2005
[1241]
why not just write them to a text file?