|
|
|
; Super proxaille - Encore une création Averell (Averell@mircscriptsfrfm.com)
dialog wing {
title "Super Proxaille, pour bidouilleurs"
size -1 -1 400 182
box "", 11, 10 10 380 150
button "&Accept", 101, 260 62 120 25, default
button "&Cancel", 111, 260 94 120 25,cancel
text "Adresse ip cible", 103, 0 30 110 25,right
text "Port cible", 104, 0 62 80 25,right
text "Port proxy", 107, 0 94 80 25,right
edit "",105,115 30 100 25,right
edit "",106,115 62 100 25,right
edit "",108,115 94 100 25,right
}
on 1:dialog:wing:edit:105:{ %tempserv = $did(105).text }
on 1:dialog:wing:edit:106:{ %tempport = $did(106).text }
on 1:dialog:wing:edit:108:{ %tempprox = $did(108).text }
on 1:dialog:wing:sclick:101: dialog -c wing | set %wingport %tempport | set %wingserv %tempserv | set %wingprox %tempprox
alias wingconfig {
dialog -m wing wing
did -ra wing 105 %wingserv
did -ra wing 106 %wingport
did -ra wing 108 %wingprox
set %tempport %wingport | set %tempserv %wingserv | set %tempprox %wingprox
}
alias openwin socklisten swingate %wingprox | echo 4 -s *** Port proxy %wingprox ouvert
alias closewin {
%i = 1
:boucle
%temp1 = win $+ %i | %temp2 = totowin $+ %i
if ( $sock(%temp2).name != $null ) { sockwrite -n %temp2 quit :Closing of the wingate server | sockclose %temp2 }
sockclose %temp1
inc %i
if ( %i < 31 ) goto boucle
sockclose swingate | sockclose swingate2 | echo 4 -s *** Port proxy fermé
}
on 1:socklisten:swingate*: {
sockaccept NewSocket | %ip = $sock(Newsocket).ip | echo 4 -s *** Connexion de %ip sur $sockname
set %i 1
:bouclewin
set %temp2 win $+ %i
set %temp $sock(%temp2).name
if ( %temp == $null ) {
sockrename NewSocket win $+ %i | goto finbouclewin }
inc %i
if ( %i > 30 ) goto finbouclewin
goto bouclewin
:finbouclewin
%temp = @win $+ %i
if ( $window(%temp).state == $null ) window -n %temp
titlebar %temp ( %ip )
aline -ph 6 %temp *** Connection of %ip ( $+ %temp $+ )
}
on 1:sockclose:win*: {
echo 4 -s *** Disconnection of $sockname ( $sock($sockname).ip )
%temp = @ $+ $sockname | aline -ph 6 %temp *** Déconnexion de $sock($sockname).ip ( $+ $sockname $+ )
}
on 1:sockread:win*: {
sockread %temp
if ( $sockerr > 0 ) return
%temp2 = $gettok(%temp,2,32)
%winsock = toto $+ $sockname
%temp3 = @ $+ $sockname
if (%temp != $null) { aline -ph 1 %temp3 %temp }
else aline -ph %temp3 ***
if ( $sock(%winsock).name == $null ) {
sockopen %winsock %wingserv %wingport
}
set %temp2 toto $+ $sockname | %temp2 = $sock(%temp2).mark
%a = $true
if (%temp2 == putain) { sockwrite -n toto $+ $sockname %temp }
else {
%i = $hget($sockname,0)
if (%i == $null) { hmake $sockname | set %i 0 }
inc %i
hadd $sockname %i %temp
hadd $sockname 0 %i
}
}
on 1:sockopen:toto*:{
%temp = $right($sockname,$calc($len($sockname)-4))
%temp2 = @ $+ %temp
if ( $sockerr > 0 ) { sockwrite -n %temp ERREUR Connexion... | aline -ph 6 %temp2 *** Erreur connexion | return }
aline -ph 6 %temp2 *** Connexion établie sur $sockname
set %N $hget(%temp,0) | set %i 1 | sockmark $sockname putain
while (%i <= %N) {
sockwrite -n $sockname $hget(%temp,%i)
inc %i
}
hfree %temp
}
on 1:sockread:toto*:{
%temp = $right($sockname,$calc($len($sockname)-4))
if ( $sockerr > 0 ) { return }
sockread %temp2
sockwrite -n %temp %temp2
%temp3 = @ $+ %temp
if (%temp2 != $null) { aline -ph 12 %temp3 %temp2 }
else aline -ph 12 %temp3 ***
}
on 1:sockclose:toto*: {
%temp = $right($sockname,$calc($len($sockname)-4))
%ip = $sock(%temp).ip | %temp2 = @ $+ %temp
echo 4 -s *** Déconnexion de %temp ( %ip ) | sockclose %temp
aline -ph 6 %temp2 *** Déconnexion de %ip ( $+ $sockname $+ )
}
menu menubar {
Super Proxaille
.Ouvrir le proxy: openwin
.Fermer le proxy: if ($?!="Il y a peut être des connexions en cours. Etes-vous sûr?" == $True) { closewin }
.Configurer le proxy: wingconfig
}
| |
|
Retour à la liste des snippets
Cette annonce est-elle crédible? |
|
|
|