Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update string as parameter for string functions in script engine #297

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

xmaple555
Copy link
Member

Description

strlen

? {
	if(strlen("12345") == 5){
		printf("%d", strlen("12345"));
	}
}

strcmp

!epthook ntwritefile script {
	if (strcmp("Notepad.exe",$pname) ==0){
		pause();
	}
}

? {
	if(strcmp("123","123") == 0){
		printf("the two strings are same");
	}else {
		printf("the two strings are not same");
	}
}

? {
	if(strcmp($pname,"hyperdbg-cli.exe") == 0){
		printf("the process is hyperdbg-cli.exe");
	}else {
		printf("the process is not hyperdbg-cli.exe");
	}
}

memcmp

? {
   ret = memcmp("ABcD", "ABCD", 3);

   if(ret > 0)
   {
      printf("str1 > str2");
   }
   elsif (ret < 0)
   {
      printf("str1 < str2");
   }
   else
   {
      printf("str1 = str2");
   }
}

? {
   ret = memcmp("ABCD", $pname, 3);

   if(ret > 0)
   {
      printf("str1 > str2");
   }
   elsif (ret < 0)
   {
      printf("str1 < str2");
   }
   else
   {
      printf("str1 = str2");
   }
}

@SinaKarvandi SinaKarvandi merged commit 0de86a2 into HyperDbg:dev Nov 3, 2023
3 checks passed
@SinaKarvandi
Copy link
Member

Hi @xmaple555 ,
Your contributions are really valuable to the HyperDbg @xmaple555 and you seem to be pretty familiar with the code base. Let me know if you're interested in joining the @HyperDbg organization, so I can send you an invitation to the GitHub org. 🙂🙃

@xmaple555
Copy link
Member Author

Hi @xmaple555 , Your contributions are really valuable to the HyperDbg @xmaple555 and you seem to be pretty familiar with the code base. Let me know if you're interested in joining the @HyperDbg organization, so I can send you an invitation to the GitHub org. 🙂🙃

Sure, I would be glad to join the @HyperDbg organization. Thank a lot. :)

@SinaKarvandi
Copy link
Member

Invited

@SinaKarvandi SinaKarvandi mentioned this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants