Jump to content

MrGrj

Active Members
  • Posts

    1414
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by MrGrj

  1. [WTF] Scuze de OFF, dar poate ma intelegeti:

    bahahahahahahaha. [/WTF]

    //ON:

    I was just trying to be sarcastic. There're no such things as ASQII and ASKII. There's only ASCII. Please review your grammar in your future posts as you cannot teach something if you cannot use the same word three times in a row.

    Thanks. Bye

  2. I was incredulous when I read this observation from Reginald Braithwaite:

    Like me, the author is having trouble with the fact that 199 out of 200 applicants for every programming job can't write code at all. I repeat: they can't write any code whatsoever.

    The author he's referring to is Imran, who is evidently turning away lots of programmers who can't write a simple program:

    After a fair bit of trial and error I've discovered that people who struggle to code don't just struggle on big problems, or even smallish problems (i.e. write a implementation of a linked list). They struggle with tiny problems.

    So I set out to develop questions that can identify this kind of developer and came up with a class of questions I call "FizzBuzz Questions" named after a game children often play (or are made to play) in schools in the UK. An example of a Fizz-Buzz question is the following:

    Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

    Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes. Want to know something scary? The majority of comp sci graduates can't. I've also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution.

    Dan Kegel had a similar experience hiring entry-level programmers:

    A surprisingly large fraction of applicants, even those with masters' degrees and PhDs in computer science, fail during interviews when asked to carry out basic programming tasks. For example, I've personally interviewed graduates who can't answer "Write a loop that counts from 1 to 10" or "What's the number after F in hexadecimal?" Less trivially, I've interviewed many candidates who can't use recursion to solve a real problem. These are basic skills; anyone who lacks them probably hasn't done much programming.

    Speaking on behalf of software engineers who have to interview prospective new hires, I can safely say that we're tired of talking to candidates who can't program their way out of a paper bag. If you can successfully write a loop that goes from 1 to 10 in every language on your resume, can do simple arithmetic without a calculator, and can use recursion to solve a real problem, you're already ahead of the pack!

    Between Reginald, Dan, and Imran, I'm starting to get a little worried. I'm more than willing to cut freshly minted software developers slack at the beginning of their career. Everybody has to start somewhere. But I am disturbed and appalled that any so-called programmer would apply for a job without being able to write the simplest of programs. That's a slap in the face to anyone who writes software for a living.

    The vast divide between those who can program and those who cannot program is well known. I assumed anyone applying for a job as a programmer had already crossed this chasm. Apparently this is not a reasonable assumption to make. Apparently, FizzBuzz style screening is required to keep interviewers from wasting their time interviewing programmers who can't program.

    Lest you think the FizzBuzz test is too easy – and it is blindingly, intentionally easy – a commenter to Imran's post notes its efficacy:

    I'd hate interviewers to dismiss [the FizzBuzz] test as being too easy - in my experience it is genuinely astonishing how many candidates are incapable of the simplest programming tasks.

    Maybe it's foolish to begin interviewing a programmer without looking at their code first. At Vertigo, we require a code sample before we even proceed to the phone interview stage. And our on-site interview includes a small coding exercise. Nothing difficult, mind you, just a basic exercise to go through the motions of building a small application in an hour or so. Although there have been one or two notable flame-outs, for the most part, this strategy has worked well for us. It lets us focus on actual software engineering in the interview without resorting to tedious puzzle questions.

    It's a shame you have to do so much pre-screening to have the luxury of interviewing programmers who can actually program. It'd be funny if it wasn't so damn depressing. I'm no fan of certification, but it does make me wonder if Steve McConnell was on to something with all his talk of creating a true profession of software engineering.

    Source

  3. Ai spus de 4 ori aceeasi chestie.

    Pe chat moderatorii au mâna liber? s? fac? ce vor. in plus, dac? intrerupi vreo discutie legat? de una din temele forumului poti lua ban f?r? drept de apel.

    Exist? si o regul? cum c? dac? te plângi în leg?tur? cu chatul primesti ban si pe forum.

    Asteapt?-te la orice si invata din greseli.

    Cât despre VPS... Poti g?si si la 5$ si la 50$. Totul depinde de ceea ce vrei sa faci si cum stii s? cauti.

    Baft?

  4. Cel mai bun tutorial pe care l-am citit so far. Give it a try:

    Spolier:

    So Everything Has A Class?

    Classes can be thought of as blueprints for creating objects. When I define a Customer class using the class keyword, I haven't actually created a customer. Instead, what I've created is a sort of instruction manual for constructing "customer" objects. Let's look at the following example code:

    class Customer(object):
    """A customer of ABC Bank with a checking account. Customers have the
    following properties:

    Attributes:
    name: A string representing the customer's name.
    balance: A float tracking the current balance of the customer's account.
    """

    def __init__(self, name, balance=0.0):
    """Return a Customer object whose name is *name* and starting
    balance is *balance*."""
    self.name = name
    self.balance = balance

    def withdraw(self, amount):
    """Return the balance remaining after withdrawing *amount*
    dollars."""
    if amount > self.balance:
    raise RuntimeError('Amount greater than available balance.')
    self.balance -= amount
    return self.balance

    def deposit(self, amount):
    """Return the balance remaining after depositing *amount*
    dollars."""
    self.balance += amount
    return self.balance

    The class Customer(object) line does not create a new customer. That is, just because we've defined a Customer doesn't mean we've created one; we've merely outlined the blueprint to create a Customer object. To do so, we call the class's __init__ method with the proper number of arguments (minus self, which we'll get to in a moment).

    So, to use the "blueprint" that we created by defining the class Customer (which is used to create Customer objects), we call the class name almost as if it were a function: jeff = Customer('Jeff Knupp', 1000.0). This line simply says "use the Customer blueprint to create me a new object, which I'll refer to as jeff."

    The jeff object, known as an instance, is the realized version of the Customer class. Before we called Customer(), no Customer object existed. We can, of course, create as many Customer objects as we'd like. There is still, however, only one Customer class, regardless of how many instances of the class we create.

    self?

    So what's with that self parameter to all of the Customer methods? What is it? Why, it's the instance, of course! Put another way, a method like withdraw defines the instructions for withdrawing money from some abstract customer's account. Calling jeff.withdraw(100.0) puts those instructions to use on the jeff instance.

    So when we say def withdraw(self, amount):, we're saying, "here's how you withdraw money from a Customer object (which we'll call self) and a dollar figure (which we'll call amount). self is the instance of the Customer that withdraw is being called on. That's not me making analogies, either. jeff.withdraw(100.0) is just shorthand for Customer.withdraw(jeff, 100.0), which is perfectly valid (if not often seen) code.

    • Upvote 1
  5. float InvSqrt(float x) {
    float xhalf = 0.5 f * x;
    int i = * (int * ) & x; // get bits for floating value
    i = 0x5f3759df - (i >> 1); // gives initial guess y0
    x = * (float * ) & i; // convert bits back to float
    x = x * (1.5 f - xhalf * x * x); // Newton step, repeating increases accuracy
    return x;
    }

    float xhalf =[COLOR="#FF0000"] 0.5 f[/COLOR] * x;

    Nu stiu de ce, dar am impresia ca nu compileaza in forma asta

    program.c:6:23: error: expected ‘,’ or ‘;’ before ‘f’

    float xhalf = 0.5 f * x;

    ^

    program.c:10:18: error: expected ‘)’ before ‘f’

    x = x * (1.5 f - xhalf * x * x); // Newton step, repeating increases accuracy

    Pentru cei care sunt la inceput, ar trebui sa fie:


    0.5f //fara spatiu

  6. Although Java was modeled after C and C++ languages, it differs from C and C++ in many ways. Java does not i a number of features available in C and C++. For the benefit of C and C++ programmers, we point out here a few major differences between C/C++ and Java language

    How Java Differs From C:

    Java and C

    Java is not lot like C but the major difference between Java and C is that Java is an object-oriented language and has mechanism to define classes and objects. In an effort to build a simple and safe language, the Java team did not include some of the C features in Java.

    • Java does not include the C unique statement keywords sizeof, and typedef.
    • Java does not contain the data type struct and union.
    • Java does not define the type modifiers keywords auto,extern,register,signed, and unsigned.
    • Java does not support an explicit pointer type.
    • Java does not have a preprocessor and therefore we cannot use # define, # include, and # ifdef statements.
    • Java requires that the functions with no arguments must be declared with empty parenthesis and not with the void keyword as done in C.
    • Java adds new operators such as instanceof and >>>.
    • Java adds labelled break and continue statements.
    • Java adds many features required for object-oriented programming.

    How Java Differs From C++ :

    Java and C++

    Java is a true object-oriented language while C++ is basically C with object-oriented extension. That is what exactly the increment operator ++ indicates. C++ has maintained backward compatibility with C. Is is therefore possible to write an old style C program and run it successfully under C++. Java appears to be similar to C++ when we consider only the “extensions” part of C++. However, some object -oriented features of C++ make the C++ code extremely difficult to follow and maintain.

    Listed below are some major C++ features that were intentionally omitted from java or significantly modified.

    • Java does not support operator overloading.
    • Java does not have template classes as in C++.
    • Java does not support multiple inheritance of classes. This is accomplished using a new feature called “Interface”.
    • Java does not support global variables. Every variable and method is declared within classes and forms part of that class.
    • Java does not use pointers.
    • Java has replaced the destructor function with a finalize() function.
    • There are no header files in Java.

    Java also adds some new features. While C++ is a superset of C, Java is neither a superset nor a subset of C or C++. Java may be considered as a first cousin of C++ and a second cousin of C

    As a personal note, the reason why Java is slower than C/C++ is because it runs on java virtual machine hence portability of apps whilst the latter run on machine directly hence not portable. However, running on some virtual machine means more processing time because the machine has now to communicate with the hardware unlike a c/c++ program which deals with h/w directly.

  7. Draga Bogdan,

    Din moment ce esti un membru nou pe forum, tin sa te anunt ca s-a specificat de multe ori: chat-ul nu are nici o legatura cu forumul. El se afla acolo pur si simplu pentru a comunica liber si a discuta orice subiect se doreste.

    Mai mult, daca citeai ceea ce scrie imediat cum iti apare chat-ul, aflai ca adminii / moderatorii au voie sa faca ceea ce doresc intrucat si-au meritat intr-un fel sau altul dreptul de a fii in postura anterior mentionata.

    Banul pe chat iti va fii scos in momentul in care un admin va considera ca e cazul sa ti-l scoata.

    In cazul in care nu iti place sa frecventezi forumul, du-te pe altul. Aici nu ducem lista de useri. ( totusi recomand sa inveti cate ceva de pe-aici - sunt tutoriale foarte misto si ai ce invata de la multi membrii )

    Peace :)

    • Downvote 1
  8. Pointer Cheat Sheet

    • A pointer must always be of the same type as the variable it's pointing at.
    • Declaring a pointer variable does not create the type of variable it points at. It creates a pointer variable.
    • Though pointers are declared with an asterisk they are not always used with an asterisk.
    • The asterisk is the unary * operator. It is not the * multiplication operator.
    • Pointers must be initialized before they can be used.
    • Initialize a pointer by assigning it to a variable; the variable must be of the same type as the pointer.
    • To assign a pointer to a variable, use an ampersand with the variable's name.
    • The address-of unary operator & is not the same as the bitwise & AND operator.

    m_address = &memory;

    To assign a pointer to an array, do not use the ampersand:

     s_address = string;

    • The pointer s_address would be used on the string array's elements.
    • To assign a pointer to an array element, use the ampersand:

    element = &string[2];

    • Without an asterisk, an initialized pointer holds a memory address.
    • With an asterisk, an initialized pointer references the value stored at its address.

    Typical Pointer Setup and Use

    First, create a pointer of the proper type:

    float *f;

    Second assign it to a variable's memory location:

    f = &boat;

    Finally, use the pointer:

    printf("%.0f",*f);

    • Without an asterisk, the pointer references a memory location.
    • With an asterisk, the pointer references the value at that memory location.
    • Always use the same type of pointer as the variables it examines: floats for floats, ints for ints, and so on.
    • Remember: initialize a pointer before you use it! Set the pointer equal to the address of some variable in memory.

    Pointers, Parenthesis and Math

    [table=width: 500, class: grid, align: center]

    [tr]

    [td]Pointer Thing[/td]

    [td]Memory Address[/td]

    [td]Memory Contents[/td]

    [/tr]

    [tr]

    [td]p[/td]

    [td]Yep[/td]

    [td]Nope[/td]

    [/tr]

    [tr]

    [td]*p[/td]

    [td]Nope[/td]

    [td]Yep[/td]

    [/tr]

    [tr]

    [td]*p++[/td]

    [td]Incremented after value is read[/td]

    [td]Unchanged[/td]

    [/tr]

    [tr]

    [td]*(p++)[/td]

    [td]Incremented after value is read[/td]

    [td]Unchanged[/td]

    [/tr]

    [tr]

    [td](*p)++ [/td]

    [td]Unchanged[/td]

    [td]Incremented after it's used[/td]

    [/tr]

    [tr]

    [td]*++p[/td]

    [td]Incremented before value is read[/td]

    [td]Unchanged[/td]

    [/tr]

    [tr]

    [td]*(++p)[/td]

    [td]Incremented before value is read[/td]

    [td]Unchanged[/td]

    [/tr]

    [tr]

    [td]++*p[/td]

    [td]Unchanged[/td]

    [td]Incremented before it's used[/td]

    [/tr]

    [tr]

    [td]++(*p)[/td]

    [td]Unchanged[/td]

    [td]Incremented before it's used[/td]

    [/tr]

    [tr]

    [td]p*++[/td]

    [td]Not a pointer[/td]

    [td]Not a pointer[/td]

    [/tr]

    [tr]

    [td]p++*[/td]

    [td]Not a pointer[/td]

    [td]Not a pointer[/td]

    [/tr]

    [/table]

    The ++ operator is used above, though any math operation can be substituted.

    A tip: Use parenthesis to isolate part of the pointer problem and the answer will always work out the way you intended.

    Pointers and array brackets

    [table=width: 500, class: grid, align: left]

    [tr]

    [td]Array Notation[/td]

    [td]Pointer Equivalent[/td]

    [/tr]

    [tr]

    [td]array[0][/td]

    [td]*a[/td]

    [/tr]

    [tr]

    [td]array[1][/td]

    [td]*(a+1)[/td]

    [/tr]

    [tr]

    [td]array[2][/td]

    [td]*(a+2)[/td]

    [/tr]

    [tr]

    [td]array[3][/td]

    [td]*(a+3)[/td]

    [/tr]

    [tr]

    [td]array[x][/td]

    [td]*(a+x)[/td]

    [/tr]

    [/table]

    Ugly ** notation

    [table=width: 500]

    [tr]

    [td]Doodad[/td]

    [td]What It Is[/td]

    [td]Seen by The Compiler[/td]

    [/tr]

    [tr]

    [td]array+1[/td]

    [td]An address[/td]

    [td]A pointer[/td]

    [/tr]

    [tr]

    [td]*(array+1)[/td]

    [td]Contents of address[/td]

    [td]A string[/td]

    [/tr]

    [tr]

    [td]*(*(array+1)) [/td]

    [td]Contents of a character array [/td]

    [td]A character[/td]

    [/tr]

    [tr]

    [td]**(array+1)[/td]

    [td]Same as above[/td]

    [td]Same as above[/td]

    [/tr]

    [/table]

    • Upvote 1
  9. A

    apropos : Search Help manual pages (man -k)
    apt-get : Search for and install software packages (Debian/Ubuntu)
    aptitude : Search for and install software packages (Debian/Ubuntu)
    aspell : Spell Checker
    awk : Find and Replace text, database sort/validate/index

    B

    basename : Strip directory and suffix from filenames
    bash : GNU Bourne-Again SHell
    bc : Arbitrary precision calculator language
    bg : Send to background
    break : Exit from a loop
    builtin : Run a shell builtin
    bzip2 : Compress or decompress named file(s)

    C

    cal : Display a calendar
    case : Conditionally perform a command
    cat : Concatenate and print (display) the content of files
    cd : Change Directory
    cfdisk : Partition table manipulator for Linux
    chgrp : Change group ownership
    chmod : Change access permissions
    chown : Change file owner and group
    chroot : Run a command with a different root directory
    chkconfig : System services (runlevel)
    cksum : Print CRC checksum and byte counts
    clear : Clear terminal screen
    cmp : Compare two files
    comm : Compare two sorted files line by line
    command : Run a command – ignoring shell functions •
    continue : Resume the next iteration of a loop •
    cp : Copy one or more files to another location
    cron : Daemon to execute scheduled commands
    crontab : Schedule a command to run at a later time
    csplit : Split a file into context-determined pieces
    cut : Divide a file into several parts

    D

     date : Display or change the date & time
    dc : Desk Calculator
    dd : Convert and copy a file, write disk headers, boot records
    ddrescue : Data recovery tool
    declare : Declare variables and give them attributes •
    df : Display free disk space
    diff : Display the differences between two files
    diff3 : Show differences among three files
    dig : DNS lookup
    dir : Briefly list directory contents
    dircolors : Colour setup for `ls’
    dirname : Convert a full pathname to just a path
    dirs : Display list of remembered directories
    dmesg : Print kernel & driver messages
    du : Estimate file space usage

    E

     echo : Display message on screen •
    egrep : Search file(s) for lines that match an extended expression
    eject : Eject removable media
    enable : Enable and disable builtin shell commands •
    env : Environment variables
    ethtool : Ethernet card settings
    eval : Evaluate several commands/arguments
    exec : Execute a command
    exit : Exit the shell
    expect : Automate arbitrary applications accessed over a terminal
    expand : Convert tabs to spaces
    export : Set an environment variable
    expr : Evaluate expressions

    F

     false : Do nothing, unsuccessfully
    fdformat : Low-level format a floppy disk
    fdisk : Partition table manipulator for Linux
    fg : Send job to foreground
    fgrep : Search file(s) for lines that match a fixed string
    file : Determine file type
    find : Search for files that meet a desired criteria
    fmt : Reformat paragraph text
    fold : Wrap text to fit a specified width.
    for : Expand words, and execute commands
    format : Format disks or tapes
    free : Display memory usage
    fsck : File system consistency check and repair
    ftp : File Transfer Protocol
    function : Define Function Macros
    fuser : Identify/kill the process that is accessing a file

    G

     gawk : Find and Replace text within file(s)
    getopts : Parse positional parameters
    grep : Search file(s) for lines that match a given pattern
    groupadd : Add a user security group
    groupdel : Delete a group
    groupmod : Modify a group
    groups : Print group names a user is in
    gzip : Compress or decompress named file(s)

    H

    hash : Remember the full pathname of a name argument
    head : Output the first part of file(s)
    help : Display help for a built-in command
    history : Command History
    hostname : Print or set system name

    I

    iconv : Convert the character set of a file
    id : Print user and group id’s
    if : Conditionally perform a command
    ifconfig : Configure a network interface
    ifdown : Stop a network interface
    ifup : Start a network interface up
    import : Capture an X server screen and save the image to file
    install : Copy files and set attributes

    J

    jobs : List active jobs
    join : Join lines on a common field

    K

     kill : Stop a process from running
    killall : Kill processes by name

    L

     less : Display output one screen at a time
    let : Perform arithmetic on shell variables
    ln : Create a symbolic link to a file
    local : Create variables
    locate : Find files
    logname : Print current login name
    logout : Exit a login shell
    look : Display lines beginning with a given string
    lpc : Line printer control program
    lpr : Off line print
    lprint : Print a file
    lprintd : Abort a print job
    lprintq : List the print queue
    lprm : Remove jobs from the print queue
    ls : List information about file(s)
    lsof : List open files

    M

    make : Recompile a group of programs
    man : Help manual
    mkdir : Create new folder(s)
    mkfifo : Make FIFOs (named pipes)
    mkisofs : Create an hybrid ISO9660/JOLIET/HFS filesystem
    mknod : Make block or character special files
    more : Display output one screen at a time
    mount : Mount a file system
    mtools : Manipulate MS-DOS files
    mtr : Network diagnostics (traceroute/ping)
    mv : Move or rename files or directories
    mmv : Mass Move and rename (files)

    N

    netstat : Networking information
    nice Set : the priority of a command or job
    nl Number : lines and write files
    nohup : Run a command immune to hangups
    notify-send : Send desktop notifications
    nslookup : Query Internet name servers interactively

    O

    open : Open a file in its default application
    op : Operator access

    P

    passwd : Modify a user password
    paste : Merge lines of files
    pathchk : Check file name portability
    ping : Test a network connection
    pkill : Stop processes from running
    popd : Restore the previous value of the current directory
    pr : Prepare files for printing
    printcap : Printer capability database
    printenv : Print environment variables
    printf : Format and print data •
    ps : Process status
    pushd : Save and then change the current directory
    pwd : Print Working Directory

    Q

    quota : Display disk usage and limits
    quotacheck : Scan a file system for disk usage
    quotactl : Set disk quotas

    R

    ram : ram disk device
    rcp : Copy files between two machines
    read : Read a line from standard input
    readarray : Read from stdin into an array variable
    readonly : Mark variables/functions as readonly
    reboot : Reboot the system
    rename : Rename files
    renice : Alter priority of running processes
    remsync : Synchronize remote files via email
    return : Exit a shell function
    rev : Reverse lines of a file
    rm : Remove files
    rmdir : Remove folder(s)
    rsync : Remote file copy (Synchronize file trees)

    S

    screen : Multiplex terminal, run remote shells via ssh
    scp : Secure copy (remote file copy)
    sdiff : Merge two files interactively
    sed : Stream Editor
    select : Accept keyboard input
    seq : Print numeric sequences
    set: Manipulate shell variables and functions
    sftp : Secure File Transfer Program
    shift : Shift positional parameters
    shopt : Shell Options
    shutdown : Shutdown or restart linux
    sleep : Delay for a specified time
    slocate : Find files
    sort : Sort text files
    source : Run commands from a file `.’
    split : Split a file into fixed-size pieces
    ssh : Secure Shell client (remote login program)
    strace : Trace system calls and signals
    su : Substitute user identity
    sudo : Execute a command as another user
    sum : Print a checksum for a file
    suspend : Suspend execution of this shell
    symlink : Make a new name for a file
    sync : Synchronize data on disk with memory

    T

    tail : Output the last part of file
    tar : Tape ARchiver
    tee : Redirect output to multiple files
    test : Evaluate a conditional expression
    time : Measure Program running time
    times : User and system times
    touch : Change file timestamps
    top : List processes running on the system
    traceroute : Trace Route to Host
    trap : Run a command when a signal is set(bourne)
    tr : Translate, squeeze, and/or delete characters
    true : Do nothing, successfully
    tsort : Topological sort
    tty : Print filename of terminal on stdin
    type : Describe a command

    U

    ulimit : Limit user resources
    umask : Users file creation mask
    umount : Unmount a device
    unalias : Remove an alias
    uname : Print system information
    unexpand : Convert spaces to tabs
    uniq : Uniquify files
    units : Convert units from one scale to another
    unset : Remove variable or function names
    unshar : Unpack shell archive scripts
    until : Execute commands (until error)
    uptime : Show uptime
    useradd : Create new user account
    userdel : Delete a user account
    usermod : Modify user account
    users : List users currently logged in
    uuencode : Encode a binary file
    uudecode : Decode a file created by uuencode

    V

    v : Verbosely list directory contents (`ls -l -b’)
    vdir : Verbosely list directory contents (`ls -l -b’)
    vi : Text Editor
    vmstat : Report virtual memory statistics

    W

    wait : Wait for a process to complete
    watch : Execute/display a program periodically
    wc : Print byte, word, and line counts
    whereis : Search the user’s $path, man pages and source files for a program
    which : Search the user’s $path for a program file
    while : Execute commands
    who : Print all usernames currently logged in
    whoami : Print the current user id and name (`id -un’)
    wget : Retrieve web pages or files via HTTP, HTTPS or FTP
    write : Send a message to another user

    x

    xargs : Execute utility, passing constructed argument list(s)
    xdg-open : Open a file or URL in the user’s preferred application.

  10. Uite pai si daca ala care trimite doc-ul de fiecare data face un doc nou in care pune text aleator si apoi injecteaza macro vb nu va avea de fiecare data binary markup diferit? Ceea ce face foarte grea misiunea pt antivirus.

    O colega de serviciu a primit sapt asta un doc atasat cu o factura chipurile. In doc erau niste litere la plezneala cam 500 de caractere.

    Exista destule software-uri care pot detecta malicious macro.

  11. Salut, as avea si eu o intrebare. Care este metoda prin care un antivirus isi da seama ca fisierul este sau nu virus? Eu ma gandeam ca tine intr-o baza de date hash-ul virusilor descoperiti si dupa ce calculeaza hash-ul fisierului uploadat il compara cu cele din baza. Sau merge la nivel inferior si citeste intructiunile din spate?

    Ma gandesc ca macrourile astea nu sunt detectate tocmai pt ca astia schimba continutul fisierului? Ma poate ajuta careva cu o informatie? Multumesc.

    Exista diferite tipuri de a detecta virusii:

    - antivirusul se uita la binary markup-ul fisierului pentru a face match in baza de date ce contine virusi si troiani.

    - verifica ce face programul respectiv + vede daca el face ceva similar virusilor

    - analizeaza sursa programului si cauta bucati de cod malitioase ( asta este de multe ori foarte dificil si de obicei doar antivirusii foarte avansati folosesc aceasta metoda + este foarte lenta)

  12. A team of security researchers from Georgia Tech were awarded $100,000 prize for their work in the security of C++ programs. The team comprising of Ph.D students, Byoungyoung Lee and Chengyu Song, along with Professors Taesoo Kim and Wenke Lee from Georgia Tech were awarded the cash prize for discovering new browser-based susceptibilities and for inventing a detection tool that deals with the vulnerabilities.

    Developed by Facebook, the “Internet Defense Prize” is a scheme to reward researchers for projects and prototypes that encourage the safety of the Internet. A part of Facebook’s “Internet Defense Prize“, the cash prize is given at the USENIZ Security Symposium in Washington, D.C.

    Most importantly, the payout has doubled from last year’s inaugural payout of $50,000, which was awarded to German researchers. The won the prize for their work on using static analysis to identify “second-order vulnerabilities” in applications used to compromise users after being stored in web servers before time.

    In a blog post on Thursday, Facebook Security Engineering Manager Ioannis Papagiannis said due to the success of last year, the social media giant partnered again with USENIX in a call for submissions for the prize, won this year by a team from Georgia Tech in Atlanta, Georgia.

    The Georgia Tech group discovered a new class of C++ vulnerabilities that are browser-based. The research paper, titled “Type Casting Verification: Stopping an Emerging Attack Vector,” inspects in detail a variety of security problems in C++, which is used in applications such as the Chrome and Firefox browser. As explained by Papagiannis,

    “C++ supports two major different types of casting operators to convert one type of data into another: static and dynamic casts. Dynamic casts are checked at runtime for correctness, but they also incur a performance overhead.

    People typically prefer to use static casts because they avoid that overhead, but if you cast to the wrong type using a static cast, the program may end up creating a pointer that can point past the memory allocated to a particular object. That pointer can then be used to corrupt the memory of the process.“

    This, in turn can lead to bad-casting or type-confusion susceptibilities. Hence, the group also developed CaVeR, a runtime based bad-casting detection tool. The findings and introduction of the new tool are further detailed in their research paper.

    The researchers while describing their detection tool CaVeR wrote, “It performs program instrumentation at compile time and uses a new runtime type tracing mechanism—the type hierarchy table—to overcome the limitation of existing approaches and efficiently verify type casting dynamically.”

    In the team’s experiments, CAVER detected 11 previously unknown vulnerabilities — nine in GNU libstdc++ and two in Firefox, which have now been patched by the vendors.

    The prize was awarded at the 24th USENIX Security Symposium. Papagiannis said:

    “We all benefit from this kind of work — a large part of why Facebook has been successful in serving nearly 1.5 billion people is because we have been quick to introduce and adopt categories of systems and frameworks that prevent whole classes of vulnerabilities at once. As an industry, we need to invest in those kinds of solutions that scale.”
  13. You don't have to know

    this type of dll injection

    to be able to allocate some dynamic memory.

    It's basic and I strongly reccommend you to learn how to use pointers ( also have a look at dynamic allocated memory - malloc() / calloc() / realloc() / free()) / data structures etc before starting such a project.

    Now, what I think it will solve your issue:


    #include "stdafx.h"
    #include <windows.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    {
    int length = strlen(argv[1]); // argv[1] it's just an example
    char *chrome = (char*)malloc(length + 1); // +1 for null terminator
    char *dll = "C:\\Users\\Emi\\Desktop\\akrikaht.dll";
    GetEnvironmentVariable("programfiles",chrome,sizeof(chrome));

    strcat(chrome,"Google\\Chrome\\Application\\chrome.exe"); //shows error at strcat, opens strcat.asm
    strcpy(dll,lpCmdLine);

    STARTUPINFO si;
    PROCESS_INFORMATION pi;
    ZeroMemory(&si,sizeof(si));
    ZeroMemory(?,sizeof(pi));

    HANDLE baseAddress = VirtualAllocEx (pi.hProcess,NULL, 265, MEM_COMMIT,PAGE_READWRITE) ;
    WriteProcessMemory(pi.hProcess,baseAddress,dll,sizeof(dll),NULL);
    CreateRemoteThread(pi.hProcess, NULL,0, (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle("kernel32"),"LoadLibraryA"),baseAddress,0,NULL);
    Sleep(100) ;
    TerminateThread(pi.hThread,0);
    printf("Injected \n");
    getchar();

    return 0;
    }

    Now obviously something is missing but I won't tell you everything. Just look up on the internet for dynamic memory allocation in c and you'll be ok.

  14. Launched in 2009, Shodan is more of a prying eye across the world through the IoT rather than just a simple search engine. John Matherly, its creator, named his project after the villainous computer in the video game System Shock. As in present, Shodan is living up to his name. Already designated as ‘world’s scariest search engine’, it is commonly called the hacker search engine.

    Shodan shows you what Google doesn’t. Designed with an aim to link all the devices connected to the Internet, it took no time to become a play zone for hackers and experimenters. Shodan works by collecting and stacking HTTP addresses from various devices linked over the Internet across the world. The indexing is done on the basis such as country, OS and brand.

    Shodan’s scanning power can be assumed from the fact that it can detect the traffic lights, security cameras, control systems for gas stations, power grids, and even nuclear power plants. Most of these public services use little measures for online security and once exposed to hackers or terrorist organizations, the results could be disastrous.

    If you have installed telnet enabled security cameras in your home for “security”, then you might want to put them away. Hackers can breach into your system if your IoT hub is exposed on the Internet using this hacker search engine. It won’t be easy, however, it is not impossible either.

    There are a number of devices out there that still run on their default passwords or no passwords at all. Shodan crawls through the Internet for such accessible devices and you are shown 50 of those if you have an account on Shodan. If you could give the website the reason to check these devices with their fees, you would get information of all the devices.

    Though, even if you can, we highly recommend you to not misuse Shodan, the hacker search engine.

    Source

×
×
  • Create New...