Esempio n. 1
0
File: ftpu.cpp Progetto: elfmz/far2l
void main(int argc,char *argv[])
{
	CTArgInit(argc,argv,FALSE);

	if(argc < 2 || CTArgCheck("?"))
	{
		printf("USAGE: FTPU <command>\n"
		       "Where commands are:\n"
		       " -<H>ash=<text>    - creates password hash\n"
		       " -<P>wd=<hash>     - decode password from hash\n"
		       " -<P>wd=hex:<hash> - decode password from FTP file or registry format\n"
		       "");
		return;
	}

	LPCSTR m;
	BYTE     b[FTP_PWD_LEN];
	char     str[MAX_PATH];

	if((m=CTArgGet("h;hash")) != NULL)
	{
		MakeCryptPassword(m, b);
		printf("Hash for \"%s\" is:\n",m);
		PPwd(b);
	}
	else if((m=CTArgGet("p;pwd")) != NULL)
	{
		ReadPwd(b,m);
		DecryptPassword(b, str);
		printf("The password is: [%s]\n",str);
	}
	else
		printf("Command missing or mitsmatch!\n");;
}
int BfBootDRI::NObjCommonBfTaskProfile::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    typedef Domain::NamedObject QMocSuperClass;
    _id = QMocSuperClass::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: ObtainCbpPort((*reinterpret_cast< DRI::IAsyncCmd*(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 1: ObtainCbpPort((*reinterpret_cast< DRI::IAsyncCmd*(*)>(_a[1]))); break;
        case 2: ObtainAddressByMac((*reinterpret_cast< DRI::IAsyncCmd*(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
        case 3: ObtainAddressByMac((*reinterpret_cast< DRI::IAsyncCmd*(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
        case 4: ObtainAddressByNum((*reinterpret_cast< DRI::IAsyncCmd*(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< int(*)>(_a[4]))); break;
        case 5: ObtainAddressByNum((*reinterpret_cast< DRI::IAsyncCmd*(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
        default: ;
        }
        _id -= 6;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = m_addr; break;
        case 1: *reinterpret_cast< int*>(_v) = m_cbpPort; break;
        case 2: *reinterpret_cast< QString*>(_v) = ReadPwd(); break;
        case 3: *reinterpret_cast< bool*>(_v) = m_traceClient; break;
        case 4: *reinterpret_cast< bool*>(_v) = m_traceServer; break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: m_addr = *reinterpret_cast< QString*>(_v); break;
        case 1: m_cbpPort = *reinterpret_cast< int*>(_v); break;
        case 2: m_boardPwd = *reinterpret_cast< QString*>(_v); break;
        case 3: m_traceClient = *reinterpret_cast< bool*>(_v); break;
        case 4: m_traceServer = *reinterpret_cast< bool*>(_v); break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 5;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}