Как стать автором
Обновить
4
0

Программист

Отправить сообщение
По поводу перейти — у JS думаю нет с этим проблем, синтаксис ES6 все вроде приняли и уже сейчас с babel'ом используют.
Всё же немного пофлеймлю :)
PHP — я правда не понимаю, почему был выбран именно такой синтаксис: ->, =>, ::. Это и выглядит не очень, и писать неудобно (тире и угловая скобка находятся в противоположных рядах клавиатуры).

Ruby и Perl — побратимы. Первый написан японцем, второй — лингвистом. Мне одному здесь видятся иероглифы и клинопись?
def push(n)
    @args ||= []
    @args << n
end

%h = ("Lennon"=>"John","Lenin"=>"Leonid");
print $h{"Lennon"}, "\n";
$h{"df0"}="DF)";
print %h,"\n";

for(keys %h){
    print "$_","-","$h{$_}\n";
}

for(sort keys %h){
    print "$_","-","$h{$_}\n";
}

$h{"df01"}="DF)!";
print scalar(%h),"\n";
print values %h, "\n";
print %h, "\n";

for($i=0; $i<100;$i++){
    $h{$i}="$i";
}

print scalar%h,"\n";
$h1{1}='1';
$h1{01}="2";

print scalar %h1,"\n";

print $h1{1},"\n";

ES6 — вместо того, чтобы решить вопрос с приведением типов (время как раз подходящее, babel сильно помогает в плавном переходе), они пихают синтаксический сахар и доп. способы объявления переменных… и еще одну реализацию ООП. 8(

Python — проблема 3-й ветки в том, что хотели провести глобальную ревизию, но испугались из-за несовместимости с уже существующим кодом, потому получилось, что ветки почти взаимозаменяемы, вроде даже ВМ не тронули. Непонятно, зачем убрали range ;(

Идеология питона — есть только один верный путь — не понятно откуда там десять вариантов. Я так понимаю вам был нужен этот код (выводит в консоль содержимое ответа по url с 101 символа и до конца):
response = urllib2.urlopen('http://ya.ru')
data = response.read()
print data[100:]
Большинство узнало об UEFI только в связи с выходом Windows 10.
Не во всяком ться есть лишний мягкий знак. Более того, правило применения тся/ться великолепно ложится именно на устную речь: http://tsya.ru/mnemonic.html
Зато вот так прикольней :)
> undefined
undefined

> {}
undefined

> {}+1    // {} -- null?
1

> undefined+1
NaN

> {}+'1'    // {} -- wtf?
1

> undefined+'1'
"undefined1"

> {}+null    // {} -- null?
0

> undefined+null
NaN

Пример несколько наигран — такой код вряд ли встретится в реальности ({} — здесь пустой блок кода), однако забавно.
Но если взять за пример представленную выше функцию, то её аналог в руби будет вести себя по-разному в зависимости от того, передали ли мы в функцию аргумент, или нет:
def a(somevar=['q','w','e'])
    somevar.push('v')
    return somevar
end

a()    # ["q", "w", "e", "v"]
a()    # ["q", "w", "e", "v"]

x = [1,2,3]
a(x)    # [1, 2, 3, "v"]
a(x)    # [1, 2, 3, "v", "v"]

В общем, и в руби, и в питоне эти механизмы не являются интуитивно понятными, ИМХО.
Питоний стиль скорее "от вызова", а стиль руби — "от кода".
А вообще стоит всегда стараться использовать чистые функции :)
Я предполагаю, что тут речь идёт о том, что списки в питоне мутабильны, и аргумент в функции уже ссылается на существующий объект, так как функция компилится в момент объявления. Вроде так.
def a(somevar="asd"):
    somevar = somevar + "v"
    return somevar

print a()    # asdv
print a()    # asdv

print a("dfdsf")    # dfdsfv
print a("dfdsf")    # dfdsfv

def b(somevar=['a','b']):
    somevar.append('v')
    return somevar

print b()    # ['a', 'b', 'v']
print b()    # ['a', 'b', 'v','v']

print b([1,2,3])    # [1, 2, 3, 'v']
print b([1,2,3])    # [1, 2, 3, 'v']

x = ['o','p','q']
print b(x)    # ['o', 'p', 'q', 'v']
print b(x)    # ['o', 'p', 'q', 'v', 'v']
Я, если не ошибаюсь, то в Lua массивы — это таблицы. И у них может быть не только нулевой, но и отрицательный индекс.
А по умолчанию массивы начинаются с 1 из-за того, что вроде как, так сложилось исторически — Lua разрабатывалась для нефтяной промышленности, а там чуваки не секут в программировании — им привычней с 1.
Скрытый текст
Lua is descended from Sol, a language designed for petroleum engineers with no formal training in computer programming. People not trained in computing think it is damned weird to start counting at zero. By adopting 1-based array and string indexing, the Lua designers avoided confounding the expectations of their first clients and sponsors.

Anyway, there are a couple conveniences to using 1-based indexing. Namely, the # (length) operator: t[#t] access the last (numeric) index of the table, and t[#t+1] accesses 1 past the last index. To someone who hasn't already been exposed to 0-based indexing, #t+1 would be more intuitive to move past the end of a list. There's also Lua's for i = 1,#t construct, which I believe falls under the same category as the previous point that «1 to the length» can be more sensible than indexing «0 to the length minus 1».

Possible justification: C only did it because an array is basically just a pointer and array[0] == array + 0;, and 1-based counting is more natural when array is really a hash table.

(http://stackoverflow.com/questions/2785704/why-do-lua-arraystables-start-at-1-instead-of-0)
Есть эпичней :)
isNaN(NaN) // true
isNaN(undefined) // true
isNaN({}) // true
isNaN(new Date().toString()) // true
isNaN(«words») // true
Так они за собой всё подчищают. Как я понял, всё что есть — это зараженный файл в почте. Его и исследуют.
https://threatpost.ru/blackenergy-apt-group-spreading-malware-via-tainted-word-docs/14487/
https://threatpost.ru/zlovred-blackenergy-atakuet-avtomatizirovannye-sistemy-upravleniya/4514/
http://www.slideshare.net/devkambhampati/ics-cert-monitorsep2014feb2015

Сигнатуры YARA для BE2 и BE3: https://ics-cert.us-cert.gov/alerts/ICS-ALERT-14-281-01B

https://threatpost.ru/plaginy-zlovreda-blackenergy-ostavlyayut-za-soboj-destruktivnyj-sled/4600/

Отчет также указывает на то, что были обнаружены плагины, собирающие информацию о подключенных USB-устройствах, BIOS, системной плате и процессоре, но цель сбора подобных данных осталась неясной. «Зачем злоумышленникам могла бы понадобиться информация о USB и характеристиках BIOS? Вероятно, основываясь на определенных USB-устройствах и BIOS, они могут загружать определенные плагины для выполнения дополнительных действий, — сказали исследователи. — Возможно, деструктивные, возможно, для дальнейшего заражения устройств. Мы пока не знаем».

Возможно это будет вам более интересно:
https://web.archive.org/web/20150511060634/http://grabberz.com/showthread.php?t=24418
Отчёт бы подробный почитать, технический, с логами и проч.

Я давал ссылки выше на два pdf с описанием работы BlackEnergy, в том числе и 3-й версии.
Жизни людей? Не думаю.
http://almih.narod.ru/lib-en/pue/_a-b-b-c.html

В любом случае, сегодня это стандартная ситуация.

https://www.shodan.io/search?query=scada
https://www.censys.io/ipv4?q=scada+energy

https://www.tofinosecurity.com/blog/project-shine-1000000-internet-connected-scada-and-ics-systems-and-counting

Project SHINE development started mid-2008 and began ingesting raw data in mid-April 2012. It was initiated to determine a baseline of just how many SCADA/ICS devices and software products are directly connected to the Internet. At the time we started, many people said that the answer to our question would be «very few, if any.»

To date, we have not reached a baseline (aka, «the bottom») in the total number of devices we discovered. The average number of new SCADA/ICS devices found every day is typically between 2000 and 8000. So far we have collected over 1,000,000 unique IP addresses that appear to belong to either SCADA and control systems devices or related software products.

These devices include the traditional SCADA/ICS equipment, such as RTUs, PLCs, IEDs/sensor equipment, SCADA/HMI servers, and DCS. Non-traditional SCADA/ICS devices
Хотя F-Secure вроде утверждают (http://www.securityweek.com/blackenergy-malware-linked-targeted-attacks), что BE3 не продаётся:

«We have observed over a hundred individual victims of these campaigns during our monitoring of the botnets,» he blogged. «Approximately half of these victims are situated in Ukraine and half in Poland, and include a number of state organizations, various businesses, as well as targets which we were unable to identify. The spreading campaigns that we have observed have used either technical infection methods through exploitation of software vulnerabilities, social engineering through spear-phishing emails and decoy documents, or a combination of both.»

In a whitepaper, researchers at F-Secure noted that in the summer of 2014, the firm saw samples of BlackEnergy targeting Ukrainian government organizations for the purposes of stealing information. These samples were nicknamed BlackEnergy 3 by F-Secure and identified as the work of a group the company refers to as «Quedagh.» According to F-Secure, the group is suspected to have been involved in cyber-attacks launched against Georgia during that country's conflict with Russia in 2008.

«The Quedagh-related customizations to the BlackEnergy malware include support for proxy servers and use of techniques to bypass User Account Control and driver signing features in 64-bit Windows systems,» according to the F-Secure whitepaper. «While monitoring BlackEnergy samples, we also uncovered a new variant used by this group. We named this new variant BlackEnergy 3.»

Only Quedagh is believed to be using BlackEnergy 3, and it is not available for sale on the open market, noted Sean Sullivan, security advisor at F-Secure.

«The name [of the group] is based on a ship taken by Captain Kidd, an infamous privateer,» he said. «It is our working theory that the group has previous crimeware experience. Its goals appear to be political but they operate like a crimeware gang. There have been several cases this year of which BlackEnergy is the latest. The trend is one of off-the-shelf malware being used in an APT [advanced persistent threat] kind of way. The tech isn't currently worthy of being called APT, but its evolving and scaling in that direction.»

«The use of BlackEnergy for a politically-oriented attack is an intriguing convergence of criminal activity and espionage,» F-Secure notes in the paper. «As the kit is being used by multiple groups, it provides a greater measure of plausible deniability than is afforded by a custom-made piece of code.»

Информация

В рейтинге
Не участвует
Откуда
Россия
Дата рождения
Зарегистрирован
Активность