mirror of
https://github.com/a0rtega/pafish
synced 2024-11-22 06:11:18 +03:00
Make cppcheck happy, code style changes
This commit is contained in:
parent
c381be5083
commit
0e71cbd1b7
@ -47,13 +47,6 @@ void print_not_traced() {
|
||||
SetConsoleTextAttribute(handler, FOREGROUND_INTENSITY);
|
||||
}
|
||||
|
||||
void print_suspicious() {
|
||||
HANDLE handler = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
SetConsoleTextAttribute(handler, 207);
|
||||
printf("suspicious\n");
|
||||
SetConsoleTextAttribute(handler, FOREGROUND_INTENSITY);
|
||||
}
|
||||
|
||||
void write_log(char msg[]) {
|
||||
FILE *log;
|
||||
char logstr[1024];
|
||||
|
@ -12,8 +12,6 @@ void print_traced();
|
||||
|
||||
void print_not_traced();
|
||||
|
||||
void print_suspicious();
|
||||
|
||||
void write_log(char msg[]);
|
||||
|
||||
void write_trace(char product[]);
|
||||
|
@ -13,19 +13,6 @@ int debug_isdebuggerpresent() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* This function is not used because it isn't reliable in
|
||||
some new environments */
|
||||
int debug_checkremotedebuggerpresent() {
|
||||
BOOL isdebug = FALSE;
|
||||
CheckRemoteDebuggerPresent(GetCurrentProcess(), &isdebug);
|
||||
if (isdebug) {
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int debug_outputdebugstring() {
|
||||
DWORD err = 99; /* Random error */
|
||||
SetLastError(err);
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
int debug_isdebuggerpresent();
|
||||
|
||||
int debug_checkremotedebuggerpresent();
|
||||
|
||||
int debug_outputdebugstring();
|
||||
|
||||
#endif
|
||||
|
@ -67,13 +67,13 @@ int gensandbox_path() {
|
||||
int gensandbox_common_names() {
|
||||
DWORD dwSize = MAX_PATH;
|
||||
char szLogicalDrives[MAX_PATH] = {0};
|
||||
char filename[MAX_PATH] = {0};
|
||||
DWORD dwResult = GetLogicalDriveStrings(dwSize,szLogicalDrives);
|
||||
BOOL exists;
|
||||
|
||||
if (dwResult > 0 && dwResult <= MAX_PATH)
|
||||
{
|
||||
char* szSingleDrive = szLogicalDrives;
|
||||
char filename[MAX_PATH] = {0};
|
||||
while(*szSingleDrive)
|
||||
{
|
||||
if (GetDriveType(szSingleDrive) != DRIVE_REMOVABLE ) {
|
||||
|
@ -31,11 +31,13 @@
|
||||
|
||||
- Alberto Ortega
|
||||
|
||||
Blue fish icon thanks to http://www.fasticon.com/
|
||||
|
||||
*/
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char icon[] = "Blue fish icon thanks to http://www.fasticon.com/", winverstr[32], aux[1024];
|
||||
char winverstr[32], aux[1024];
|
||||
char cpu_vendor[13];
|
||||
OSVERSIONINFO winver;
|
||||
unsigned short original_colors = 0;
|
||||
@ -374,8 +376,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
write_log("End");
|
||||
|
||||
fflush(stdin);
|
||||
getchar();
|
||||
|
||||
/* Restore Original Console Colors */
|
||||
restore_cmd_colors(original_colors);
|
||||
|
||||
|
@ -9,7 +9,6 @@ int qemu_reg_key1() {
|
||||
HKEY regkey;
|
||||
LONG retu;
|
||||
char value[1024];
|
||||
int i;
|
||||
DWORD size;
|
||||
|
||||
size = sizeof(value);
|
||||
@ -17,6 +16,7 @@ int qemu_reg_key1() {
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
retu = RegQueryValueEx(regkey, "Identifier", NULL, NULL, (BYTE*)value, &size);
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
int i;
|
||||
for (i = 0; i < strlen(value); i++) { /* case-insensitive */
|
||||
value[i] = toupper(value[i]);
|
||||
}
|
||||
@ -40,7 +40,6 @@ int qemu_reg_key2() {
|
||||
HKEY regkey;
|
||||
LONG retu;
|
||||
char value[1024];
|
||||
int i;
|
||||
DWORD size;
|
||||
|
||||
size = sizeof(value);
|
||||
@ -48,6 +47,7 @@ int qemu_reg_key2() {
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
retu = RegQueryValueEx(regkey, "SystemBiosVersion", NULL, NULL, (BYTE*)value, &size);
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
int i;
|
||||
for (i = 0; i < strlen(value); i++) { /* case-insensitive */
|
||||
value[i] = toupper(value[i]);
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ int vbox_reg_key1() {
|
||||
HKEY regkey;
|
||||
LONG retu;
|
||||
char value[1024];
|
||||
int i;
|
||||
DWORD size;
|
||||
|
||||
size = sizeof(value);
|
||||
@ -26,6 +25,7 @@ int vbox_reg_key1() {
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
retu = RegQueryValueEx(regkey, "Identifier", NULL, NULL, (BYTE*)value, &size);
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
int i;
|
||||
for (i = 0; i < strlen(value); i++) { /* case-insensitive */
|
||||
value[i] = toupper(value[i]);
|
||||
}
|
||||
@ -52,7 +52,6 @@ int vbox_reg_key2() {
|
||||
HKEY regkey;
|
||||
LONG retu;
|
||||
char value[1024];
|
||||
int i;
|
||||
DWORD size;
|
||||
|
||||
size = sizeof(value);
|
||||
@ -60,6 +59,7 @@ int vbox_reg_key2() {
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
retu = RegQueryValueEx(regkey, "SystemBiosVersion", NULL, NULL, (BYTE*)value, &size);
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
int i;
|
||||
for (i = 0; i < strlen(value); i++) { /* case-insensitive */
|
||||
value[i] = toupper(value[i]);
|
||||
}
|
||||
@ -93,7 +93,6 @@ int vbox_reg_key4() {
|
||||
HKEY regkey;
|
||||
LONG retu;
|
||||
char value[1024];
|
||||
int i;
|
||||
DWORD size;
|
||||
|
||||
size = sizeof(value);
|
||||
@ -101,6 +100,7 @@ int vbox_reg_key4() {
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
retu = RegQueryValueEx(regkey, "VideoBiosVersion", NULL, NULL, (BYTE*)value, &size);
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
int i;
|
||||
for (i = 0; i < strlen(value); i++) { /* case-insensitive */
|
||||
value[i] = toupper(value[i]);
|
||||
}
|
||||
@ -169,7 +169,6 @@ int vbox_reg_key9(int writelogs) {
|
||||
* VirtualBox driver files in \\WINDOWS\\system32\\drivers\\
|
||||
**/
|
||||
int vbox_sysfile1(int writelogs) {
|
||||
DWORD ret;
|
||||
const int count = 4;
|
||||
string strs[count];
|
||||
int res = FALSE, i = 0;
|
||||
@ -193,7 +192,6 @@ int vbox_sysfile1(int writelogs) {
|
||||
* VirtualBox other system files
|
||||
**/
|
||||
int vbox_sysfile2(int writelogs) {
|
||||
DWORD ret;
|
||||
const int count = 14;
|
||||
string strs[count];
|
||||
int res = FALSE, i = 0;
|
||||
@ -229,7 +227,6 @@ int vbox_sysfile2(int writelogs) {
|
||||
int vbox_mac() {
|
||||
WSADATA WSD;
|
||||
int res = FALSE;
|
||||
char mac[6]={0};
|
||||
|
||||
if(!WSAStartup(MAKEWORD(2,2),&WSD)){
|
||||
unsigned long alist_size = 0;
|
||||
@ -239,6 +236,7 @@ int vbox_mac() {
|
||||
if(palist) {
|
||||
ret=GetAdaptersAddresses(AF_UNSPEC,GAA_FLAG_INCLUDE_PREFIX,0,palist,&alist_size);
|
||||
IP_ADAPTER_ADDRESSES* ppalist=palist;
|
||||
char mac[6]={0};
|
||||
while (ppalist){
|
||||
if (ppalist->PhysicalAddressLength==0x6){
|
||||
memcpy(mac,ppalist->PhysicalAddress,0x6);
|
||||
|
@ -10,7 +10,6 @@ int vmware_reg_key1() {
|
||||
HKEY regkey;
|
||||
LONG retu;
|
||||
char value[1024];
|
||||
int i;
|
||||
DWORD size;
|
||||
|
||||
size = sizeof(value);
|
||||
@ -18,6 +17,7 @@ int vmware_reg_key1() {
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
retu = RegQueryValueEx(regkey, "Identifier", NULL, NULL, (BYTE*)value, &size);
|
||||
if (retu == ERROR_SUCCESS) {
|
||||
int i;
|
||||
for (i = 0; i < strlen(value); i++) { /* case-insensitive */
|
||||
value[i] = toupper(value[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user