I there is anyway to char in FB
-
- Posts: 27
- Joined: Jun 17, 2012 10:16
I there is anyway to char in FB
like in C/C++ we declare charatcer like this:
char myvariable
Is there is anyway to declare char in FB
char myvariable
Is there is anyway to declare char in FB
Re: I there is anyway to char in FB
Code: Select all
Dim as Ubyte an_8_bit_unsigned_integer
Dim as String a_string_of_ASCII_characters
Re: I there is anyway to char in FB
char in C/C++ is a type that may be signed or unsigned and may contain a variable number of bits (8 bit is common).
There're different ways to handle it in FB. As Richard mentioned UBYTE is one solution, but also BYTE.
In case of string variables the FB type STRING is not realy a replacement for char because a STRING may contain zero bytes. It's better to use the FB type named ZSTRING PTR as a replacement for char * or ZSTRING*x for char[x]. Check the Wiki for ZSTRING.
There're different ways to handle it in FB. As Richard mentioned UBYTE is one solution, but also BYTE.
In case of string variables the FB type STRING is not realy a replacement for char because a STRING may contain zero bytes. It's better to use the FB type named ZSTRING PTR as a replacement for char * or ZSTRING*x for char[x]. Check the Wiki for ZSTRING.
-
- Posts: 27
- Joined: Jun 17, 2012 10:16
Re: I there is anyway to char in FB
I want to store shellcode in C I do thsi like
char myshellcode =
"\x31\xc0\x31\xdb\xb0\x17\xcd\x80\xb0\x2e\xcd\x80"
now is there is any way for it.
char myshellcode =
"\x31\xc0\x31\xdb\xb0\x17\xcd\x80\xb0\x2e\xcd\x80"
now is there is any way for it.
Re: I there is anyway to char in FB
Try
Code: Select all
Dim As String myshellcode = Chr(&h31,&hc0,&h31,&hdb,&hb0,&h17,&hcd,&h80,&hb0,&h2e,&hcd,&h80)
Re: I there is anyway to char in FB
Code: Select all
VAR myshellcode = @!"\&h31\&hc0\&h31\&hdb\&hb0\&h17\&hcd\&h80\&hb0\&h2e\&hcd\&h80"
' or:
' DIM AS ZSTRING PTR myshellcode = @!"\&h31\&hc0\&h31\&hdb\&hb0\&h17\&hcd\&h80\&hb0\&h2e\&hcd\&h80"
?*myshellcode
-
- Posts: 27
- Joined: Jun 17, 2012 10:16
Re: I there is anyway to char in FB
why Rich and you change x to &h
Re: I there is anyway to char in FB
&h is the convention in BASIC for specifying hexadecimal notation.HACK3R ADI wrote:why Rich and you change x to &h
Re: I there is anyway to char in FB
See documentation:
- Operator ! (Escaped String)
- Escape Sequences In String Literals
\&hnn: ascii char in hex
There are many answers to our questions in the documentation.
Do not hesitate to study it with full attention.
- Operator ! (Escaped String)
- Escape Sequences In String Literals
\&hnn: ascii char in hex
There are many answers to our questions in the documentation.
Do not hesitate to study it with full attention.
-
- Posts: 27
- Joined: Jun 17, 2012 10:16
Re: I there is anyway to char in FB
Suppose I want to insetr a big code which requires6 lines
then i will type like this:
Var shellcode = _
"shell code..."
"shell code..."
"shell code..."
"shell code..."
"shell code..."
"shell code..."
then i will type like this:
Var shellcode = _
"shell code..."
"shell code..."
"shell code..."
"shell code..."
"shell code..."
"shell code..."
Re: I there is anyway to char in FB
Code: Select all
VAR shellcode = @_
!"shell code..." _
!"shell code..." _
!"shell code..." _
!"shell code..." _
!"shell code..." _
!"shell code..."
-
- Posts: 27
- Joined: Jun 17, 2012 10:16
Re: I there is anyway to char in FB
thank you TJF but can I kn0w what is a use of @ and ! charactaers but anyway.....thanks
Re: I there is anyway to char in FB
Here I send some punctuation characters ",,,,, ;; :: ...." and some capital letters "QAYXSWEDCVFRTGBNHZUJMKIOLP". Use them in further posts, please. (Some of the forum members aren't native speakers.)
I feel like repeating it: do not hesitate to search and study the Wiki pages with full attention!
Find the answer here:HACK3R ADI wrote:... what is a use of ... ! ...
andfxm wrote:See documentation:
- Operator ! (Escaped String)
...
There are many answers to our questions in the documentation.
Do not hesitate to study it with full attention.
Operator @ (Address of)HACK3R ADI wrote:... what is a use of @ ...
I feel like repeating it: do not hesitate to search and study the Wiki pages with full attention!
Re: I there is anyway to char in FB
at least make sure you insert random trash code into memory (and not use)
encrypt and decrypt your important data in realtime only!
code on a computer disconnected from internet, and test on LAN only
and use the gcc version of the compiler, since FB is a small community finding you is so easy, even my grandmother could figure it out
dont use "special code", the code must be so generic, that when decompiled, it looks like anyone made it (this is primarily why using fbc is a bad idea)
we're not in 2004 anymore when people could "investigate" what they wanted...
everyone is conscious about cyber security now, and noone cares if you never stole a penny (or a password for that matter)
and no, i wont help you beyond this, except if its only for programmatical help :)
except perhaps, dont overdo it :P really, the only good hackers are the ones noone ever knew or heard about
posting shellcode on here was a bad idea to begin with..
its easy to catch it using a web crawler (which i know lots and lots about), so removing it now would be a good start
encrypt and decrypt your important data in realtime only!
code on a computer disconnected from internet, and test on LAN only
and use the gcc version of the compiler, since FB is a small community finding you is so easy, even my grandmother could figure it out
dont use "special code", the code must be so generic, that when decompiled, it looks like anyone made it (this is primarily why using fbc is a bad idea)
we're not in 2004 anymore when people could "investigate" what they wanted...
everyone is conscious about cyber security now, and noone cares if you never stole a penny (or a password for that matter)
and no, i wont help you beyond this, except if its only for programmatical help :)
except perhaps, dont overdo it :P really, the only good hackers are the ones noone ever knew or heard about
posting shellcode on here was a bad idea to begin with..
its easy to catch it using a web crawler (which i know lots and lots about), so removing it now would be a good start
-
- Posts: 27
- Joined: Jun 17, 2012 10:16
Re: I there is anyway to char in FB
I have posted shell code here because others can understand what I want to say and I understand what you are saying and yes you are right are u also a Hacker?