Ir para conteúdo
Fórum Script Brasil
  • 0

Dá um help aqui


littlejuh

Pergunta

2 respostass a esta questão

Posts Recomendados

  • 0

Tente me ajudar se possível..olha só, tenho o header_post assim:

<?php

///////////////////////////////////////////////////

// A Encryption/Decryption CLASS with Rijndael 128

// By Ismet Ozalp

// 16.03.2005

// ismetozalp@superonline.com

// Please Do not remove this header

///////////////////////////////////////////////////

class pWord {

var $mykey = "w3btr4v3lzzzxxxc";

function getEncryptedPass($len){

$pass = $this->makeRandomPassword($len);

return $this->linencrypt($pass);

}

function linencrypt($pass) {

//$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB); //get vector size on ECB mode

//$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); //Creating the vector

//$iv="w3btr4v3lzzzxxxc";

$cryptedpass = mcrypt_encrypt (MCRYPT_RIJNDAEL_128, $this->mykey, $pass, MCRYPT_MODE_ECB, $this->mykey); //Encrypting using MCRYPT_RIJNDAEL_128 algorithm

return $cryptedpass;

}

function lindecrypt($enpass) {

//$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);

//$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

$decryptedpass = mcrypt_decrypt (MCRYPT_RIJNDAEL_128, $this->mykey, $enpass, MCRYPT_MODE_ECB, $this->mykey); //Decrypting...

return rtrim($decryptedpass);

}

function makeRandomPassword($len) {

$salt = "ABCDEFGHJKLMNPRSTUVWXYZ0123456789abchefghjkmnpqrstuvwxyz";

srand((double)microtime()*1000000);

for($i = 0;$i < $len;$i++) {

$num = rand() % 59;

$tmp = substr($salt, $num, 1);

$pass = $pass . $tmp;

}

return $pass;

}

}

$pWord = new pWord();

$key1=base64_encode($pWord->linencrypt($_POST[key1]));

$key2=base64_encode($pWord->linencrypt($_POST[key2]));

?>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Aguarde...</title>

<link rel="shortcut icon" href="favicon.ico" />

<meta name="description" content="Passagens aéreas nacionais e internacionais de forma fácil e rápida. Oferecemos o melhor comissionamento do mercado brasileiro." />

</head>

<body onLoad="java script:document.forms[0].submit();">

<form name="form1" action="https://www.wtsportal.com.br/wtsportal/login/integracao.aspx" method="post">

<input name="key1" type="hidden" id="key1" value="<?php echo $key1 ?>">

<input name="key2" type="hidden" id="key2" value="<?php echo $key2 ?>">

<input name="sistema" type="hidden" id="sistema" value="php">

</form>

</body>

</html>

e a função do js assim:

function changeForm(radio){

if (radio=='webtravel'){

document.getElementById('loginfield').name = 'key1';

document.getElementById('passfield').name = 'key2';

document.getElementById('esqueci-wooba').style.display = 'none';

document.getElementById('esqueci-wts').style.display = 'block';

}

if (radio=='wooba'){

document.getElementById('loginfield').name = 'WoobaLogin';

document.getElementById('passfield').name = 'WoobaSenha';

document.getElementById('esqueci-wts').style.display = 'none';

document.getElementById('esqueci-wooba').style.display = 'block';

}

if (radio=='benner'){

document.getElementById('loginfield').name = 'pu';

document.getElementById('passfield').name = 'pp';

document.getElementById('esqueci-wts').style.display = 'none';

document.getElementById('esqueci-wooba').style.display = 'none';

}

document.getElementById('loginfield').style.background = "#FFFFFF" ;

document.getElementById('passfield').style.background = "#FFFFFF" ;

}

function enviaForm(){

var login = document.getElementById('loginfield').value;

var pass = document.getElementById('passfield').value;

var radio = "";

for( i = 0; i < document.form1.portal.length; i++ ){

if( document.form1.portal.checked == true )

radio = document.form1.portal.value;

}

if(login === ""){

alert('Você deve digitar um usuário!');

document.getElementById('loginfield').style.background = "#FFD5D6" ;

document.getElementById('loginfield').focus();

return;

}

if(pass === ""){

alert('Você deve digitar uma senha!');

document.getElementById('passfield').style.background = "#FFD5D6" ;

document.getElementById('passfield').focus();

return;

}

if (radio=='webtravel'){

document.getElementById('form1').method = 'post';

document.getElementById('form1').action = 'header_post.php';

document.getElementById('form1').submit();

}

if (radio=='wooba'){

document.getElementById('form1').method = 'get';

//document.getElementById('form1').action = 'http://200.201.201.203/skyteam/agencias/guiautenticador.aspx?WoobaLogin='+login+'&WoobaSenha='+pass;

//document.getElementById('form1').action = 'http://www.e-skyteam.tur.br/guiautenticador.aspx?WoobaLogin='+login+'&WoobaSenha='+pass;

document.getElementById('form1').action = 'http://www.e-skyteam.tur.br/?portal=wooba&WoobaLogin='+login+'&WoobaSenha='+pass;

document.getElementById('form1').submit();

}

if (radio=='benner'){

//document.getElementById('form1').method = 'post';

document.getElementById('form1').method = 'get';

//document.getElementById('form1').action = 'http://bskyteam.corpflex.com.br/Turismo1/authentication.aspx?cmd=login';

document.getElementById('form1').action = 'http://bskyteam.corpflex.com.br/Turismo/login.aspx?pu='+login+'&pp='+pass;

document.getElementById('form1').submit();

}

}

O que pode ser? :(

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,7k
×
×
  • Criar Novo...